mirror of https://github.com/yjwen/org-reveal.git
Wrap header/footer with division. Add document about header/footer.
This commit is contained in:
parent
c1aa1506b9
commit
d77969eda7
|
@ -284,7 +284,13 @@ $ git clone https://github.com/yjwen/org-reveal.git
|
|||
ratio.
|
||||
|
||||
** Slide Numbering
|
||||
Activate slide numbers by setting =#+REVEAL-SLIDE-NUMBER:= to =t= (true).
|
||||
Activate slide numbers by setting =#+REVEAL_SLIDE_NUMBER:= to =t= (true).
|
||||
|
||||
** Slide Header/Footer
|
||||
Specify Slide header/footer by =#+REVEAL_SLIDE_HEADER:= and
|
||||
=#+REVEAL_SLIDE_FOOTER:=. The option content will be put into
|
||||
divisions of class =slide-header= and =slide-footer=, so you can
|
||||
control their appearance in custom CSS file(see [[Extra Stylesheets]]).
|
||||
|
||||
** Fragmented Contents
|
||||
|
||||
|
|
10
ox-reveal.el
10
ox-reveal.el
|
@ -342,13 +342,15 @@ holding contextual information."
|
|||
;; This is a deep sub-tree: export it as in ox-html.
|
||||
(org-html-headline headline contents info)
|
||||
;; Standard headline. Export it as a slide
|
||||
(let ((level (org-export-get-relative-level headline info))
|
||||
(let* ((level (org-export-get-relative-level headline info))
|
||||
(preferred-id (or (org-element-property :CUSTOM_ID headline)
|
||||
(org-export-get-headline-id headline info)
|
||||
(org-element-property :ID headline)))
|
||||
(hlevel (org-reveal--get-hlevel info))
|
||||
(header (plist-get info :reveal-slide-header))
|
||||
(header-div (when header (format "<div class=\"slide-header\">%s</div>\n" header)))
|
||||
(footer (plist-get info :reveal-slide-footer))
|
||||
(footer-div (when footer (format "<div class=\"slide-footer\">%s</div>\n" footer)))
|
||||
(first-sibling (org-export-first-sibling-p headline info))
|
||||
(last-sibling (org-export-last-sibling-p headline info)))
|
||||
(concat
|
||||
|
@ -356,7 +358,7 @@ holding contextual information."
|
|||
;; Not the first heading. Close previou slide.
|
||||
(concat
|
||||
;; Slide footer if any
|
||||
(if footer (format "%s\n" footer))
|
||||
footer-div
|
||||
;; Close previous slide
|
||||
"</section>\n"
|
||||
(if (<= level hlevel)
|
||||
|
@ -379,7 +381,7 @@ holding contextual information."
|
|||
(let ((extra-attrs (org-element-property :REVEAL_EXTRA_ATTR headline)))
|
||||
(if extra-attrs (format " %s" extra-attrs) "")))
|
||||
;; Slide header if any.
|
||||
(if header (format "%s\n" header))
|
||||
header-div
|
||||
;; The HTML content of the headline
|
||||
;; Strip the <div> tags, if any
|
||||
(let ((html (org-html-headline headline contents info)))
|
||||
|
@ -396,7 +398,7 @@ holding contextual information."
|
|||
;; Last head 1. Close all slides.
|
||||
(concat
|
||||
;; Slide footer if any
|
||||
(if footer (format "%s\n" footer))
|
||||
footer-div
|
||||
"</section>\n</section>\n")))))))
|
||||
|
||||
(defgroup org-export-reveal nil
|
||||
|
|
Loading…
Reference in New Issue