maintenance: Add TOC

This commit is contained in:
Bjørn Erik Pedersen 2018-02-11 14:34:28 +01:00
parent 29e86396b0
commit 105d536103
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F

View File

@ -1,14 +1,24 @@
{{ define "main" }} {{ define "main" }}
<div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns"> <div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns">
{{ $byLastMod := .Site.RegularPages.ByLastmod }} <div class="flex-l">
{{ $recent := $byLastMod | last 10 }} <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">
{{ $leastRecent := $byLastMod | first 10 }} <aside class="fixed-lTK mw5-l right-0 f6 bl-l b--moon-gray pv4 pv0-ns ph4-l nested-list-reset nested-links nested-copy-line-height">
<p class="b">What's on this Page</p>
<h2>Last Updated</h2> <ul>
{{ partial "maintenance-pages-table" $recent }} <li><a href="#last-updated">Last Updated</a></li>
<li><a href="#least-recently-updated">Least Recently Updated</a></li>
<h2>Least Recently Updated</h2> </ul>
{{ partial "maintenance-pages-table" $leastRecent }} </aside>
</div>
<div class="w-100">
{{ $byLastMod := .Site.RegularPages.ByLastmod }}
{{ $recent := $byLastMod | last 10 }}
{{ $leastRecent := $byLastMod | first 10 }}
<h2 id="last-updated">Last Updated</h2>
{{ partial "maintenance-pages-table" $recent }}
<h2 id="least-recently-updated">Least Recently Updated</h2>
{{ partial "maintenance-pages-table" $leastRecent }}
</div>
</div>
</div> </div>
{{ end }} {{ end }}