Skip to content

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.

[Feat] christmas theme (#6202)

Drackrath4c0b30183373
diff --git a/src/frontend/assets/santa-hat.svg b/src/frontend/assets/santa-hat.svg
new file mode 100644
index 000000000..96832b809
--- /dev/null
+++ b/src/frontend/assets/santa-hat.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 52">
+ <path d="M8 40 C12 20 26 6 44 8 C52 9 57 16 56 26 C53 20 48 18 44 20 C40 26 42 34 46 40 Z" fill="#d42a35"/>
+ <path d="M44 8 C52 9 57 16 56 26 C53 20 48 18 44 20 Z" fill="#a51d27"/>
+ <rect x="4" y="38" width="46" height="11" rx="5.5" fill="#f7f4ef"/>
+ <circle cx="56" cy="28" r="6" fill="#f7f4ef"/>
+</svg>
diff --git a/src/frontend/assets/snowflakes.svg b/src/frontend/assets/snowflakes.svg
new file mode 100644
index 000000000..243261418
--- /dev/null
+++ b/src/frontend/assets/snowflakes.svg
@@ -0,0 +1,20 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="320" height="320" viewBox="0 0 320 320">
+ <defs>
+ <style>g { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }</style>
+ <g id="a"><g id="arm-a"><path d="M0 0 V-10 M0 -6 L-3 -9 M0 -6 L3 -9"/></g><use xlink:href="#arm-a" transform="rotate(60)"/><use xlink:href="#arm-a" transform="rotate(120)"/><use xlink:href="#arm-a" transform="rotate(180)"/><use xlink:href="#arm-a" transform="rotate(240)"/><use xlink:href="#arm-a" transform="rotate(300)"/></g>
+ <g id="b"><g id="arm-b"><path d="M0 0 V-11 M0 -4 L-3 -7 M0 -4 L3 -7 M0 -8 L-2 -10 M0 -8 L2 -10"/></g><use xlink:href="#arm-b" transform="rotate(60)"/><use xlink:href="#arm-b" transform="rotate(120)"/><use xlink:href="#arm-b" transform="rotate(180)"/><use xlink:href="#arm-b" transform="rotate(240)"/><use xlink:href="#arm-b" transform="rotate(300)"/></g>
+ <g id="c"><g id="arm-c"><path d="M0 0 V-7 L-3 -10 M0 -7 L3 -10"/></g><use xlink:href="#arm-c" transform="rotate(60)"/><use xlink:href="#arm-c" transform="rotate(120)"/><use xlink:href="#arm-c" transform="rotate(180)"/><use xlink:href="#arm-c" transform="rotate(240)"/><use xlink:href="#arm-c" transform="rotate(300)"/></g>
+ <g id="d"><g id="arm-d"><path d="M0 -2.5 V-7 M0 -7 L-2 -9 L0 -11 L2 -9 Z"/></g><use xlink:href="#arm-d" transform="rotate(60)"/><use xlink:href="#arm-d" transform="rotate(120)"/><use xlink:href="#arm-d" transform="rotate(180)"/><use xlink:href="#arm-d" transform="rotate(240)"/><use xlink:href="#arm-d" transform="rotate(300)"/><path d="M0 -2.5 L2.2 -1.25 L2.2 1.25 L0 2.5 L-2.2 1.25 L-2.2 -1.25 Z"/></g>
+ <g id="e"><g id="arm-e"><path d="M0 0 V-8"/><circle cx="0" cy="-9.5" r="1.4" fill="#fff" stroke="none"/></g><use xlink:href="#arm-e" transform="rotate(60)"/><use xlink:href="#arm-e" transform="rotate(120)"/><use xlink:href="#arm-e" transform="rotate(180)"/><use xlink:href="#arm-e" transform="rotate(240)"/><use xlink:href="#arm-e" transform="rotate(300)"/><path d="M0 -4 L3.5 -2 L3.5 2 L0 4 L-3.5 2 L-3.5 -2 Z"/></g>
+ </defs>
+ <use xlink:href="#a" transform="translate(30 40) scale(0.5) rotate(0)"/>
+ <use xlink:href="#b" transform="translate(150 24) scale(0.35) rotate(15)"/>
+ <use xlink:href="#c" transform="translate(250 90) scale(0.6) rotate(30)"/>
+ <use xlink:href="#d" transform="translate(95 140) scale(0.45) rotate(10)"/>
+ <use xlink:href="#e" transform="translate(205 195) scale(0.5) rotate(0)"/>
+ <use xlink:href="#b" transform="translate(40 255) scale(0.6) rotate(20)"/>
+ <use xlink:href="#c" transform="translate(282 272) scale(0.35) rotate(0)"/>
+ <use xlink:href="#d" transform="translate(150 290) scale(0.4) rotate(35)"/>
+ <use xlink:href="#e" transform="translate(300 20) scale(0.3) rotate(0)"/>
+ <use xlink:href="#a" transform="translate(120 215) scale(0.3) rotate(25)"/>
+</svg>
diff --git a/src/frontend/components/UI/ThemeSelector/index.tsx b/src/frontend/components/UI/ThemeSelector/index.tsx
index 3cdb79a5b..0c8f325be 100644
--- a/src/frontend/components/UI/ThemeSelector/index.tsx
+++ b/src/frontend/components/UI/ThemeSelector/index.tsx
@@ -15,6 +15,14 @@ export const ThemeSelector = () => {
const [themesPath, setThemesPath] = useState('')
const [themes, setThemes] = useState<string[]>(Object.keys(defaultThemes))
const selectedTheme = themes.includes(theme) ? theme : DEFAULT_THEME
+ const themeLabel = (key: string) => defaultThemes[key] || key
+ const isHexa = (key: string) => key.startsWith('heroicHexa')
+ // Hexa themes first, rest alphabetical
+ const sortedThemes = [...themes].sort(
+ (a, b) =>
+ Number(isHexa(b)) - Number(isHexa(a)) ||
+ themeLabel(a).localeCompare(themeLabel(b))
+ )
hasHelp(
'customThemesPath',
@@ -60,9 +68,9 @@ export const ThemeSelector = () => {
onChange={(event) => setTheme(event.target.value)}
value={selectedTheme}
>
- {themes.map((key) => (
+ {sortedThemes.map((key) => (
<MenuItem key={key} value={key}>
- {defaultThemes[key] || key}
+ {themeLabel(key)}
</MenuItem>
))}
</SelectField>
diff --git a/src/frontend/helpers/themes.ts b/src/frontend/helpers/themes.ts
index 818b5921b..27fe9e445 100644
--- a/src/frontend/helpers/themes.ts
+++ b/src/frontend/helpers/themes.ts
@@ -19,7 +19,8 @@ export const defaultThemes: Record<string, string> = {
vampyria: 'Vampyria',
forest: 'Mint',
onePiece: 'One Piece',
- cyberpunk: 'Cyberpunk'
+ cyberpunk: 'Cyberpunk',
+ christmas: 'Christmas'
}
const legacyThemes: Record<string, string> = {
diff --git a/src/frontend/styles/_colors.scss b/src/frontend/styles/_colors.scss
index e69c72f0c..000ce31f1 100644
--- a/src/frontend/styles/_colors.scss
+++ b/src/frontend/styles/_colors.scss
@@ -122,6 +122,35 @@
--color-hexa-info-500: #2f74d0;
--color-hexa-info-700: #1e4f91;
+ /* Christmas theme */
+ --color-christmas-gold-200: #f0d58a;
+ --color-christmas-gold-300: #f2cc6d;
+ --color-christmas-gold-400: #e8b94a;
+
+ --color-christmas-holly-300: #6fd093;
+ --color-christmas-holly-400: #4fbf7a;
+ --color-christmas-holly-500: #3fa66a;
+ --color-christmas-holly-600: #2f8f55;
+
+ --color-christmas-pine-500: #2b5a3e;
+ --color-christmas-pine-600: #1f4a33;
+ --color-christmas-pine-700: #17392a;
+ --color-christmas-pine-800: #0f271b;
+ --color-christmas-pine-900: #0e2117;
+ --color-christmas-pine-950: #0a1912;
+
+ --color-christmas-red-200: #ff8080;
+ --color-christmas-red-300: #ff5c5c;
+ --color-christmas-red-400: #e8444e;
+ --color-christmas-red-500: #d42a35;
+ --color-christmas-red-600: #c8202e;
+ --color-christmas-red-700: #9e1b28;
+ --color-christmas-red-800: #64111b;
+ --color-christmas-red-900: #5c0e18;
+ --color-christmas-red-950: #4a0d15;
+
+ --color-christmas-snow-50: #f7f4ef;
+
/* Success */
--color-success-50: #eafff7;
--color-success-100: #cdfeea;
diff --git a/src/frontend/themes.scss b/src/frontend/themes.scss
index 99b49049a..5029397c0 100644
--- a/src/frontend/themes.scss
+++ b/src/frontend/themes.scss
@@ -1391,3 +1391,145 @@ body.onePiece .Sidebar.collapsed .Sidebar__brand::after {
width: 34px;
top: calc(var(--space-sm) - 6px);
}
+
+body.christmas {
+ /* Gold */
+ --accent: var(--color-christmas-gold-400);
+ --accent-overlay: var(--color-christmas-gold-300);
+ --border-brand: var(--color-christmas-gold-400);
+ --status-warning: var(--color-christmas-gold-400);
+ --status-warning-hover: var(--color-christmas-gold-300);
+
+ /* Greens: pine, fir, moss, holly */
+ --background: var(--color-christmas-pine-900);
+ --body-background: var(--background);
+ --background-darker: var(--color-christmas-pine-950);
+ --current-background: var(--body-background);
+ --gradient-body-background: var(--body-background);
+ --panel-surface: var(--color-christmas-pine-700);
+ --panel-border: var(--color-christmas-pine-500);
+ --input-background: var(--color-christmas-pine-600);
+ --modal-background: var(--color-christmas-pine-800);
+ --modal-border: var(--color-christmas-pine-500);
+ --brand-secondary: var(--color-christmas-holly-500);
+ --success: var(--color-christmas-holly-400);
+ --success-hover: var(--color-christmas-holly-300);
+ --success-button: var(--color-christmas-holly-600);
+ --secondary-button: var(--color-christmas-holly-600);
+ --secondary-button-overlay: var(--color-christmas-holly-500);
+
+ /* Red sidebar, buttons */
+ --navbar-background: var(--color-christmas-red-800);
+ --navbar-accent: var(--color-christmas-gold-400);
+ --on-nav-accent: var(--color-christmas-gold-300);
+ --role-brand: var(--color-christmas-red-600);
+ --logo-mark: var(--color-christmas-gold-400);
+ --logo-ink: var(--color-christmas-red-900);
+ --ink-on-accent: var(--color-christmas-red-950);
+ --bg-brand-subtle: color-mix(
+ in oklab,
+ var(--color-christmas-holly-500) 24%,
+ transparent
+ );
+ --text-brand: var(--color-christmas-gold-200);
+ --primary: var(--color-christmas-red-500);
+ --primary-hover: var(--color-christmas-red-400);
+ --danger: var(--color-christmas-red-300);
+ --danger-hover: var(--color-christmas-red-200);
+ --gradient-brand: linear-gradient(
+ var(--color-christmas-red-600),
+ var(--color-christmas-red-600)
+ );
+
+ --osk-background: var(--body-background);
+ --osk-button-background: var(--input-background);
+ --osk-button-border: var(--color-christmas-pine-500);
+ --action-icon: var(--text-default);
+ --action-icon-hover: var(--accent);
+ --action-icon-active: var(--accent);
+
+ /* White */
+ .Chip--active {
+ background: var(--color-christmas-snow-50);
+ border-color: var(--color-christmas-snow-50);
+ color: var(--color-christmas-red-700);
+ }
+
+ /* Gold hairline sidebar edge */
+ .Sidebar {
+ box-shadow: inset -1px 0 0
+ color-mix(in oklab, var(--color-christmas-gold-400) 45%, transparent);
+ }
+
+ .Button--secondary:hover:not(:disabled),
+ .Button--secondary:focus-visible:not(:disabled) {
+ background: color-mix(
+ in oklab,
+ var(--color-christmas-holly-500) 36%,
+ transparent
+ );
+ }
+
+ .Sidebar__brand {
+ position: relative;
+ }
+
+ /* Brim sits on shield top */
+ .Sidebar__brand::after {
+ content: '';
+ position: absolute;
+ left: 50%;
+ top: calc(var(--space-sm) - 22px);
+ width: 57px;
+ aspect-ratio: 64 / 52;
+ transform: translateX(-50%) translateX(2px) rotate(23deg);
+ transform-origin: center bottom;
+ background: url('./assets/santa-hat.svg') no-repeat center / contain;
+ filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
+ pointer-events: none;
+ z-index: 3;
+ }
+
+ .Sidebar.collapsed .Sidebar__brand::after {
+ width: 31px;
+ top: calc(var(--space-sm) - 15.6px);
+ transform: translateX(-50%) translateX(2.5px) rotate(10deg);
+ }
+
+ /* Snow behind cards, above background */
+ .App .content {
+ isolation: isolate;
+ }
+
+ .App .content::before {
+ content: '';
+ position: fixed;
+ inset: 0;
+ pointer-events: none;
+ z-index: -1;
+ opacity: 0.35;
+ background: url('./assets/snowflakes.svg') repeat;
+ animation: christmas-snow 30s linear infinite;
+ }
+
+ /* Frosted toolbar over scrolling cards */
+ .libraryStickyTop {
+ background: color-mix(in srgb, var(--body-background) 72%, transparent);
+ backdrop-filter: blur(14px);
+ }
+
+ @media (prefers-reduced-motion: reduce) {
+ .App .content::before {
+ animation: none;
+ }
+ }
+}
+
+@keyframes christmas-snow {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 320px;
+ }
+}