list.html (3113B)
1 {{ define "main" }}
2 <div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns">
3 <div class="flex-l">
4 <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">
5 <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">
6 <p class="b">What's on this Page</p>
7 <ul>
8 <li><a href="#last-updated">Last Updated</a></li>
9 <li><a href="#least-recently-updated">Least Recently Updated</a></li>
10 <li><a href="#todos">Pages marked with TODO</a></li>
11 <li><a href="#dependencies">Project dependencies (Hugo Modules)</a></li>
12 </ul>
13 </aside>
14 </div>
15 <div class="w-100">
16 {{ $byLastMod := .Site.RegularPages.ByLastmod }}
17 {{ $recent := ($byLastMod | last 30).Reverse }}
18 {{ $leastRecent := $byLastMod | first 10 }}
19 <h2 id="last-updated">Last Updated</h2>
20 {{ partial "maintenance-pages-table.html" $recent }}
21 <h2 id="least-recently-updated">Least Recently Updated</h2>
22 {{ partial "maintenance-pages-table.html" $leastRecent }}
23
24 {{/* Don't think this is possible with where directly. Should investigate. */}}
25 {{ .Scratch.Set "todos" slice }}
26 {{ range .Site.RegularPages }}
27 {{ if .HasShortcode "todo" }}
28 {{ $.Scratch.Add "todos" . }}
29 {{ end }}
30 {{ end }}
31 <h2 id="todos">Pages marked with TODO</h2>
32 {{ partial "maintenance-pages-table.html" (.Scratch.Get "todos") }}
33
34 <h2 id="dependencies">Dependencies</h2>
35 <table class="collapse ba br2 b--black-10 pv2 ph3">
36 <thead>
37 <tr>
38 <th class="pv2 ph3 tl f6 fw6 ttu">#</th>
39 <th class="pv2 ph3 tl f6 fw6 ttu">Owner</th>
40 <th class="pv2 ph3 tl f6 fw6 ttu">Path</th>
41 <th class="pv2 ph3 tl f6 fw6 ttu">Version</th>
42 <th class="pv2 ph3 tl f6 fw6 ttu">Time</th>
43 <th class="pv2 ph3 tl f6 fw6 ttu">Vendor</th>
44 </tr>
45 </thead>
46 <tbody>
47 {{ range $index, $element := hugo.Deps }}
48 <tr class="striped--light-gray">
49 <th class="pv2 ph3">{{ add $index 1 }}</th>
50 <td class="pv2 ph3">{{ with $element.Owner }}{{.Path }}{{ end }}</td>
51 <td class="pv2 ph3">
52 {{ $element.Path }}
53 {{ with $element.Replace}}
54 => {{ .Path }}
55 {{ end }}
56 </td>
57 <td class="pv2 ph3">{{ $element.Version }}</td>
58 <td class="pv2 ph3">{{ with $element.Time }}{{ . }}{{ end }}</td>
59 <td class="pv2 ph3">{{ $element.Vendor }}</td>
60 </tr>
61 {{ end }}
62 </tbody>
63 </table>
64
65 </div>
66 </div>
67 </div>
68 {{ end }}