Add title slide background image

This commit is contained in:
Yujie Wen 2015-02-04 00:36:54 +08:00
parent c3fa10406f
commit 4a778f8f1c
2 changed files with 25 additions and 4 deletions

View File

@ -259,6 +259,15 @@ $ git clone https://github.com/yjwen/org-reveal.git
:END:
#+END_SRC
*** Title Slide Background Image
To set the title slide's background image, please specify the
following options:
* =REVEAL_TITLE_SLIDE_BACKGROUND=: A URL to the background image.
* =REVEAL_TITLE_SLIDE_BACKGROUND_SIZE=: HTML size specification, e.g. ~200px~.
* =REVEAL_TITLE_SLIDE_BACKGROUND_REPEAT=: set to ~repeat~ to repeat the image.
** Slide Size
Reveal.js scales slides to best fit the display resolution, but you can

View File

@ -64,6 +64,10 @@
(:reveal-hlevel "REVEAL_HLEVEL" nil nil t)
(:reveal-title-slide nil "reveal_title_slide" org-reveal-title-slide t)
(:reveal-title-slide-template "REVEAL_TITLE_SLIDE_TEMPLATE" nil org-reveal-title-slide-template t)
(:reveal-title-slide-background "REVEAL_TITLE_SLIDE_BACKGROUND" nil nil t)
(:reveal-title-slide-background-size "REVEAL_TITLE_SLIDE_BACKGROUND_SIZE" nil nil t)
(:reveal-title-slide-background-repeat "REVEAL_TITLE_SLIDE_BACKGROUND_REPEAT" nil nil t)
(:reveal-title-slide-background-repeat "REVEAL_TITLE_SLIDE_BACKGROUND_TRANSITION" nil nil t)
(:reveal-mathjax nil "reveal_mathjax" org-reveal-mathjax t)
(:reveal-mathjax-url "REVEAL_MATHJAX_URL" nil org-reveal-mathjax-url t)
(:reveal-preamble "REVEAL_PREAMBLE" nil org-reveal-preamble t)
@ -812,10 +816,18 @@ info is a plist holding export options."
"<div class=\"reveal\">
<div class=\"slides\">\n"
(if (plist-get info :reveal-title-slide)
(concat
"<section>\n"
(format-spec (plist-get info :reveal-title-slide-template) (org-html-format-spec info))
"\n</section>\n")
(concat
(format "<section id=\"sec-title-slide\"%s%s%s%s>\n"
(if-format " data-background=\"%s\""
(plist-get info :reveal-title-slide-background))
(if-format " data-background-size=\"%s\""
(plist-get info :reveal-title-slide-background-size))
(if-format " data-background-repeat=\"%s\""
(plist-get info :reveal-title-slide-background-repeat))
(if-format " data-background-transition=\"%s\""
(plist-get info :reveal-title-slide-background-transition)))
(format-spec (plist-get info :reveal-title-slide-template) (org-html-format-spec info))
"\n</section>\n")
"")
contents
"</div>