Commit 974ca48d authored by Henrik Tramberend's avatar Henrik Tramberend
Browse files

Autoprint with print-pdf

parent 8596f1a0
......@@ -575,8 +575,13 @@ div.box {
.reveal section div.multi-column-row {
display:flex;
flex-flow: row nowrap;
align-items: flex;
}
.reveal section div.multi-column-row-3 > div.column-1 {padding-right:0.4em;}
.reveal section div.multi-column-row-3 > div.column-2 {padding-right:0.4em;padding-left:0.4em;}
.reveal section div.multi-column-row-3 > div.column-3 {padding-left:0.4em;}
.reveal section div.multi-column-row > div.column {flex: 1 1 0%;}
.reveal section div.multi-column-row > div.column[grow="1"] {flex-grow:1;}
.reveal section div.multi-column-row > div.column[grow="2"] {flex-grow:2;}
......
......@@ -40,8 +40,14 @@ $endfor$
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '$revealjs-url$/css/print/pdf.css' : '$revealjs-url$/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
if (window.location.search.match( /print-pdf/gi )) {
link.href = '$revealjs-url$/css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
window.print();
} else {
link.href = '$revealjs-url$/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
}
</script>
<!--[if lt IE 9]>
<script src="$revealjs-url$/lib/js/html5shiv.js"></script>
......
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