Skip to content

Commit

Permalink
Merge pull request #41 from faassen/master
Browse files Browse the repository at this point in the history
Dump parameters into initialize section of reveal.
  • Loading branch information
marianoguerra committed Nov 21, 2013
2 parents fcb3938 + 74bf950 commit 1182edc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions html5css3/postprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import html5css3
import html
import json

from docutils import nodes
from docutils.parsers.rst import directives
Expand Down Expand Up @@ -113,7 +114,7 @@ def revealjs(tree, embed=True, params=None):
head = tree[0]
body = tree[1]
params = params or {}
theme_name = params.get("theme", "default") + ".css"
theme_name = params.pop("theme", "default") + ".css"

def path(*args):
return join_path("thirdparty", "revealjs", *args)
Expand All @@ -139,7 +140,10 @@ def path(*args):

head.append(css("rst2html5-reveal.css", embed))

body.append(html.Script("$(function () { Reveal.initialize({history:true}); });"))
params['history'] = True
param_s = json.dumps(params)
body.append(
html.Script("$(function () { Reveal.initialize(%s); });" % param_s))

def impressjs(tree, embed=True, params=None):
head = tree[0]
Expand Down

0 comments on commit 1182edc

Please sign in to comment.