7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-12-24 12:55:44 +00:00
web-ansol.org/themes/academic/layouts/partials/slides.html

29 lines
1.0 KiB
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
<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>