Add toggleable Minimalist Monochrome UI
Merged
BO
10mo ago+518+518+012345678901234567890123456789-32-32-01234567890123456789
What does this PR aim to accomplish?:
Add a new toggleable UI theme option ("MonochromeUI") that overhauls the visual design with a minimalist monochrome aesthetic: serif typography (Playfair Display + Source Serif 4), sharp corners, line-based borders, and inverted headers. The setting is under Beautify → 极简黑白界面风格 and defaults to on. When disabled, the original Bootstrap styling is fully restored.
How does this PR accomplish the above?:
- Global CSS variables:
:rootand[data-bs-theme='dark']define--mono-black,--mono-white,--mono-gray-*, and font families. Dark mode uses charcoal (#1a1a1a) instead of pure black for eye comfort. - Universal reset:
border-radius: 0,box-shadow: noneon all elements. - Bootstrap overrides: Monochrome styling for navbar, cards, modals, toasts, tables, dropdowns, forms, alerts, list groups — all with
!important. - Button differentiation:
btn-primaryfilled (black bg),btn-secondaryoutlined.btn-success/danger/warning/infopreserve functional colors as outline style. - Status indicators:
.status_y/n/wkeep colored backgrounds. Std submission status uses text labels ([STD],[OK],[ERR]) instead of emojis. Loading spinner uses Bootstrapspinner-borderinstead of GIF. - Content links: Bottom-border underline (not
text-decoration) scoped to.containercontent, excluding nav/buttons/dropdowns. - Early style injection: Lightweight CSS injected before resource loading to reduce layout shift. Font loaded via
<link>element. - Non-blocking status fetches:
ImproveACRatefetch andGetStdListAPI call no longer block withawait, reducing layout shift on status page. - Responsive: Problem switcher hidden on screens < 768px. Images constrained with
max-width: 100%. - Toggleable:
UtilityEnabled("MonochromeUI")gates all changes. Disabling fully restores original Bootstrap styles including blur overlay, rounded navbar, original animations.
By submitting this pull request, I confirm the following:
- I have read and understood the contributor's guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
- I have commented on my proposed changes within the code and I have tested my changes.
- I am willing to help maintain this change if there are issues with it later.
- It is compatible with the GNU General Public License v3.0
- I have squashed any insignificant commits. (
git rebase) - I have checked that another pull request for this purpose does not exist.
- I have considered and confirmed that this submission will be valuable to others.
- I accept that this submission may not be used, and the pull request can be closed at the will of the maintainer.
- I give this submission freely and claim no ownership to its content.
- I have read the above and my PR is ready for review. Check this box to confirm
Summary by cubic
Adds a toggleable Minimalist Monochrome UI (default on) with serif typography, sharp corners, and a charcoal dark mode. Ships as 3.0.0 and restores the original Bootstrap UI when turned off.
-
New Features
- MonochromeUI toggle under Beautify; disabling fully restores Bootstrap.
- Monochrome CSS with variables and inverted headers; charcoal dark mode; fonts via fonts.loli.net; early style injection to reduce layout shift.
- Navbar geometry gated by the toggle: flat, full‑width in monochrome; rounded with margin otherwise.
- UI tweaks: filled primary vs outlined secondary buttons; centered tables with spacing; link bottom-border underline; visible copy button on dark headers; images contained; problem switcher gets a solid background and hides <768px; CodeMirror uses a solid border; blur overlay hidden.
- Faster animations and dropdowns (100ms); non‑blocking status page fetches; loader.gif replaced by a Bootstrap spinner; std status uses [STD]/[OK]/[ERR].
-
Bug Fixes
- Skip UploadStd when GetStdList fails to avoid redundant uploads.