Write styles and templates for a more generic tag/value component. Use this component for the taxonomy lists, draft tag, and page dates in the summary template.
13 lines
428 B
HTML
13 lines
428 B
HTML
{{- /*
|
|
Outputs a DRAFT tag for the page.
|
|
|
|
@context {Page} .page The current page
|
|
@context {String} .class A list of additional classes to apply to the top-level element
|
|
|
|
*/ -}}
|
|
|
|
{{- $page := .page -}}
|
|
<div class="{{ with .class }}{{ . }} {{ end }}tag tag--draft" data-name="draft">
|
|
<span class="tag__name">{{ T "draft" }}</span>
|
|
<span class="tag__value">{{ T (cond $page.Draft "draftYes" "draftNo") }}</li>
|
|
</div>
|