summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-29 23:35:10 +0800
committerWu Cheng-Han2016-10-29 23:35:10 +0800
commit70d2fa388ec2b035102c8a2218cdaab69f6babdb (patch)
treeaec64633c315a85eda8bc162b50e9879c5828f29
parenta8bce53c476e7ddab8fccfd0cacd1bc340229a6e (diff)
Fix slide export pdf styles not applied issue and add shiv and shim for IE
Diffstat (limited to '')
-rw-r--r--public/css/slide.css12
-rw-r--r--public/views/slide.ejs20
2 files changed, 28 insertions, 4 deletions
diff --git a/public/css/slide.css b/public/css/slide.css
index 3f79084b..c590c9ec 100644
--- a/public/css/slide.css
+++ b/public/css/slide.css
@@ -309,3 +309,15 @@ html, body {
.reveal .controls {
position: absolute;
}
+
+.print-pdf .container {
+ position: relative;
+}
+
+.print-pdf .container.hidescrollbar {
+ right: 0;
+}
+
+.print-pdf .footer {
+ display: none;
+} \ No newline at end of file
diff --git a/public/views/slide.ejs b/public/views/slide.ejs
index 771c7ad6..1fdb7f8f 100644
--- a/public/views/slide.ejs
+++ b/public/views/slide.ejs
@@ -40,10 +40,22 @@
<link rel="stylesheet" href="<%- url %>/css/site.css">
<link rel="stylesheet" href="<%- url %>/css/slide.css">
- <!-- If the query includes 'print-pdf', use the PDF print sheet -->
- <script>
- document.write( '<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
- </script>
+ <!-- Printing and PDF exports -->
+ <script>
+ var link = document.createElement( 'link' );
+ link.rel = 'stylesheet';
+ link.type = 'text/css';
+ link.href = '<%- url %>/vendor/reveal.js/' + (window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css');
+ document.getElementsByTagName( 'head' )[0].appendChild( link );
+ </script>
+
+ <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+ <!--[if lt IE 9]>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g=" crossorigin="anonymous"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js" integrity="sha256-g6iAfvZp+nDQ2TdTR/VVKJf3bGro4ub5fvWSWVRi2NE=" crossorigin="anonymous"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.9/es5-shim.min.js" integrity="sha256-8E4Is26QH0bD52WoQpcB+R/tcWQtpzlCojrybUd7Mxo=" crossorigin="anonymous"></script>
+ <![endif]-->
</head>
<body>
<div class="container">