portfolios_pgp/themes/academia-hugo/layouts/partials/slides.html

26 lines
745 B
HTML
Raw Permalink Normal View History

2021-12-31 12:44:26 +01: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. */}}
{{ $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>