From 755da3ea59c12729b252cccf03d1d062442a76db Mon Sep 17 00:00:00 2001 From: Tiago Carrondo <2323546+tcarrondo@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:58:48 +0000 Subject: [PATCH] feat(ui): add Cave theme (#6374) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(themes): add Cave theme Near-black background with a single orange accent, based on the colors of https://acave.pt. Signed-off-by: Tiago Carrondo * fix(themes): raise Cave button hover contrast Dark text on the hover color was 4.27:1; #e84518 brings it to 4.96:1. Signed-off-by: Tiago Carrondo * fix(themes): keep Cave in alphabetical order in the themes list --------- Signed-off-by: Tiago Carrondo Co-authored-by: Deluan Quintão --- ui/src/themes/cave.css.js | 36 ++++++++++ ui/src/themes/cave.js | 135 ++++++++++++++++++++++++++++++++++++++ ui/src/themes/index.js | 2 + 3 files changed, 173 insertions(+) create mode 100644 ui/src/themes/cave.css.js create mode 100644 ui/src/themes/cave.js diff --git a/ui/src/themes/cave.css.js b/ui/src/themes/cave.css.js new file mode 100644 index 000000000..3f02b8ac4 --- /dev/null +++ b/ui/src/themes/cave.css.js @@ -0,0 +1,36 @@ +const stylesheet = ` +.react-jinke-music-player-main .music-player-panel, +.react-jinke-music-player-mobile { + background-color: #0b0b0d; + border-top: 1px solid #ff4d1a; +} +.react-jinke-music-player-main .music-player-panel svg, +.react-jinke-music-player-main .songTitle { + color: #f2f2f0 +} +.react-jinke-music-player-main svg:active, +.react-jinke-music-player-main svg:hover, +.react-jinke-music-player .music-player-controller { + color: #ff4d1a +} +.react-jinke-music-player-main .music-player-panel .panel-content .rc-slider-handle, +.react-jinke-music-player-main .music-player-panel .panel-content .rc-slider-track, +.react-jinke-music-player-mobile-progress .rc-slider-handle, +.react-jinke-music-player-mobile-progress .rc-slider-track { + background-color: #ff4d1a +} +.react-jinke-music-player-main .music-player-panel .panel-content .rc-slider-handle:active { + box-shadow: 0 0 2px #ff4d1a +} +.audio-lists-panel { + background-color: #151518 +} +.audio-lists-panel-content .audio-item.playing, +.react-jinke-music-player-main .audio-item.playing svg, +.react-jinke-music-player-main .audio-item.playing .player-singer, +.react-jinke-music-player-main .lyric-btn-active svg, +.react-jinke-music-player-main .loading svg { + color: #ff4d1a !important +} +` +export default stylesheet diff --git a/ui/src/themes/cave.js b/ui/src/themes/cave.js new file mode 100644 index 000000000..3d257cf89 --- /dev/null +++ b/ui/src/themes/cave.js @@ -0,0 +1,135 @@ +import stylesheet from './cave.css.js' + +// Near-black background with a single orange accent, based on the colors of +// https://acave.pt (A Cave do Entulho) +const background = '#0b0b0d' +const surface = '#151518' +const text = '#f2f2f0' +const textMuted = '#b7b7b7' +const accent = '#ff4d1a' +const accentDark = '#e84518' + +export default { + themeName: 'Cave', + palette: { + primary: { + main: accent, + contrastText: background, + }, + secondary: { + main: accent, + contrastText: background, + }, + background: { + default: background, + paper: surface, + }, + text: { + primary: text, + secondary: textMuted, + }, + type: 'dark', + }, + overrides: { + MuiAppBar: { + positionFixed: { + backgroundColor: `${background} !important`, + boxShadow: 'none', + borderBottom: `1px solid ${accent}`, + }, + colorSecondary: { + color: text, + }, + }, + MuiDrawer: { + root: { + background: background, + }, + }, + MuiToolbar: { + root: { + background: 'transparent !important', + }, + }, + MuiButton: { + textPrimary: { + color: accent, + }, + containedPrimary: { + color: background, + backgroundColor: accent, + '&:hover': { + backgroundColor: accentDark, + '@media (hover: none)': { + backgroundColor: accent, + }, + }, + }, + }, + MuiListItemIcon: { + root: { + color: textMuted, + }, + }, + MuiTableBody: { + root: { + '&>tr:nth-child(odd)': { + background: 'rgba(255, 255, 255, 0.025)', + }, + }, + }, + MuiTableCell: { + root: { + borderBottom: '0 none !important', + }, + head: { + color: `${textMuted} !important`, + }, + }, + MuiPaper: { + elevation1: { + boxShadow: 'none', + }, + }, + NDAlbumGridView: { + albumName: { + color: text, + }, + albumArtistName: { + color: textMuted, + }, + albumPlayButton: { + color: accent, + }, + }, + NDLogin: { + systemNameLink: { + color: accent, + }, + welcome: { + color: text, + }, + card: { + minWidth: 300, + backgroundColor: `${background}e6`, + }, + icon: { + filter: 'hue-rotate(170deg) saturate(1.2)', + }, + }, + NDMobileArtistDetails: { + bgContainer: { + background: background, + }, + }, + RaPaginationActions: { + currentPageButton: { + border: `2px solid ${accent}`, + }, + }, + }, + player: { + theme: 'dark', + stylesheet, + }, +} diff --git a/ui/src/themes/index.js b/ui/src/themes/index.js index 285e579ae..73223f1b6 100644 --- a/ui/src/themes/index.js +++ b/ui/src/themes/index.js @@ -19,6 +19,7 @@ import RosePineTheme from './rosePine' import RosePineDawnTheme from './rosePineDawn' import RosePineMoonTheme from './rosePineMoon' import AmusicTheme from './amusic' +import CaveTheme from './cave' import SquiddiesGlassTheme from './SquiddiesGlass' import NautilineTheme from './nautiline' import MoonbaseAlphaTheme from './moonbaseAlpha' @@ -39,6 +40,7 @@ export default { CatppuccinLatteTheme, CatppuccinMacchiatoTheme, CatppuccinMochaTheme, + CaveTheme, DraculaTheme, ElectricPurpleTheme, ExtraDarkTheme,