123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- {{ 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>
- {{ $current := . }}
- {{ range $.Site.Home.Sections }}
- {{ range .Pages.ByWeight }}
- <div class="pattern-section">
- <h1 id="{{ .Title | urlize }}" tabindex="-1">
- <svg class="bookmark-icon" aria-hidden="true" viewBox="0 0 40 50"><use xlink:href="#bookmark"></use></svg>
- {{ .Title }}
- </h1>
- {{ .Content }}
- </div>
- {{ end }}
- {{ range .Sections.ByWeight }}
- {{ range .Pages.ByWeight }}
- <div class="pattern-section">
- <h1 id="{{ .Title | urlize }}" tabindex="-1">
- <svg class="bookmark-icon" aria-hidden="true" viewBox="0 0 40 50"><use xlink:href="#bookmark"></use></svg>
- {{ .Title }}
- </h1>
- {{ .Content }}
- </div>
- {{ end }}
- {{ end }}
- {{ end }}
- </main>
- {{ end }}
|