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
1 changed files with 9 additions and 15 deletions

View File

@ -28,23 +28,17 @@
<h1>FSC Schema Extension</h1>
<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>
<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! -->
{{ range where (where site.RegularPages "Type" "terms") "Params.cluster" "==" "Fsc" }}
{{- if .Params.field -}}
<a class="btn btn-sm btn-outline-primary m-1" href="#{{ .Params.slug }}">{{ .Params.field }}</a>
{{- end -}}
{{ end }}
</p>
{{/* Assign the current page context to a variable so we don't lose */}}
{{/* it in the range below. */}}
{{ $context := . }}
{{ range where (where site.RegularPages "Type" "terms") "Params.cluster" "==" "Fsc" }}
<div class="col">
{{ .Render "term" }}
</div>
{{ .Scratch.Set "cluster" "Fsc" }}
{{ $modules := slice "Assurance" "Certificate" "Coverage" "Evaluation" "Form" "Scope" "Status" }}
{{ range $modules }}
{{ $module := . }}
{{ $.Scratch.Set "module" $module }}
{{ partialCached "module-elements.html" $context $module }}
{{ end }}
<h2 id="download">Download</h2>