From d8065f0634ac166909b0f0dd9e110bb81a5a664e Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 21 Dec 2021 18:31:02 +0200 Subject: [PATCH] site/layouts: add new FSC extension We use a custom style block in the base that defaults to ISEAL, but gets overridden in the FSC layout. Layout is determined in the term frontmatter, either "home" or "fsc". --- site/layouts/_default/baseof.html | 4 +- site/layouts/_default/fsc.html | 75 +++++++++++++++++++++++++++++++ site/layouts/_default/home.html | 4 ++ 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 site/layouts/_default/fsc.html diff --git a/site/layouts/_default/baseof.html b/site/layouts/_default/baseof.html index f5e6761b..cc82bfa3 100644 --- a/site/layouts/_default/baseof.html +++ b/site/layouts/_default/baseof.html @@ -7,8 +7,10 @@ - {{ $style := resources.Get "css/style.min.css" | resources.Fingerprint }} + {{ block "style" . }} + {{ $style := resources.Get "css/iseal.min.css" | resources.Fingerprint }} + {{ end }} diff --git a/site/layouts/_default/fsc.html b/site/layouts/_default/fsc.html new file mode 100644 index 00000000..f6ebc4a6 --- /dev/null +++ b/site/layouts/_default/fsc.html @@ -0,0 +1,75 @@ +{{ define "title" }}{{ .Site.Title }} | FSC Schema Extension{{ end }} +{{/* override style for FSC layout */}} +{{ define "style" }} +{{ $style := resources.Get "css/fsc.min.css" | resources.Fingerprint }} + +{{ end }} +{{ define "main" }} + + +
+
+ + + +
+

FSC Schema Extension

+

This page provides a reference specification for the Forest Stewardship Council (FSC) schema extension.

+

Metadata Elements

+

+ {{/* 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. */}} + + + {{ range where (where site.RegularPages "Type" "terms") "Params.cluster" "==" "Fsc" }} + {{- if .Params.field -}} + {{ .Params.field }} + {{- end -}} + {{ end }} +

+ + {{ range where (where site.RegularPages "Type" "terms") "Params.cluster" "==" "Fsc" }} +
+ {{ .Render "term" }} +
+ {{ end }} + +

Download

+

The FSC schema extension is available for download in two formats:

+
+
+ {{ $fileCodeIcon := resources.Get "icons/file-earmark-code.svg" | resources.Fingerprint }} +

File icon with earmarkTurtle

+

Terse RDF Triple Language (TTL). Use this format when you need to validate metadata against ISEAL Core programmatically.

+ Download +
+
+ {{ $fileSpreadsheetIcon := resources.Get "icons/file-earmark-spreadsheet.svg" | resources.Fingerprint }} +

File icon with earmarkCSV

+

Comma-separated Values (CSV). Use this format when you just need a quick and easy offline reference.

+ Download +
+
+ +

Feedback

+

If you have questions/comments please contact ____.

+
+
+
+ +{{ end }} + +{{- /* vim: set ts=2 sw=2 et: */}} diff --git a/site/layouts/_default/home.html b/site/layouts/_default/home.html index 4cc0c1f5..bc2e50e8 100644 --- a/site/layouts/_default/home.html +++ b/site/layouts/_default/home.html @@ -147,6 +147,10 @@ +

Schema Extensions

+

Feedback

If you have questions/comments please contact ____.