site/layouts: adjust fsc layout for modules

Adjust the FSC layout to group modules together.
This commit is contained in:
Alan Orth 2022-02-06 21:17:04 +03:00
parent 008ff55695
commit 2c789ea9a4
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -28,23 +28,17 @@
<h1>FSC Schema Extension</h1> <h1>FSC Schema Extension</h1>
<p class="lead">This page provides a reference specification for the Forest Stewardship Council (FSC) schema extension.</p> <p class="lead">This page provides a reference specification for the Forest Stewardship Council (FSC) schema extension.</p>
<h2 id="metadata-elements">Metadata Elements</h2> <h2 id="metadata-elements">Metadata Elements</h2>
<p>
{{/* Note: we need to use two ranges for each cluster because it is */}}
{{/* not possible to re-use Hugo's paginate object unless you use */}}
{{/* the same exact arguments each time. */}}
<!-- TODO: note that not all terms have field names so this list is not exclusive! --> {{/* Assign the current page context to a variable so we don't lose */}}
{{ range where (where site.RegularPages "Type" "terms") "Params.cluster" "==" "Fsc" }} {{/* it in the range below. */}}
{{- if .Params.field -}} {{ $context := . }}
<a class="btn btn-sm btn-outline-primary m-1" href="#{{ .Params.slug }}">{{ .Params.field }}</a>
{{- end -}}
{{ end }}
</p>
{{ range where (where site.RegularPages "Type" "terms") "Params.cluster" "==" "Fsc" }} {{ .Scratch.Set "cluster" "Fsc" }}
<div class="col"> {{ $modules := slice "Assurance" "Certificate" "Coverage" "Evaluation" "Form" "Scope" "Status" }}
{{ .Render "term" }} {{ range $modules }}
</div> {{ $module := . }}
{{ $.Scratch.Set "module" $module }}
{{ partialCached "module-elements.html" $context $module }}
{{ end }} {{ end }}
<h2 id="download">Download</h2> <h2 id="download">Download</h2>