various fixes

This commit is contained in:
Ben Goldsworthy 2024-07-23 10:08:36 +02:00
parent 1fd9adcb52
commit 46bd223627
Signed by: Rumperuu
SSH key fingerprint: SHA256:e5XfzNOr9UvWpEzyLfw0GtTMZWIFh3NmxH+/qQIi3xE
29 changed files with 6093 additions and 152 deletions

View file

@ -0,0 +1,33 @@
{{- /*
Renders a button, or no-JS fallback.
@params id ID for button.
@params label Label text for button.
@params text Text for button.
*/ -}}
<!-- Validation -->
{{- if ( not ( isset .Params "id" ) ) -}}
{{- errorf "No ID set for button (%q)" .Page.File.Path -}}
{{- end -}}
{{- if ( not ( isset .Params "label" ) ) -}}
{{- errorf "No label set for button '%q' (%q)" .Params.id .Page.File.Path -}}
{{- end -}}
{{- if ( not ( isset .Params "text" ) ) -}}
{{- errorf "No text set for button '%q' (%q)" .Params.id .Page.File.Path -}}
{{- end -}}
<!-- Rendering -->
<noscript>You must have JavaScript enabled to interact with this button.</noscript>
<label class="label label--button">
{{- .Params.label -}}:
<button id="{{- .Params.id -}}" class="button">
{{- .Params.text -}}
</button>
</label>