1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-18 06:00:32 +00:00

Fix for #3145 (improved contrast for epub reader headline)

This commit is contained in:
Ozzie Isaacs 2024-09-14 18:55:35 +02:00
parent 10d0542e05
commit 89a1dcfbf6
2 changed files with 10 additions and 5 deletions

View File

@ -15,5 +15,5 @@
.blackTheme { .blackTheme {
background: #000; background: #000;
color: #fff color: #fff;
} }

View File

@ -135,19 +135,23 @@
window.themes = { window.themes = {
"darkTheme": { "darkTheme": {
"bgColor": "#202124", "bgColor": "#202124",
"css_path": "{{ url_for('static', filename='css/epub_themes.css') }}" "css_path": "{{ url_for('static', filename='css/epub_themes.css') }}",
"title-color": "#fff"
}, },
"lightTheme": { "lightTheme": {
"bgColor": "white", "bgColor": "white",
"css_path": "{{ url_for('static', filename='css/epub_themes.css') }}" "css_path": "{{ url_for('static', filename='css/epub_themes.css') }}",
"title-color": "#4f4f4f"
}, },
"sepiaTheme": { "sepiaTheme": {
"bgColor": "#ece1ca", "bgColor": "#ece1ca",
"css_path": "{{ url_for('static', filename='css/epub_themes.css') }}" "css_path": "{{ url_for('static', filename='css/epub_themes.css') }}",
"title-color": "#4f4f4f"
}, },
"blackTheme": { "blackTheme": {
"bgColor": "black", "bgColor": "black",
"css_path": "{{ url_for('static', filename='css/epub_themes.css') }}" "css_path": "{{ url_for('static', filename='css/epub_themes.css') }}",
"title-color": "#fff"
}, },
}; };
@ -170,6 +174,7 @@
// Apply theme to rest of the page. // Apply theme to rest of the page.
document.getElementById("main").style.backgroundColor = themes[id]["bgColor"]; document.getElementById("main").style.backgroundColor = themes[id]["bgColor"];
document.getElementById("titlebar").style.color = themes[id]["title-color"] || "#fff";
} }
// font size settings logic // font size settings logic