mirror of https://github.com/status-im/codimd.git
Fix slide resource path and style load orders to avoid conflicts
This commit is contained in:
parent
ead48e45e0
commit
47d5efb29e
|
@ -36,7 +36,7 @@ function extend() {
|
||||||
|
|
||||||
// Optional libraries used to extend on reveal.js
|
// Optional libraries used to extend on reveal.js
|
||||||
var deps = [{
|
var deps = [{
|
||||||
src: serverurl + '/vendor/reveal.js/lib/js/classList.js',
|
src: serverurl + '/build/reveal.js/lib/js/classList.js',
|
||||||
condition: function() {
|
condition: function() {
|
||||||
return !document.body.classList;
|
return !document.body.classList;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ var deps = [{
|
||||||
$(".slides").show();
|
$(".slides").show();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
src: serverurl + '/vendor/reveal.js/plugin/notes/notes.js',
|
src: serverurl + '/build/reveal.js/plugin/notes/notes.js',
|
||||||
async: true,
|
async: true,
|
||||||
condition: function() {
|
condition: function() {
|
||||||
return !!document.body.classList;
|
return !!document.body.classList;
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
<title><%= title %></title>
|
<title><%= title %></title>
|
||||||
<link rel="icon" type="image/png" href="<%- url %>/favicon.png">
|
<link rel="icon" type="image/png" href="<%- url %>/favicon.png">
|
||||||
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
|
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
|
||||||
|
|
||||||
|
<!-- For reveal.js -->
|
||||||
|
<link rel="stylesheet" href="<%- url %>/build/reveal.js/css/reveal.css">
|
||||||
|
|
||||||
<% if(useCDN) { %>
|
<% if(useCDN) { %>
|
||||||
<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" />
|
<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" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
|
<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 @@
|
||||||
<%- include build/slide-pack-header %>
|
<%- include build/slide-pack-header %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<!-- For reveal.js -->
|
<!-- For reveal.js theme -->
|
||||||
<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/reveal.css">
|
<link rel="stylesheet" href="<%- url %>/build/reveal.js/css/theme/black.css" id="theme">
|
||||||
<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/theme/black.css" id="theme">
|
|
||||||
<!-- For syntax highlighting -->
|
<!-- For syntax highlighting -->
|
||||||
<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/lib/css/zenburn.css">
|
<link rel="stylesheet" href="<%- url %>/build/reveal.js/lib/css/zenburn.css">
|
||||||
<!-- For overwrite reveal.js -->
|
<!-- For overwrite reveal.js -->
|
||||||
<link rel="stylesheet" href="<%- url %>/css/slide.css">
|
<link rel="stylesheet" href="<%- url %>/css/slide.css">
|
||||||
|
|
||||||
|
@ -38,7 +41,7 @@
|
||||||
var link = document.createElement( 'link' );
|
var link = document.createElement( 'link' );
|
||||||
link.rel = 'stylesheet';
|
link.rel = 'stylesheet';
|
||||||
link.type = 'text/css';
|
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');
|
link.href = '<%- url %>/build/reveal.js/' + (window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css');
|
||||||
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,14 @@ module.exports = {
|
||||||
dot: false
|
dot: false
|
||||||
},
|
},
|
||||||
to: 'emojify.js/'
|
to: 'emojify.js/'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
context: path.join(__dirname, 'node_modules/reveal.js'),
|
||||||
|
from: {
|
||||||
|
glob: '**/*',
|
||||||
|
dot: false
|
||||||
|
},
|
||||||
|
to: 'reveal.js/'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue