summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorRoland Meister <devnull@localhost>2011-05-23 21:09:51 +0200
committerRoland Meister <devnull@localhost>2011-05-23 21:09:51 +0200
commit5c554a7fa41ff11ae8c80ff7eb451bb60e8ab3c3 (patch)
tree624f4e1331ec5bbcbc924f80316980cf21c4141c /sphinx
parent49407811d99090faf78a861c7871b5f58570b3a6 (diff)
downloadsphinx-5c554a7fa41ff11ae8c80ff7eb451bb60e8ab3c3.tar.gz
Added the epub theme options relbar1 and footer.
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/builders/epub.py2
-rw-r--r--sphinx/config.py1
-rw-r--r--sphinx/themes/epub/layout.html9
-rw-r--r--sphinx/themes/epub/theme.conf4
4 files changed, 15 insertions, 1 deletions
diff --git a/sphinx/builders/epub.py b/sphinx/builders/epub.py
index 3ee4de5f..ba1eff5b 100644
--- a/sphinx/builders/epub.py
+++ b/sphinx/builders/epub.py
@@ -174,7 +174,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
self.playorder = 0
def get_theme_config(self):
- return self.config.epub_theme, {}
+ return self.config.epub_theme, self.config.epub_theme_options
# generic support functions
def make_id(self, name):
diff --git a/sphinx/config.py b/sphinx/config.py
index d4aacb22..37b2dcbd 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -122,6 +122,7 @@ class Config(object):
# Epub options
epub_basename = (lambda self: make_filename(self.project), None),
epub_theme = ('epub', 'html'),
+ epub_theme_options = ({}, 'html'),
epub_title = (lambda self: self.html_title, 'html'),
epub_author = ('unknown', 'html'),
epub_language = (lambda self: self.language or 'en', 'html'),
diff --git a/sphinx/themes/epub/layout.html b/sphinx/themes/epub/layout.html
index 24395a66..1f5ad077 100644
--- a/sphinx/themes/epub/layout.html
+++ b/sphinx/themes/epub/layout.html
@@ -14,3 +14,12 @@
{% block sidebar2 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block linktags %}{% endblock %}
+
+{# redefine relbar1 and footer to only call super if options are true #}
+{%- block relbar1 %}
+{% if theme_relbar1|tobool %}{{ super() }}{% endif %}
+{%- endblock %}
+{%- block footer %}
+{% if theme_footer|tobool %}{{ super() }}{% endif %}
+{%- endblock %}
+
diff --git a/sphinx/themes/epub/theme.conf b/sphinx/themes/epub/theme.conf
index d5806ec5..11f098ec 100644
--- a/sphinx/themes/epub/theme.conf
+++ b/sphinx/themes/epub/theme.conf
@@ -2,3 +2,7 @@
inherit = basic
stylesheet = epub.css
pygments_style = none
+
+[options]
+relbar1 = true
+footer = true