Add shortcodes for customizing slides, markdown, HTML

This commit is contained in:
dzello
2018-04-30 18:47:20 -07:00
parent 05130b7ce6
commit f7427d4631
13 changed files with 217 additions and 133 deletions
+3
View File
@@ -38,6 +38,9 @@
<script type="text/javascript">
window.revealHugoDependencies = {
dependencies: [
{ src: '{{ $reveal_cdn }}/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: '{{ $reveal_cdn }}/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ $reveal_cdn }}/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ $reveal_cdn }}/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '{{ $reveal_cdn }}/plugin/zoom-js/zoom.js', async: true },
// the notes plugin can't run off the CDN b/c the HTML file isn't there
+1 -16
View File
@@ -1,18 +1,3 @@
{{ define "main" }}
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Find all pages with a type of reveal -->
{{ range union (slice .Page) (where .Data.Pages "Type" "home") }}
<!-- Don't process empty content files -->
{{ if ne (len .Content) 0 }}
<!-- Split the processed content by <hr /> tag -->
{{ range (split .Content "<hr />") }}
<!-- Output the content as safe -->
<section>{{ . | safeHTML }}</section>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
{{ partial "slides" (union (slice .Page) (where .Data.Pages "Type" "home")) }}
{{ end }}
+1 -16
View File
@@ -1,18 +1,3 @@
{{ define "main" }}
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Find all pages inside of this section -->
{{ range union (slice .Page) .Pages }}
<!-- Don't process empty content files -->
{{ if ne (len .Content) 0 }}
<!-- Split the processed content by <hr /> tag -->
{{ range (split .Content "<hr />") }}
<!-- Output the content as safe -->
<section>{{ . | safeHTML }}</section>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
{{ partial "slides" (union (slice .Page) .Pages) }}
{{ end }}