various fixes
This commit is contained in:
parent
1fd9adcb52
commit
46bd223627
29 changed files with 6093 additions and 152 deletions
33
layouts/shortcodes/button.html
Normal file
33
layouts/shortcodes/button.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue