Add upload page and move styles to shared assets
This commit is contained in:
@@ -37,8 +37,19 @@
|
||||
--color-primary: rgb(var(--immich-primary));
|
||||
--color-gray: rgb(var(--immich-gray));
|
||||
|
||||
/* Status colours from @immich/ui 0.90.0 (dist/theme/default.css), the -500 shades */
|
||||
--color-success: oklch(0.708 0.204 147.56);
|
||||
--color-danger: oklch(0.633 0.24 28.79);
|
||||
--color-warning: oklch(0.812 0.17 76.3);
|
||||
/* @immich/ui's `subtle` surface */
|
||||
--color-subtle: oklch(97% 0 271);
|
||||
|
||||
--font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
|
||||
/* Horizontal inset for textual page content. IPP's grid goes edge-to-edge
|
||||
on mobile so it doesn't use this value. */
|
||||
--gutter: 32px;
|
||||
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
@@ -47,10 +58,20 @@ html.dark {
|
||||
--color-fg: rgb(var(--immich-dark-fg));
|
||||
--color-primary: rgb(var(--immich-dark-primary));
|
||||
--color-gray: rgb(var(--immich-dark-gray));
|
||||
--color-success: oklch(0.842 0.181 156.04);
|
||||
--color-danger: oklch(0.727 0.149 21.41);
|
||||
--color-warning: oklch(0.888 0.089 72.24);
|
||||
--color-subtle: oklch(17.89% 0.0104 276.38);
|
||||
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
:root {
|
||||
--gutter: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html, body {
|
||||
@@ -60,3 +81,74 @@ html, body {
|
||||
color: var(--color-fg);
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
|
||||
/* ===== Page header: title, subtitle and round icon actions, shared by both apps ===== */
|
||||
|
||||
#header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 28px var(--gutter) 12px;
|
||||
color: var(--color-fg);
|
||||
}
|
||||
|
||||
.header-text {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#header h1 {
|
||||
margin: 0;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.01em;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
#header .subtitle {
|
||||
margin: 4px 0 0;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
/* Round icon button in the header: an anchor or a button */
|
||||
.header-action {
|
||||
flex: 0 0 auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
color: var(--color-fg);
|
||||
transition: background-color 0.15s;
|
||||
}
|
||||
|
||||
.header-action:hover,
|
||||
.header-action:focus-visible {
|
||||
background-color: color-mix(in srgb, var(--color-fg) 10%, transparent);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.header-action svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
#header {
|
||||
padding-top: 16px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
#header h1 {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Mirrors Immich's FOUC-prevention pattern: read color-theme from localStorage
|
||||
// (or fall back to OS preference), then add/remove .dark on <html> before paint.
|
||||
// `data-theme` is pico's switch, so pages that use pico follow the same choice.
|
||||
// Source: immich-app/immich v2.7.5 web/src/app.html (2026-05-23).
|
||||
const themeScript = `
|
||||
const key = 'color-theme';
|
||||
@@ -18,6 +19,7 @@ const themeScript = `
|
||||
}
|
||||
if (v === 'dark') document.documentElement.classList.add('dark');
|
||||
else document.documentElement.classList.remove('dark');
|
||||
document.documentElement.dataset.theme = v;
|
||||
`
|
||||
|
||||
export function ThemeScript () {
|
||||
|
||||
Reference in New Issue
Block a user