Migration This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs. Contact me

templates/views/tree.html

3a50036d96eb14462e96598fd169d1c79264ac4b · 681 B · 15 lines raw

1 {{ define "tree.html" }}{{ template "base" . }}{{ end }}
2 {{ define "main" }}
3 {{ $t := mod "tree" }}{{ $slug := print "/" .Info.Slug }}
4 <header class="page-head">
5 <nav class="crumbs">
6 <a href="{{ $slug }}/tree/{{ .Ref }}">{{ .Info.Title }}</a>
7 {{ range $t.Crumbs }}<span class="slash">/</span><a href="{{ $slug }}/tree/{{ $.Ref }}/{{ .Path }}">{{ .Name }}</a>{{ end }}
8 </nav>
9 <p class="sub"><code>{{ .Ref }}</code> &middot; {{ len $t.Entries }} entries</p>
10 </header>
11 {{ template "tree-table" (dict "Base" $slug "Ref" .Ref "Entries" $t.Entries) }}
12 {{ with modOr "readme" }}
13 <section class="prose-wrap"><div class="prose">{{ .HTML }}</div></section>
14 {{ end }}
15 {{ end }}