26 lines
1012 B
HTML
26 lines
1012 B
HTML
{{/* Application directory grouped by category. Context: dict with "headingLevel". */}}
|
|
{{ $apps := (site.GetPage "/apps").Pages }}
|
|
{{ $h := .headingLevel | default 2 }}
|
|
<div class="directory">
|
|
{{ range site.Params.appGroups }}
|
|
{{ $group := .name }}
|
|
{{ $inGroup := where $apps "Params.category" $group }}
|
|
{{ with $inGroup }}
|
|
<section class="dir-group" id="{{ $group | anchorize }}">
|
|
<header class="dir-group-head">
|
|
<h{{ $h }}>{{ $group }}</h{{ $h }}>
|
|
</header>
|
|
<ul class="dir-list">
|
|
{{ range .ByTitle }}
|
|
<li class="dir-row">
|
|
<a class="dir-name" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
|
<span class="dir-desc">{{ .Params.tagline }}</span>
|
|
{{ with .Params.replaces }}<span class="dir-replaces"><span class="visually-hidden">Use instead of </span>{{ range $i, $n := first 3 . }}{{ if $i }}<span class="sep">, </span>{{ end }}<s>{{ $n }}</s>{{ end }}</span>{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|