2018-07-22 03:54:47 -05:00
|
|
|
{{- .Scratch.Set "slides" slice -}}
|
2018-07-22 04:50:06 -05:00
|
|
|
{{- if len .Inner -}}
|
|
|
|
{{- .Scratch.Add "slides" .Inner -}}
|
2018-07-22 03:54:47 -05:00
|
|
|
{{- end -}}
|
2018-07-22 04:50:06 -05:00
|
|
|
{{- $content := .Get "content" -}}
|
|
|
|
{{- if $content -}}
|
|
|
|
{{- $lookup := split $content "." }}
|
2018-07-22 03:54:47 -05: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 11:25:48 -05:00
|
|
|
{{- $noPrefix := slice "id" -}}
|
|
|
|
{{- $noOutput := slice "content" -}}
|
2018-07-22 04:50:06 -05:00
|
|
|
{{- range .Scratch.Get "slides" }}
|
|
|
|
<section data-noprocess data-shortcode-slide
|
2018-07-22 11:25:48 -05: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 03:53:55 -05:00
|
|
|
{{- end -}}>
|
|
|
|
{{ . | safeHTML }}
|
|
|
|
</section>
|
2018-07-22 03:54:47 -05:00
|
|
|
{{- end -}}
|