Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TeDomum
Website
Commits
dff56eb5
Commit
dff56eb5
authored
May 24, 2020
by
kaiyou
Browse files
Add a side menu in documentation
parent
cb4ac364
Changes
6
Hide whitespace changes
Inline
Side-by-side
content/service/_index.md
View file @
dff56eb5
---
title
:
Services
subtitle
:
Pourvu que vous y trouviez votre bonheur
layout
:
index
menu
:
main
:
weight
:
1
side
:
weight
:
2
---
layouts/_default/baseof.html
View file @
dff56eb5
...
...
@@ -16,17 +16,22 @@
</head>
<body
style=
"color: #404040; background-color: #f8f8f8;"
>
{{ partial "header.html" . }}
{{ block "asides" . }}
{{ end }}
<section
id=
"main"
class=
"container-lg"
>
{{ block "section" . }}
{{ partial "title.html" . }}
<article
id=
"content"
>
{{ block "content" . }}
{{ end }}
</article>
<div
class=
"container-fluid"
><div
class=
"row"
>
{{ block "asides" . }}
{{ if in (slice "service" "documentation") .Section }}
{{ partial "sidemenu.html" . }}
{{ end }}
</section>
{{ end }}
<main
id=
"main"
class=
"container-lg"
>
{{ block "section" . }}
{{ partial "title.html" . }}
<article
id=
"content"
>
{{ block "content" . }}
{{ end }}
</article>
{{ end }}
</main>
</div></div>
{{ partial "footer.html" . }}
</body>
</html>
layouts/index.html
View file @
dff56eb5
{{ define "asides" }}
<div
class=
"jumbotron
jumbotron-fluid
"
style=
"background: url('{{ "
/
images
/
pattern.png
"
|
relURL
}}')
#a0a0a0
;
background-blend-mode:
multiply
;"
>
<div
class=
"jumbotron
w-100
"
style=
"background: url('{{ "
/
images
/
pattern.png
"
|
relURL
}}')
#a0a0a0
;
background-blend-mode:
multiply
;"
>
<div
class=
"container-lg"
>
{{ .Content }}
</div>
...
...
layouts/partials/footer.html
View file @
dff56eb5
<footer
class=
"border-top pt-4 mt-3 container"
>
<p>
<i
class=
"fa fa-cat"
></i>
TeDomum est membre du collectif
<a
href=
"https://chatons.org"
>
CHATONS
</a>
.
Si nos services ne vous conviennent pas, d'autres membres du collectif
rempliront très probablement votre besoin.
</p>
<p>
<i
class=
"fa fa-code-branch"
></i>
Contribuez à cette page directement sur
<a
href=
"https://forge.tedomum.net/tedomum/www/-/tree/master/content/{{ .Page.File.Path }}"
>
notre forge.
</a>
</p>
<footer
class=
"border-top pt-4 container-fluid"
>
<div
class=
"container-lg"
>
<p>
<i
class=
"fa fa-cat"
></i>
TeDomum est membre du collectif
<a
href=
"https://chatons.org"
>
CHATONS
</a>
.
Si nos services ne vous conviennent pas, d'autres membres du collectif
rempliront très probablement votre besoin.
</p>
<p>
<i
class=
"fa fa-code-branch"
></i>
Contribuez à cette page directement sur
<a
href=
"https://forge.tedomum.net/tedomum/www/-/tree/master/content/{{ .Page.File.Path }}"
>
notre forge.
</a>
</p>
</div>
</footer>
\ No newline at end of file
layouts/partials/sidemenu.html
0 → 100644
View file @
dff56eb5
{{ $current := . }}
<nav
class=
"col-md-2 bg-light sidebar float-left border-right p-0"
>
<ul
class=
"nav flex-column"
>
{{ range .Site.Menus.side }}
<h5
class=
"p-2 bg-primary text-white"
>
{{ .Title }}
</h5>
{{ if .Page }}
{{ range .Page.Pages }}
<li
class=
"nav-item"
>
<a
class=
"nav-link p-1 pl-3"
href=
"{{ .RelPermalink }}"
>
{{ .Title }}
</a>
{{ if or ($current.IsDescendant .) (eq $current .) }}
<div
class=
"ml-3 border-left"
>
{{ range .Pages }}
<a
class=
"nav-link p-1 pl-3"
href=
"{{ .RelPermalink }}"
>
{{ .Title }}
</a>
{{ end }}
</div>
{{ end }}
</li>
{{ end }}
<p
class=
"mt-1"
></p>
{{ end }}
{{ end }}
</ul>
</nav>
\ No newline at end of file
layouts/service/
list
.html
→
layouts/service/
index
.html
View file @
dff56eb5
{{ define "asides" }}
<!-- nothing -->
{{ end }}
{{ define "content" }}
{{ .Content }}
{{ range sort .Site.Taxonomies.category ".Page.Params.weight" "asc" }}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment