hook_test/layouts/partials/slides.html
2021-12-31 12:44:26 +01:00

26 lines
745 B
HTML

<div class="reveal">
<div class="slides">
{{/* Loop over each page. */}}
{{ range . }}
{{ if ne (len .Content) 0 }}
{{/* Must remove `<hr />` generated by Blackfriday footnotes as conflicts with slide delimiter. */}}
{{ $content := replace .Content "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" }}
{{/* Let `<hr />` delimit slides. */}}
{{ range (split $content "<hr />") }}
{{/* Each `<section>` defines a new slide. */}}
{{/* Only begin new slide `<section>` if not already added by custom `slide` shortcode. */}}
{{ if not (in . "data-noprocess") }}
<section>
{{ end }}
{{ . | safeHTML }}
</section>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>