Skip to content

Commit

Permalink
fix: path to revealjs
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Apr 15, 2020
1 parent aaf1c73 commit 5a04800
Show file tree
Hide file tree
Showing 71 changed files with 21 additions and 18 deletions.
10 changes: 6 additions & 4 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
{{ partial "head/general" . }}

{{ with $.Params.slide }}
{{ $cssMain := absURL "/revealjs-v3.9.2/css/reveal.css" }}
{{ $cssTheme := absURL "/revealjs-v3.9.2/css/theme/white.css" }}
<link rel="stylesheet" href="{{ $cssMain }}">
<link rel="stylesheet" href="{{ $cssTheme }}">
<style>
{{ $cssMain := resources.Get "revealjs-v3.9.2/css/reveal.css" | toCSS | minify }}
{{ $cssMain.Content | safeCSS }}
{{ $cssTheme := resources.Get "revealjs-v3.9.2/css/theme/white.css" | toCSS | minify }}
{{ $cssTheme.Content | safeCSS }}
</style>
{{ else }}
<style>
{{ $bulmaCSS := resources.Get "scss/bulma.scss" | toCSS | minify }}
Expand Down
29 changes: 15 additions & 14 deletions layouts/partials/revealjs/js.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
{{ $revealjs := absURL "/revealjs-v3.9.2/js/reveal.js" }}
<script src="{{ $revealjs }}"></script>
{{ $revealjs := resources.Get "revealjs-v3.9.2/js/reveal.js" }}
{{ $revealjsHash := $revealjs | resources.Fingerprint "sha512" }}
<script src="{{ $revealjsHash.Permalink }}" integrity="{{ $revealjsHash.Data.Integrity }}"></script>

{{ $marked := absURL "/revealjs-v3.9.2/plugin/markdown/marked.js" }}
{{ $markdown := absURL "/revealjs-v3.9.2/plugin/markdown/markdown.js" }}
{{ $highlight := absURL "/revealjs-v3.9.2/plugin/highlight/highlight.js" }}
{{ $zoom := absURL "/revealjs-v3.9.2/plugin/zoom-js/zoom.js" }}
{{ $notes := absURL "/revealjs-v3.9.2/plugin/notes/notes.js" }}
{{ $math := absURL "/revealjs-v3.9.2/plugin/math/math.js" }}
{{ $marked := resources.Get "revealjs-v3.9.2/plugin/markdown/marked.js" }}
{{ $markdown := resources.Get "revealjs-v3.9.2/plugin/markdown/markdown.js" }}
{{ $highlight := resources.Get "revealjs-v3.9.2/plugin/highlight/highlight.js" }}
{{ $zoom := resources.Get "revealjs-v3.9.2/plugin/zoom-js/zoom.js" }}
{{ $notes := resources.Get "revealjs-v3.9.2/plugin/notes/notes.js" }}
{{ $math := resources.Get "revealjs-v3.9.2/plugin/math/math.js" }}
<script>
Reveal.initialize({
markdown: {
smartypants: true
},
dependencies: [
// Interpret Markdown in <section> elements
{ src: '{{ $marked }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ $markdown }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ $marked.Permalink }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ $markdown.Permalink }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },

// Syntax highlight for <code> elements
{ src: '{{ $highlight }}', async: true },
{ src: '{{ $highlight.Permalink }}', async: true },

// Zoom in and out with Alt+click
{ src: '{{ $zoom }}', async: true },
{ src: '{{ $zoom.Permalink }}', async: true },

// Speaker notes
{ src: '{{ $notes }}', async: true },
{ src: '{{ $notes.Permalink }}', async: true },

// MathJax
{ src: '{{ $math }}', async: true }
{ src: '{{ $math.Permalink }}', async: true }
]
});
</script>

0 comments on commit 5a04800

Please sign in to comment.