Skip to content

Commit e5834c0

Browse files
committed
add the ability to set slide theme in slide options
1 parent 0a67937 commit e5834c0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/response.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ function showPublishSlide (req, res, next) {
574574
updatetime: updatetime,
575575
url: origin,
576576
body: markdown,
577+
theme: meta.slideOptions.theme,
577578
meta: JSON.stringify(extracted.meta),
578579
useCDN: config.usecdn,
579580
owner: note.owner ? note.owner.id : null,

public/views/slide.ejs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
<% } %>
3131

3232
<!-- For reveal.js theme -->
33+
<% if(typeof theme !== 'undefined' && theme) { %>
34+
<link rel="stylesheet" href="<%- url %>/build/reveal.js/css/theme/<%= theme %>.css" id="theme">
35+
<% } else { %>
3336
<link rel="stylesheet" href="<%- url %>/build/reveal.js/css/theme/black.css" id="theme">
37+
<% } %>
3438
<!-- For syntax highlighting -->
3539
<link rel="stylesheet" href="<%- url %>/build/reveal.js/lib/css/zenburn.css">
3640
<!-- For overwrite reveal.js -->

0 commit comments

Comments
 (0)