Amélioration du menu ls.
Avec notamment l'ajout de l'entrée de la section courante _index.md, et de l'attribut aria-current quand nécessaire.
This commit is contained in:
@@ -11,19 +11,24 @@
|
||||
{{/* La commande ls affiche total en Kio. */}}
|
||||
<p aria-hidden="true">total {{ math.Floor (div $sum 1024) }}</p>
|
||||
<ul class="lsresult">
|
||||
<li class="directory">{{ partial "lsline.html" (dict "page" . "linkTitle" ".") }}</li>
|
||||
<li class="directory">{{ partial "lsline.html" (dict "page" (or .Parent .) "linkTitle" "..") }}</li>
|
||||
{{ range .Sections.ByLastmod.Reverse }}
|
||||
<li class="directory">
|
||||
{{ partial "lsline.html" (dict "page" .CurrentSection "linkTitle" "." "currentPage" $page) }}
|
||||
</li>
|
||||
<li class="directory">
|
||||
{{ partial "lsline.html" (dict "page" (or .Parent .CurrentSection) "linkTitle" ".." "currentPage" $page) }}
|
||||
</li>
|
||||
{{ range .CurrentSection.Sections.ByLastmod.Reverse }}
|
||||
<li class="directory">
|
||||
{{ partial "lsline.html" (dict "page" . "linkTitle" .LinkTitle) }}
|
||||
{{ partial "lsline.html" (dict "page" . "linkTitle" .File.ContentBaseName "currentPage" $page ) }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ range .Pages.ByPublishDate.Reverse }}
|
||||
{{ if .IsPage }}
|
||||
<li class="file" aria-hidden="true">
|
||||
{{ partial "lsline.html" (dict "page" .CurrentSection "forceFile" true "linkTitle" (path.Base .CurrentSection) "currentPage" $page) }}
|
||||
</li>
|
||||
{{ range .CurrentSection.RegularPages.ByPublishDate.Reverse }}
|
||||
<li class="file">
|
||||
{{ partial "lsline.html" (dict "page" . "linkTitle" .LinkTitle "currentPage" $page) }}
|
||||
{{ partial "lsline.html" (dict "page" . "linkTitle" .File.LogicalName "currentPage" $page) }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user