Repository navigation
Add the Golden Times theme as a new selectable theme - #1664
Open
HyperCriSiS wants to merge 1 commit into
Open
HyperCriSiS wants to merge 1 commit into
HyperCriSiS wants to merge 1 commit into
Conversation
Golden Times is a dark theme built on the standard Bootstrap 3 templates without caliBlur. It ships as golden-times.css and golden-times.js and as template branches on g.current_theme == 2: a fixed bar with the page title and a history back arrow, collapsible sidebar sections with a plus action for shelves, a sticky band that holds sorting and page navigation, cover cards that open the book page, a details-based upload menu and a styled error and shelf download page. The caliBlur and light theme templates render unchanged. Users pick it in their profile, admins as the default theme; caliBlur remains the default and the light theme stays disabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds Golden Times, a dark theme built on the standard Bootstrap 3 templates without caliBlur, as a new selectable theme next to caliBlur. It uses theme id 2; the light theme (0) stays disabled as before.
What it does:
More screenshots
Phone (390px):
Changes
cps/static/css/golden-times.css,cps/static/js/golden-times.js: the theme assets. The script only sets Isotope's transition duration to 0, moves the browse navigation into the drawer below 768px, drives the back arrow and the collapsible sections, and adds a folder upload trigger.{% if g.current_theme == 2 %}branch; themes 0 and 1 render byte-identical output apart from blank lines (verified by rendering all list, grid, shelf, duplicates, error and table pages with the original and the patched templates).layout.htmlgets a smallpage_navigationmacro so the band can render the pagination before the body.cps/admin.py:g.current_themehonors 2; the light theme stays disabled and caliBlur stays the default.cps/web.py,user_edit.html,config_view_edit.html: the theme selects offer Golden Times for users and as the admin default.root/etc/s6-overlay/s6-rc.d/cwa-init/run: the start-up theme enforcement still moves theme 0 to caliBlur but leaves theme 2 alone, so the choice survives a restart (verified in the container). No database migration changes.Testing
crocodilestick/calibre-web-automated:latest) with this branch'scpsfolder mounted: logged in, selected Golden Times in the profile, walked Books, Authors, Series, Books List, detail, edit metadata, Admin, Tasks, Search, Advanced Search, Profile and the 404 page at 1440 and 390 px. No JavaScript errors.The theme is maintained in the Calibre AIO Home Assistant add-on, where it has been in daily use. Happy to rename the
aio-class prefix or split the template branches differently if you prefer.