From 218595c922c128adacb1f0e271958e832e5f5b1a Mon Sep 17 00:00:00 2001 From: Stephan Date: Sun, 5 Sep 2021 15:31:09 +0200 Subject: [PATCH] feat: created epub theme to change the cover --- sphinx/source/conf.py | 3 ++- sphinx/theme/wtf_epub/epub-cover.html | 25 +++++++++++++++++++++++++ sphinx/theme/wtf_epub/theme.conf | 2 ++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 sphinx/theme/wtf_epub/epub-cover.html create mode 100644 sphinx/theme/wtf_epub/theme.conf diff --git a/sphinx/source/conf.py b/sphinx/source/conf.py index 482ef69..ad37f81 100644 --- a/sphinx/source/conf.py +++ b/sphinx/source/conf.py @@ -90,4 +90,5 @@ latex_elements = { latex_logo = '_static/wtf_coop_header.png' latex_show_urls = 'footnote' -epub_cover = ('_static/wtf_coop_header.png', 'epub-cover.html') +epub_theme = 'wtf_epub' +epub_cover = ('_static/wtf_coop_header.png', 'epub-cover.html') diff --git a/sphinx/theme/wtf_epub/epub-cover.html b/sphinx/theme/wtf_epub/epub-cover.html new file mode 100644 index 0000000..fdd8763 --- /dev/null +++ b/sphinx/theme/wtf_epub/epub-cover.html @@ -0,0 +1,25 @@ +{# +epub/epub-cover.html +~~~~~~~~~~~~~~~~~~~~ + +Sample template for the html cover page. + +:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. +:license: BSD, see LICENSE for details. +#} +{%- extends "layout.html" %} +{%- block header %}{% endblock %} +{%- block rootrellink %}{% endblock %} +{%- block relbaritems %}{% endblock %} +{%- block sidebarlogo %}{% endblock %} +{%- block linktags %}{% endblock %} +{%- block relbar1 %}{% endblock %} +{%- block sidebar1 %}{% endblock %} +{%- block sidebar2 %}{% endblock %} +{%- block footer %}{% endblock %} + +{% block content %} +
+Cover image +
+{% endblock %} diff --git a/sphinx/theme/wtf_epub/theme.conf b/sphinx/theme/wtf_epub/theme.conf new file mode 100644 index 0000000..c4640d8 --- /dev/null +++ b/sphinx/theme/wtf_epub/theme.conf @@ -0,0 +1,2 @@ +[theme] +inherit = epub