1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-09-20 19:29:46 +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 {
background: #000;
color: #fff
color: #fff;
}

View File

@ -135,19 +135,23 @@
window.themes = {
"darkTheme": {
"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": {
"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": {
"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": {
"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.
document.getElementById("main").style.backgroundColor = themes[id]["bgColor"];
document.getElementById("titlebar").style.color = themes[id]["title-color"] || "#fff";
}
// font size settings logic