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 -}}
|
|
|
|
{{- $attributes := slice "background-color" "background-image" "background-size" "background-position" "background-repeat" "transition" "transition-speed" "background-iframe" "background-interactive" "background-video" "background-video-loop" "background-video-muted" -}}
|
|
|
|
{{- $params := . -}}
|
2018-07-22 11:50:06 +02:00
|
|
|
{{- range .Scratch.Get "slides" }}
|
|
|
|
<section data-noprocess data-shortcode-slide
|
2018-05-01 08:02:09 +02:00
|
|
|
{{- range $attribute := $attributes -}}
|
|
|
|
{{- with $params.Get $attribute }} data-{{ $attribute | safeHTMLAttr }}="{{ . }}"{{ end -}}
|
2018-07-21 10:53:55 +02:00
|
|
|
{{- end -}}>
|
|
|
|
{{ . | safeHTML }}
|
|
|
|
</section>
|
2018-07-22 10:54:47 +02:00
|
|
|
{{- end -}}
|