44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
{{ define "title" }}
|
|
{{ .Site.Title }}
|
|
{{ end }}
|
|
|
|
{{ define "nav" }}
|
|
<!-- silence is golden -->
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main id="main">
|
|
<nav id="toc" class="toc patterns" aria-labelledby="toc-heading">
|
|
<h2 id="toc-heading">Table of contents</h2>
|
|
{{ $current := . }}
|
|
{{ range $.Site.Home.Sections }}
|
|
<ul id="patterns-list">
|
|
{{ range .Pages.ByWeight }}
|
|
<li class="pattern">
|
|
<a href="#{{ .Title | urlize }}" {{ if eq $current.Title .Title }}aria-current="page"{{ end }}>
|
|
<svg class="bookmark-icon" aria-hidden="true" viewBox="0 0 40 50"><use xlink:href="#bookmark"></use></svg>
|
|
<span class="text">{{ .Title }}</span>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ range .Sections.ByWeight }}
|
|
<li>
|
|
<h3>{{ .Title }}</h3>
|
|
<ul>
|
|
{{ range .Pages.ByWeight }}
|
|
<li class="pattern">
|
|
<a href="#{{ .Title | urlize }}" {{ if eq $current.Title .Title }}aria-current="page"{{ end }}>
|
|
<svg class="bookmark-icon" aria-hidden="true" viewBox="0 0 40 50"><use xlink:href="#bookmark"></use></svg>
|
|
<span class="text">{{ .Title }}</span>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</nav>
|
|
</main>
|
|
{{ end }}
|