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/"
|
||||
description = "Documentation for Hugo Learn Theme"
|
||||
author = "Mathieu Cornic"
|
||||
showVisitedLinks = true # default to false
|
||||
disableSearch = false # default to false
|
||||
ordersectionsby = "weight" # ordersectionsby = "title"
|
||||
|
||||
|
@ -20,13 +19,13 @@ defaultContentLanguageInSubdir= true
|
|||
home = [ "HTML", "RSS", "JSON"]
|
||||
|
||||
|
||||
[Languages]
|
||||
[Languages.en]
|
||||
title = "Documentation for Hugo Learn Theme"
|
||||
weight = 1
|
||||
languageName = "English"
|
||||
|
||||
[Languages.fr]
|
||||
title = "Documentation du thème Hugo Learn"
|
||||
weight = 2
|
||||
languageName = "Français"
|
||||
#[Languages]
|
||||
#[Languages.en]
|
||||
#title = "Documentation for Hugo Learn Theme"
|
||||
#weight = 1
|
||||
#languageName = "English"
|
||||
#
|
||||
#[Languages.fr]
|
||||
#title = "Documentation du thème Hugo Learn"
|
||||
#weight = 2
|
||||
#languageName = "Français"
|
|
@ -24,9 +24,9 @@
|
|||
{{end}}
|
||||
{{end}}
|
||||
</ul>
|
||||
<hr/>
|
||||
|
||||
{{ if or .Site.IsMultiLingual $showvisitedlinks }}
|
||||
<section id="prefooter">
|
||||
<hr/>
|
||||
<ul>
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
<li>
|
||||
|
@ -68,6 +68,7 @@
|
|||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
<section id="footer">
|
||||
{{ partial "menu-footer.html" . }}
|
||||
</section>
|
||||
|
@ -87,12 +88,10 @@
|
|||
{{if .Params.alwaysopen}}parent{{end}}
|
||||
">
|
||||
<a href="{{ .RelPermalink}}">
|
||||
<span>
|
||||
{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}
|
||||
{{ if $showvisitedlinks}}
|
||||
<i class="fa fa-check read-icon"></i>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}
|
||||
{{ if $showvisitedlinks}}
|
||||
<i class="fa fa-check read-icon"></i>
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||
{{ if ne $numberOfPages 0 }}
|
||||
|
@ -125,9 +124,8 @@
|
|||
{{ if not .Params.Hidden }}
|
||||
<li data-nav-id="{{.URL}}" title="{{.Title}}" class="dd-item {{if eq .UniqueID $currentNode.UniqueID}}active{{end}}">
|
||||
<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}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue