2018-07-21 10:53:55 +02:00
|
|
|
{{ .Scratch.Set "slides" slice }}
|
|
|
|
|
|
|
|
{{ if trim .Inner "\n" }}
|
|
|
|
{{ .Scratch.Add "slides" .Inner }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if .Get "content" }}
|
|
|
|
{{ $lookup := split (.Get "content") "." }}
|
|
|
|
{{ $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 }}
|
|
|
|
|
2018-05-01 08:02:09 +02:00
|
|
|
{{ $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" }}
|
2018-05-01 03:47:20 +02:00
|
|
|
{{ $params := . }}
|
2018-07-21 10:53:55 +02:00
|
|
|
{{ range .Scratch.Get "slides" }}
|
2018-05-01 03:47:20 +02:00
|
|
|
<section data-noprocess
|
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>
|
|
|
|
{{ end }}
|