Skip to content

Commit 47d5efb

Browse files
committed
Fix slide resource path and style load orders to avoid conflicts
1 parent ead48e4 commit 47d5efb

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

public/js/slide.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function extend() {
3636

3737
// Optional libraries used to extend on reveal.js
3838
var deps = [{
39-
src: serverurl + '/vendor/reveal.js/lib/js/classList.js',
39+
src: serverurl + '/build/reveal.js/lib/js/classList.js',
4040
condition: function() {
4141
return !document.body.classList;
4242
}
@@ -53,7 +53,7 @@ var deps = [{
5353
$(".slides").show();
5454
}
5555
}, {
56-
src: serverurl + '/vendor/reveal.js/plugin/notes/notes.js',
56+
src: serverurl + '/build/reveal.js/plugin/notes/notes.js',
5757
async: true,
5858
condition: function() {
5959
return !!document.body.classList;

public/views/slide.ejs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<title><%= title %></title>
1515
<link rel="icon" type="image/png" href="<%- url %>/favicon.png">
1616
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
17+
18+
<!-- For reveal.js -->
19+
<link rel="stylesheet" href="<%- url %>/build/reveal.js/css/reveal.css">
20+
1721
<% if(useCDN) { %>
1822
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
1923
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
@@ -25,11 +29,10 @@
2529
<%- include build/slide-pack-header %>
2630
<% } %>
2731

28-
<!-- For reveal.js -->
29-
<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/reveal.css">
30-
<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/theme/black.css" id="theme">
32+
<!-- For reveal.js theme -->
33+
<link rel="stylesheet" href="<%- url %>/build/reveal.js/css/theme/black.css" id="theme">
3134
<!-- For syntax highlighting -->
32-
<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/lib/css/zenburn.css">
35+
<link rel="stylesheet" href="<%- url %>/build/reveal.js/lib/css/zenburn.css">
3336
<!-- For overwrite reveal.js -->
3437
<link rel="stylesheet" href="<%- url %>/css/slide.css">
3538

@@ -38,7 +41,7 @@
3841
var link = document.createElement( 'link' );
3942
link.rel = 'stylesheet';
4043
link.type = 'text/css';
41-
link.href = '<%- url %>/vendor/reveal.js/' + (window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css');
44+
link.href = '<%- url %>/build/reveal.js/' + (window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css');
4245
document.getElementsByTagName( 'head' )[0].appendChild( link );
4346
</script>
4447

webpackBaseConfig.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ module.exports = {
136136
dot: false
137137
},
138138
to: 'emojify.js/'
139+
},
140+
{
141+
context: path.join(__dirname, 'node_modules/reveal.js'),
142+
from: {
143+
glob: '**/*',
144+
dot: false
145+
},
146+
to: 'reveal.js/'
139147
}
140148
])
141149
],

0 commit comments

Comments
 (0)