1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 03:36:16 +00:00
mycorrhiza/hypview/view_navititle.html
Timur Ismagilov 59deabd0d1 Reimplement Navititle with go templates
That was rough
2022-04-23 23:35:36 +03:00

17 lines
566 B
HTML

{{define "navititle"}}
<h1 class="navi-title">
{{- $withParents := .HyphaNamePartsWithParents -}}
{{- $parts := .HyphaNameParts -}}
<a href="/hypha/{{.HomeHypha}}">
{{- .Icon -}}
<span aria-hidden="true" class="navi-title__colon">:</span></a>
{{- range $i, $part := .HyphaNameParts -}}
{{- if gt $i 0 -}}
<span aria-hidden="true" class="navi-title__separator">/</span>
{{- end -}}
<a href="{{index $withParents $i}}" rel="{{if len $parts | eq (inc $i)}}bookmark{{else}}up{{end}}">
{{- beautifulName $part -}}
</a>
{{- end}}
</h1>
{{end}}