summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbutlerx2017-05-31 23:28:43 +0100
committerbutlerx2017-05-31 23:28:43 +0100
commite5834c077f203aa5c80f777f91e0bf650614241d (patch)
tree388ff3f8afb4a5e67f0fc1fe027ae960ed4eff23
parent0a6793747cf1f40467bcf3e562d358173fffcad1 (diff)
add the ability to set slide theme in slide options
Diffstat (limited to '')
-rwxr-xr-xlib/response.js1
-rw-r--r--public/views/slide.ejs4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/response.js b/lib/response.js
index a9abd1d4..fec6c561 100755
--- a/lib/response.js
+++ b/lib/response.js
@@ -574,6 +574,7 @@ function showPublishSlide (req, res, next) {
updatetime: updatetime,
url: origin,
body: markdown,
+ theme: meta.slideOptions.theme,
meta: JSON.stringify(extracted.meta),
useCDN: config.usecdn,
owner: note.owner ? note.owner.id : null,
diff --git a/public/views/slide.ejs b/public/views/slide.ejs
index 26c38bba..7ff5016e 100644
--- a/public/views/slide.ejs
+++ b/public/views/slide.ejs
@@ -30,7 +30,11 @@
<% } %>
<!-- For reveal.js theme -->
+ <% if(typeof theme !== 'undefined' && theme) { %>
+ <link rel="stylesheet" href="<%- url %>/build/reveal.js/css/theme/<%= theme %>.css" id="theme">
+ <% } else { %>
<link rel="stylesheet" href="<%- url %>/build/reveal.js/css/theme/black.css" id="theme">
+ <% } %>
<!-- For syntax highlighting -->
<link rel="stylesheet" href="<%- url %>/build/reveal.js/lib/css/zenburn.css">
<!-- For overwrite reveal.js -->