mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
taxonomy: add h2 subheadings on term page #705
This commit is contained in:
parent
8e7309dfa6
commit
2846b735c7
1 changed files with 21 additions and 6 deletions
|
@ -12,14 +12,29 @@
|
||||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (default .Data.Term .Title) }}
|
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (default .Data.Term .Title) }}
|
||||||
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
||||||
{{- .Content }}
|
{{- .Content }}
|
||||||
<ul class="columnize">
|
{{- $lastCapital := "" }}
|
||||||
{{- range sort .Pages "Title" }}
|
{{- $pages := slice }}
|
||||||
{{- $c:=""}}{{/* display pages of a term */}}
|
{{- range .Pages }}
|
||||||
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
||||||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a></li>
|
{{- $pages = $pages | append (dict "Title" .Title "Page" . )}}
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range sort $pages ".Title" }}
|
||||||
|
{{- $capital := substr .Title 0 1 | upper }}
|
||||||
|
{{- if ne $lastCapital $capital }}
|
||||||
|
{{- if ne $lastCapital "" }}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
||||||
|
<ul class="columnize">
|
||||||
|
{{- end }}
|
||||||
|
{{- $c:=""}}{{/* display pages of a term */}}
|
||||||
|
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a></li>
|
||||||
|
{{- $lastCapital = $capital }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if ne $lastCapital "" }}
|
||||||
|
</ul>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
<footer class="footline">
|
<footer class="footline">
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in a new issue