7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-10-18 14:03:08 +00:00
web-ansol.org/themes/academic/layouts/partials/slides.html
2020-06-11 12:46:16 +01:00

29 lines
1.0 KiB
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. */}}
{{/* Commented out workaround as Blackfriday has been superseded by Goldmark in Hugo 0.60. */}}
{{/* TODO: reintroduce a similar workaround if Goldmark requires it. */}}
{{/* $content := replace .Content "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" */}}
{{ $content := .Content }}{{/* For Goldmark. */}}
{{/* Let `---` delimit slides. In Goldmark, that is `<hr>`. Alternatively, for Blackfriday, use `<hr />`. */}}
{{ 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>