mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-06-07 14:03:33 +02:00
Document usage of class slide attribute and don't pfx it
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $params := . -}}
|
||||
{{- $noPrefix := slice "id" -}}
|
||||
{{- $noPrefix := slice "id" "class" -}}
|
||||
{{- $noOutput := slice "content" "template" -}}
|
||||
{{- range $scratch.Get "slides" }}
|
||||
<section data-noprocess data-shortcode-slide
|
||||
@@ -28,7 +28,8 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range $key, $value := ($scratch.Get "template") }}
|
||||
data-{{ $key | safeHTMLAttr }}="{{ $value }}"
|
||||
{{- $attrName := cond (in $noPrefix $key) $key (delimit (slice "data" $key) "-") }}
|
||||
{{ $attrName | safeHTMLAttr }}="{{ $value }}"
|
||||
{{- end }}
|
||||
data-template="{{ $template }}"
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user