mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
66 lines
3.0 KiB
HTML
66 lines
3.0 KiB
HTML
<iframe id="slideFrame" src="{{"none.html" | relURL }}" style="width:{{with .Get "width"}}{{.}}{{else}}100%{{end}};height:{{with .Get "height"}}{{.}}{{else}}30em{{end}}; border:0px"></iframe>
|
|
|
|
<div id="slideContent">
|
|
<link rel="stylesheet" href="{{"revealjs/css/reveal.css"|relURL}}">
|
|
<link rel="stylesheet" href="{{"revealjs/css/theme/"|relURL}}{{with .Get "theme"}}{{.|safeHTML}}{{else}}league{{end}}.css" id="theme">
|
|
<link rel="stylesheet" href="{{"revealjs/lib/css/zenburn.css"|relURL}}">
|
|
|
|
<div class="reveal">
|
|
<div class="slides">
|
|
<section data-markdown
|
|
data-separator="^---"
|
|
data-separator-vertical="^___"
|
|
data-separator-notes="^Note:"
|
|
data-charset="utf8">
|
|
{{ .Inner | safeHTML}}
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<script async src="{{"/revealjs/lib/js/head.min.js"|relURL}}"></script>
|
|
<script async src="{{"/revealjs/js/reveal.js"|relURL}}"></script>
|
|
<script>
|
|
function initSlides() {
|
|
Reveal.initialize({
|
|
embedded : true,
|
|
|
|
controls : {{with .Get "controls"}}{{.|safeHTML}}{{else}}false{{end}},
|
|
center: {{with .Get "center"}}{{.|safeHTML}}{{else}}true{{end}} ,
|
|
history: {{with .Get "history"}}{{.|safeHTML}}{{else}}false{{end}} ,
|
|
progress: {{with .Get "progress"}}{{.|safeHTML}}{{else}}false{{end}} ,
|
|
transition: {{with .Get "transition"}}{{.}}{{else}}"concave"{{end}},
|
|
|
|
// theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
|
|
// Optional libraries used to extend on reveal.js
|
|
dependencies: [
|
|
{ src: '{{"revealjs/lib/js/classList.js"|relURL}}"', condition: function() { return !document.body.classList; } },
|
|
{ src: '{{"revealjs/plugin/markdown/marked.js"|relURL}}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
|
{ src: '{{"revealjs/plugin/markdown/markdown.js"|relURL}}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
|
{ src: '{{"revealjs/plugin/highlight/highlight.js"|relURL}}', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
|
{ src: '{{"revealjs/plugin/zoom-js/zoom.js"|relURL}}', async: true, condition: function() { return !!document.body.classList; } },
|
|
{ src: '{{"revealjs/plugin/notes/notes.js"|relURL}}', async: true, condition: function() { return !!document.body.classList; } }
|
|
]
|
|
});
|
|
}
|
|
</script>
|
|
</div>
|
|
<li><a href="#" onclick="slideFullScreen();">See it fullscreen</a></li>
|
|
|
|
<script type="text/javascript">
|
|
var toto = document.getElementById('slideContent').innerHTML
|
|
document.getElementById('slideFrame').contentWindow.document.write(document.getElementById('slideContent').innerHTML);
|
|
document.getElementById('slideContent').remove();
|
|
document.addEventListener("DOMContentLoaded",function(){
|
|
setTimeout(function () {
|
|
document.getElementById('slideFrame').contentWindow.initSlides() ;
|
|
}, 2000);
|
|
});
|
|
|
|
|
|
function slideFullScreen() {
|
|
document.open();
|
|
document.write(toto);
|
|
document.close();
|
|
initSlides()
|
|
}
|
|
</script> |