Move print button to plugin

parent bc6cf81a
......@@ -15,16 +15,19 @@
<!-- POuL theme for reveal.js -->
<link href="./poul/css/poul.css" id="theme" rel="stylesheet"/>
<!-- print-button plugin style -->
<link href="./reveal.js/plugin/print-button/style.css" rel="stylesheet"/>
<!-- Code syntax highlighting -->
<link href="./reveal.js/lib/css_highlight/hopscotch.css" rel="stylesheet"/>
<!-- Printing and PDF exports -->
<script>
let link = document.createElement('link');
link.rel = 'stylesheet';
link.href = window.location.search.match(/print-pdf/gi)
? './poul/css/print/pdf.css' : './poul/css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
let link = document.createElement('link');
link.rel = 'stylesheet';
link.href = window.location.search.match(/print-pdf/gi)
? './poul/css/print/pdf.css' : './poul/css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<script src="./reveal.js/lib/js/head.min.js"></script>
......@@ -32,63 +35,66 @@
<!-- Init Reveal.js -->
<script>
document.addEventListener("DOMContentLoaded", () => {
Reveal.initialize({
controls: false,
slideNumber: true,
history: true,
transition: 'none',
pdfMaxPagesPerSlide: 1,
pdfSeparateFragments: false,
display: 'flex',
markdown: {
smartypants: true,
},
keyboard: {
38: 'prev', // Up arrow
40: 'next' // Down arrow
},
math: {
mathjax: './reveal.js/lib/js/mathjax/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
},
dependencies: [
{
src: './reveal.js/plugin/external/external.js',
condition: function () {
return !!document.querySelector('[data-external],[data-external-replace]');
}
},
{
src: './reveal.js/plugin/markdown/marked.js',
condition: function () {
return !!document.querySelector('[data-markdown]');
}
},
{
src: './reveal.js/plugin/markdown/markdown.js',
condition: function () {
return !!document.querySelector('[data-markdown]');
}
},
{
src: './reveal.js/plugin/highlight/highlight.js',
async: true,
callback: function () {
hljs.initHighlightingOnLoad();
}
},
{
src: './reveal.js/plugin/notes/notes.js',
async: true
},
{
src: './reveal.js/plugin/math/math.js',
async: true
}
]
});
});
document.addEventListener("DOMContentLoaded", () => {
Reveal.initialize({
controls: false,
slideNumber: true,
history: true,
transition: 'none',
pdfMaxPagesPerSlide: 1,
pdfSeparateFragments: false,
display: 'flex',
markdown: {
smartypants: true,
},
keyboard: {
38: 'prev', // Up arrow
40: 'next' // Down arrow
},
math: {
mathjax: './reveal.js/lib/js/mathjax/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
},
dependencies: [
{
src: './reveal.js/plugin/external/external.js',
condition: function () {
return !!document.querySelector('[data-external],[data-external-replace]');
}
},
{
src: './reveal.js/plugin/markdown/marked.js',
condition: function () {
return !!document.querySelector('[data-markdown]');
}
},
{
src: './reveal.js/plugin/markdown/markdown.js',
condition: function () {
return !!document.querySelector('[data-markdown]');
}
},
{
src: './reveal.js/plugin/highlight/highlight.js',
async: true,
callback: function () {
hljs.initHighlightingOnLoad();
}
},
{
src: './reveal.js/plugin/notes/notes.js',
async: true
},
{
src: './reveal.js/plugin/math/math.js',
async: true
},
{
src: './reveal.js/plugin/print-button/print-button.js'
}
]
});
});
</script>
</head>
......@@ -96,13 +102,11 @@
<div class="slides">
<section data-external-replace="./slides/intro.html"></section>
<section data-charset="utf-8"
data-markdown="./slides/content.md"
data-separator="^\r?\n---\r?\n$"
data-separator-notes="^Notes:"
data-separator-vertical="^\r?\n----\r?\n$">
data-markdown="./slides/content.md"
data-separator="^\r?\n---\r?\n$"
data-separator-notes="^Notes:"
data-separator-vertical="^\r?\n----\r?\n$">
</section>
<section data-external-replace="./slides/outro.html"></section>
</div>
</div>
<a class="printable-version" href="?print-pdf" title="Versione Stampabile"></a>
</div>
\ No newline at end of file
......@@ -410,24 +410,4 @@ body {
.reveal code.input.root::before, .reveal pre.input.root > code::before {
content: "#";
}
/*********************************************
* OTHER
*********************************************/
.printable-version {
position: absolute;
bottom: 3vh;
left: 3vh;
height: 30px;
width: 30px;
display: block;
z-index: 100;
opacity: 0.2;
transition: opacity 0.3s;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23A2A2A2'%3E%3Cpath d='M11.96 50h28.09V32H11.96v18zm6.854-13.003h14.189v2H18.814v-2zm0 6h14.189v2H18.814v-2zM16 20h20v-.003h1.003v-2H36V2H16v15.997h-.997v2H16z'/%3E%3Cpath d='M43.03 10H38v5.997h1.003v6H38V22H14v-.003h-.997v-6H14V10H8.97C5.13 10 2 13.12 2 16.97V40h7.96V30h32.09v10H50V16.97A6.97 6.97 0 0043.03 10z'/%3E%3C/g%3E%3C/svg%3E");
}
.printable-version:hover {
opacity: 1;
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment