2018-07-22 10:54:47 +02:00
|
|
|
{{- .Scratch.Set "slides" slice -}}
|
2018-07-22 11:50:06 +02:00
|
|
|
{{- if len .Inner -}}
|
|
|
|
{{- .Scratch.Add "slides" .Inner -}}
|
2018-07-22 10:54:47 +02:00
|
|
|
{{- end -}}
|
2018-07-22 11:50:06 +02:00
|
|
|
{{- $content := .Get "content" -}}
|
|
|
|
{{- if $content -}}
|
|
|
|
{{- $lookup := split $content "." }}
|
2018-07-22 10:54:47 +02:00
|
|
|
{{- $html := index .Page.Site.Data (index $lookup 0) (index $lookup 1) | markdownify -}}
|
|
|
|
{{- $slides := split $html "<hr />" -}}
|
|
|
|
{{- $scratch := .Scratch -}}
|
|
|
|
{{- range $slides -}}
|
|
|
|
{{- $scratch.Add "slides" . -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- $params := . -}}
|
2018-07-22 18:25:48 +02:00
|
|
|
{{- $noPrefix := slice "id" -}}
|
|
|
|
{{- $noOutput := slice "content" -}}
|
2018-07-22 11:50:06 +02:00
|
|
|
{{- range .Scratch.Get "slides" }}
|
|
|
|
<section data-noprocess data-shortcode-slide
|
2018-07-22 18:25:48 +02:00
|
|
|
{{- range $key, $value := $.Params -}}
|
|
|
|
{{- if not (in $noOutput $key) -}}
|
|
|
|
{{- $attrName := cond (in $noPrefix $key) $key (delimit (slice "data" $key) "-") }}
|
|
|
|
{{ $attrName | safeHTMLAttr }}="{{ $value }}"
|
|
|
|
{{- end -}}
|
2018-07-21 10:53:55 +02:00
|
|
|
{{- end -}}>
|
|
|
|
{{ . | safeHTML }}
|
|
|
|
</section>
|
2018-07-22 10:54:47 +02:00
|
|
|
{{- end -}}
|