mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
feat: better UX in the menu
This commit is contained in:
parent
157e3ac512
commit
47c72cb81e
2 changed files with 18 additions and 21 deletions
|
@ -12,7 +12,6 @@ defaultContentLanguageInSubdir= true
|
||||||
editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/docs/content/"
|
editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/docs/content/"
|
||||||
description = "Documentation for Hugo Learn Theme"
|
description = "Documentation for Hugo Learn Theme"
|
||||||
author = "Mathieu Cornic"
|
author = "Mathieu Cornic"
|
||||||
showVisitedLinks = true # default to false
|
|
||||||
disableSearch = false # default to false
|
disableSearch = false # default to false
|
||||||
ordersectionsby = "weight" # ordersectionsby = "title"
|
ordersectionsby = "weight" # ordersectionsby = "title"
|
||||||
|
|
||||||
|
@ -20,13 +19,13 @@ defaultContentLanguageInSubdir= true
|
||||||
home = [ "HTML", "RSS", "JSON"]
|
home = [ "HTML", "RSS", "JSON"]
|
||||||
|
|
||||||
|
|
||||||
[Languages]
|
#[Languages]
|
||||||
[Languages.en]
|
#[Languages.en]
|
||||||
title = "Documentation for Hugo Learn Theme"
|
#title = "Documentation for Hugo Learn Theme"
|
||||||
weight = 1
|
#weight = 1
|
||||||
languageName = "English"
|
#languageName = "English"
|
||||||
|
#
|
||||||
[Languages.fr]
|
#[Languages.fr]
|
||||||
title = "Documentation du thème Hugo Learn"
|
#title = "Documentation du thème Hugo Learn"
|
||||||
weight = 2
|
#weight = 2
|
||||||
languageName = "Français"
|
#languageName = "Français"
|
|
@ -24,9 +24,9 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
<hr/>
|
{{ if or .Site.IsMultiLingual $showvisitedlinks }}
|
||||||
|
|
||||||
<section id="prefooter">
|
<section id="prefooter">
|
||||||
|
<hr/>
|
||||||
<ul>
|
<ul>
|
||||||
{{ if .Site.IsMultiLingual }}
|
{{ if .Site.IsMultiLingual }}
|
||||||
<li>
|
<li>
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
{{ end }}
|
||||||
<section id="footer">
|
<section id="footer">
|
||||||
{{ partial "menu-footer.html" . }}
|
{{ partial "menu-footer.html" . }}
|
||||||
</section>
|
</section>
|
||||||
|
@ -87,12 +88,10 @@
|
||||||
{{if .Params.alwaysopen}}parent{{end}}
|
{{if .Params.alwaysopen}}parent{{end}}
|
||||||
">
|
">
|
||||||
<a href="{{ .RelPermalink}}">
|
<a href="{{ .RelPermalink}}">
|
||||||
<span>
|
{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}
|
||||||
{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}
|
{{ if $showvisitedlinks}}
|
||||||
{{ if $showvisitedlinks}}
|
<i class="fa fa-check read-icon"></i>
|
||||||
<i class="fa fa-check read-icon"></i>
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
</span>
|
|
||||||
</a>
|
</a>
|
||||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||||
{{ if ne $numberOfPages 0 }}
|
{{ if ne $numberOfPages 0 }}
|
||||||
|
@ -125,9 +124,8 @@
|
||||||
{{ if not .Params.Hidden }}
|
{{ if not .Params.Hidden }}
|
||||||
<li data-nav-id="{{.URL}}" title="{{.Title}}" class="dd-item {{if eq .UniqueID $currentNode.UniqueID}}active{{end}}">
|
<li data-nav-id="{{.URL}}" title="{{.Title}}" class="dd-item {{if eq .UniqueID $currentNode.UniqueID}}active{{end}}">
|
||||||
<a href="{{ .RelPermalink}}">
|
<a href="{{ .RelPermalink}}">
|
||||||
<span>{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}
|
{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}
|
||||||
{{ if $showvisitedlinks}}<i class="fa fa-check read-icon"></i>{{end}}
|
{{ if $showvisitedlinks}}<i class="fa fa-check read-icon"></i>{{end}}
|
||||||
</span>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue