diff --git a/layouts/_default/baseof.reveal.html b/layouts/_default/baseof.reveal.html index 368bcea..1e3868b 100644 --- a/layouts/_default/baseof.reveal.html +++ b/layouts/_default/baseof.reveal.html @@ -12,15 +12,15 @@ - {{ $theme := or .Page.Params.reveal_hugo.theme .Site.Params.reveal_hugo.theme .Site.Data.reveal_hugo.defaults.theme "black" }} - {{ $custom_theme := or .Page.Params.reveal_hugo.custom_theme .Site.Params.reveal_hugo.custom_theme }} - {{ if $custom_theme }} + {{- $theme := or .Page.Params.reveal_hugo.theme .Site.Params.reveal_hugo.theme .Site.Data.reveal_hugo.defaults.theme "black" -}} + {{- $custom_theme := or .Page.Params.reveal_hugo.custom_theme .Site.Params.reveal_hugo.custom_theme -}} + {{- if $custom_theme -}} - {{ else }} + {{ else -}} - {{ end }} + {{- end -}} - {{ $highlight_theme := or .Page.Params.reveal_hugo.highlight_theme .Site.Params.reveal_hugo.highlight_theme .Site.Data.reveal_hugo.defaults.highlight_theme "default" }} + {{- $highlight_theme := or .Page.Params.reveal_hugo.highlight_theme .Site.Params.reveal_hugo.highlight_theme .Site.Data.reveal_hugo.defaults.highlight_theme "default" -}} @@ -73,7 +73,6 @@ var revealHugoPageParams = JSON.parse(document.getElementById('reveal-hugo-page-params').innerHTML); var revealHugoSiteParams = JSON.parse(document.getElementById('reveal-hugo-site-params').innerHTML); var revealHugoDefaults = JSON.parse(document.getElementById('reveal-hugo-defaults').innerHTML); - // See all options - https://github.com/hakimel/reveal.js#configuration var options = Object.assign({}, camelize(revealHugoDefaults), @@ -81,8 +80,8 @@ camelize(revealHugoPageParams), revealHugoDependencies); Reveal.initialize(options); - + {{ partial "reveal-hugo/body" . }} diff --git a/layouts/partials/reveal-hugo/slides.html b/layouts/partials/reveal-hugo/slides.html index 7b88fb7..e578882 100644 --- a/layouts/partials/reveal-hugo/slides.html +++ b/layouts/partials/reveal-hugo/slides.html @@ -6,17 +6,17 @@ {{- if ne (len .Content) 0 -}} - {{ $content := replace .Content "
\n\n
" "
" }} + {{- $content := replace .Content "
\n\n
" "
" -}} {{- range (split $content "
") -}} {{- if in . "data-noprocess" -}} - {{- . | safeHTML -}} - {{- else -}} -
- {{- . | safeHTML }} -
- {{ end -}} +{{- . | safeHTML -}} + {{- else }} +
+ {{- . | safeHTML }} +
+ {{- end -}} {{- end -}} {{- end -}} {{- end }} diff --git a/layouts/shortcodes/slide.html b/layouts/shortcodes/slide.html index 70eea53..4b85ebc 100644 --- a/layouts/shortcodes/slide.html +++ b/layouts/shortcodes/slide.html @@ -1,26 +1,23 @@ -{{ .Scratch.Set "slides" slice }} - -{{ if trim .Inner "\n" }} -{{ .Scratch.Add "slides" .Inner }} -{{ end }} - -{{ if .Get "content" }} - {{ $lookup := split (.Get "content") "." }} - {{ $html := index .Page.Site.Data (index $lookup 0) (index $lookup 1) | markdownify }} - {{ $slides := split $html "
" }} - {{ $scratch := .Scratch }} - {{ range $slides }} - {{ $scratch.Add "slides" . }} - {{ end }} -{{ end }} - -{{ $attributes := slice "background-color" "background-image" "background-size" "background-position" "background-repeat" "transition" "transition-speed" "background-iframe" "background-interactive" "background-video" "background-video-loop" "background-video-muted" }} -{{ $params := . }} -{{ range .Scratch.Get "slides" }} +{{- .Scratch.Set "slides" slice -}} +{{- if trim .Inner "\n" -}} +{{- .Scratch.Add "slides" .Inner -}} +{{- end -}} +{{- if .Get "content" -}} + {{- $lookup := split (.Get "content") "." -}} + {{- $html := index .Page.Site.Data (index $lookup 0) (index $lookup 1) | markdownify -}} + {{- $slides := split $html "
" -}} + {{- $scratch := .Scratch -}} + {{- range $slides -}} + {{- $scratch.Add "slides" . -}} + {{- end -}} +{{- end -}} +{{- $attributes := slice "background-color" "background-image" "background-size" "background-position" "background-repeat" "transition" "transition-speed" "background-iframe" "background-interactive" "background-video" "background-video-loop" "background-video-muted" -}} +{{- $params := . -}} +{{- range .Scratch.Get "slides" -}}
{{ . | safeHTML }}
-{{ end }} +{{- end -}} \ No newline at end of file