mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 11:13:06 +00:00
23 lines
No EOL
621 B
HTML
23 lines
No EOL
621 B
HTML
<div class="default-animation progress">
|
|
<div class="toc-wrapper">
|
|
{{- if eq .Kind "taxonomy" }}
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
{{- $lastCapital := "" }}
|
|
{{- range .Data.Terms.Alphabetical }}
|
|
{{- $capital := substr .Page.Title 0 1 | upper }}
|
|
{{- if ne $lastCapital $capital }}
|
|
<li><a href="#{{ $capital | anchorize }}">{{ $capital }}</a></li>
|
|
{{- end }}
|
|
{{- $lastCapital = $capital }}
|
|
{{- end }}
|
|
</ul>
|
|
</nav>
|
|
{{- else }}
|
|
{{- partial "shortcodes/piratify.html" (dict
|
|
"page" .
|
|
"pagefield" "TableOfContents"
|
|
) }}
|
|
{{- end }}
|
|
</div>
|
|
</div> |