mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-06-06 05:38:26 +02:00
Add shortcodes for customizing slides, markdown, HTML
This commit is contained in:
@@ -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,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,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 }}
|
||||
|
||||
Reference in New Issue
Block a user