From 3799c8b4e4ddcd4b1c3941b5c81b6a702cd62575 Mon Sep 17 00:00:00 2001 From: Laurent Constantin Date: Sat, 17 Aug 2024 09:56:50 +0200 Subject: [PATCH] fix(book): Reading on black theme must show some text --- templates/book/reader-files-epub.html.twig | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/templates/book/reader-files-epub.html.twig b/templates/book/reader-files-epub.html.twig index fa0f7e2d..dc800810 100644 --- a/templates/book/reader-files-epub.html.twig +++ b/templates/book/reader-files-epub.html.twig @@ -19,12 +19,25 @@ {% endblock %} {% block readercss %} - {# This css is injected to the vue-book-reader component, in a shadow root, so it's not possible to use --vars. #} - html { - background: {{ isDark ? '#000' : '#fff' }}; - color: {{ isDark ? '#fff' : '#000' }}; - } - a { - color: #24599d; - } + {% if isDark %} + {# This css is injected to the vue-book-reader component, in a shadow root, so it's not possible to use --vars. #} + html { + background: #000; + color: #fff; + } + a { + color: #24599d; + } + + a:hover { + color: #FFFFFF; + } + + h1,h2,h3,h4,h5,h6,h7,h8,h9,h10 { + color: #fff !important; + } + p, pre, blockquote, code { + color: #fff !important; + } + {% endif %} {% endblock %}