feat: added initial version of png cover image to epub

This commit is contained in:
Stephan 2021-09-05 16:30:02 +02:00
parent 218595c922
commit 0bc31c418d
5 changed files with 12 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

View File

@ -91,4 +91,4 @@ latex_logo = '_static/wtf_coop_header.png'
latex_show_urls = 'footnote' latex_show_urls = 'footnote'
epub_theme = 'wtf_epub' epub_theme = 'wtf_epub'
epub_cover = ('_static/wtf_coop_header.png', 'epub-cover.html') epub_cover = ('_static/epub_cover.png', 'epub-cover.html')

View File

@ -19,7 +19,5 @@ Sample template for the html cover page.
{%- block footer %}{% endblock %} {%- block footer %}{% endblock %}
{% block content %} {% block content %}
<div class="epub-cover"> <div class="epub-cover" style="background-image: url('{{ image }}');"></div>
<img src="{{ image }}" alt="Cover image" />
</div>
{% endblock %} {% endblock %}

View File

@ -0,0 +1,9 @@
.epub-cover {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}

View File

@ -1,2 +1,3 @@
[theme] [theme]
inherit = epub inherit = epub
stylesheet = css/style.css