From b474753e90cdd7c4f945a56da20f7e56a12d01b7 Mon Sep 17 00:00:00 2001 From: David Runge Date: Wed, 13 Dec 2023 09:53:37 +0100 Subject: [PATCH] Fix setup and CSS for EPUB cover positioning Make sure the cover is shown in full height. Signed-off-by: David Runge --- book/source/_static/epub/css/custom.css | 7 +++++-- book/source/_templates/cover.j2 | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/book/source/_static/epub/css/custom.css b/book/source/_static/epub/css/custom.css index 46b31d2..22877d3 100644 --- a/book/source/_static/epub/css/custom.css +++ b/book/source/_static/epub/css/custom.css @@ -66,6 +66,9 @@ Cover */ div.cover-img { - margin: auto; - width: 50%; + text-align: center; } + +div.cover-img span img { + height: 100%; +} \ No newline at end of file diff --git a/book/source/_templates/cover.j2 b/book/source/_templates/cover.j2 index 0c0e9f7..7f4b19b 100644 --- a/book/source/_templates/cover.j2 +++ b/book/source/_templates/cover.j2 @@ -15,6 +15,8 @@ SPDX-License-Identifier: CC-BY-SA-4.0 {% block content %}
- Cover image + + Cover +
{% endblock %}