mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
16 lines
No EOL
421 B
HTML
16 lines
No EOL
421 B
HTML
{{- 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 }}
|
|
{{- .TableOfContents }}
|
|
{{- end }} |