Admin UI consistency: DaisyUI 5 forms, shared modal and setting rows
- Migrate all DaisyUI 4 form markup (form-control, label-text, *-bordered — removed in v5) to v5 fieldset/legend; labels sat inline beside inputs and inputs fell back to a fixed 20rem width. - One Modal component (native <dialog>: Escape, focus trap) for page, event, item and slot editors; destructive actions confirmed everywhere. The page Delete confirm was ignored — returning false from onsubmit doesn't cancel — so Cancel still deleted the page. - Block editor follows the background-picker style throughout: SegmentedControl rows (title-cased options, clearer selected state) and a new ColorField row with reset; image position is Left/Right like the alignment controls. - Globals keep their layout; readable field labels, save feedback without reload, hints wrap. - Pages list: fixed broken Preview link (VITE_PUBLIC_SITE_URL was undefined → "undefined/slug"), shown for published pages only; action column no longer breaks row alignment; empty states on all tables. - Items: image picker instead of a raw media-id field, upload errors shown (were swallowed), prices in the shop currency instead of hard-coded EUR. - Slots/orders/calendar: times shown in the site timezone with a fixed locale (server and browser render the same text). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KgF3Kf47LjPGHKQHszpUAv
This commit is contained in:
parent
cfe4e2062d
commit
af7b4af5de
16 changed files with 1237 additions and 1211 deletions
|
|
@ -1,151 +1,157 @@
|
|||
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');
|
||||
@import 'tailwindcss';
|
||||
@plugin 'daisyui' {
|
||||
themes: light --default;
|
||||
}
|
||||
|
||||
/* Admin UI theme: DaisyUI light with a fixed sage primary. Deliberately NOT
|
||||
tied to the site's Globals → Colors (those only apply inside /preview), so
|
||||
a light brand colour can't make admin buttons unreadable. #647556 on white
|
||||
text is ~5:1 contrast (WCAG AA). */
|
||||
@plugin 'daisyui/theme' {
|
||||
name: 'light';
|
||||
default: true;
|
||||
--color-primary: #647556;
|
||||
--color-primary-content: #ffffff;
|
||||
}
|
||||
|
||||
@theme {
|
||||
--font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
|
||||
--font-serif: 'Playfair Display', Georgia, serif;
|
||||
--color-warm: var(--color-bg, #faf8f5);
|
||||
--color-charcoal: var(--color-heading, #2c2c2c);
|
||||
--color-sage: var(--color-primary, #8a9a7b);
|
||||
--color-sage-dark: color-mix(in srgb, var(--color-primary, #8a9a7b) 80%, #000);
|
||||
--color-terracotta: var(--color-accent, #c9825f);
|
||||
}
|
||||
|
||||
@keyframes shrink {
|
||||
from { scale: 0 1; }
|
||||
to { scale: 1 1; }
|
||||
}
|
||||
|
||||
.delete-fill {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: transparent;
|
||||
transform-origin: left;
|
||||
}
|
||||
|
||||
.delete-fill.animating {
|
||||
animation: shrink 1s ease-in-out forwards;
|
||||
background: var(--error, #f43f5e);
|
||||
}
|
||||
|
||||
.btn.delete-holding {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.btn.delete-holding .text-error {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
:root {
|
||||
--fg-heading: var(--color-heading, #2c2c2c);
|
||||
--fg-subheading: var(--color-subheading, #4a4a4a);
|
||||
--fg-body: var(--color-text, #2c2c2c);
|
||||
background: var(--color-bg, #faf8f5);
|
||||
color: var(--fg-body);
|
||||
font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
|
||||
}
|
||||
|
||||
/* ── Foreground colour utilities (set per-block via BackgroundWrapper) ── */
|
||||
.text-fg-body { color: var(--fg-body, #2c2c2c); }
|
||||
.text-fg-body\/85 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 85%, transparent); }
|
||||
.text-fg-body\/80 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 80%, transparent); }
|
||||
.text-fg-body\/75 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 75%, transparent); }
|
||||
.text-fg-body\/70 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 70%, transparent); }
|
||||
.text-fg-body\/60 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 60%, transparent); }
|
||||
.text-fg-heading { color: var(--fg-heading, #2c2c2c); }
|
||||
.text-fg-subheading { color: var(--fg-subheading, #4a4a4a); }
|
||||
.text-fg-subheading\/85 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 85%, transparent); }
|
||||
.text-fg-subheading\/80 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 80%, transparent); }
|
||||
.text-fg-subheading\/75 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 75%, transparent); }
|
||||
.text-fg-subheading\/70 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 70%, transparent); }
|
||||
.text-fg-subheading\/60 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 60%, transparent); }
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background:
|
||||
radial-gradient(circle at top left, rgba(var(--color-accent-rgb, 201, 130, 95), 0.1), transparent 36rem),
|
||||
var(--color-bg, #faf8f5);
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
font-family: 'Playfair Display', Georgia, serif;
|
||||
color: var(--fg-heading, #2c2c2c);
|
||||
}
|
||||
|
||||
.prose-wellness p {
|
||||
margin: 0.75rem 0;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.prose-wellness h2 {
|
||||
margin: 1.25rem 0 0.5rem;
|
||||
font-size: clamp(2rem, 4vw, 3.25rem);
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.prose-wellness h3 {
|
||||
margin: 1rem 0 0.5rem;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.prose-wellness ul {
|
||||
list-style: disc;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
|
||||
.prose-wellness a {
|
||||
color: color-mix(in srgb, var(--color-primary, #8a9a7b) 90%, #000);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
/* ── Scroll-reveal animations ── */
|
||||
.reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
transition:
|
||||
opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
|
||||
transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
|
||||
}
|
||||
|
||||
.reveal-visible {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* ── Hero fade-in stagger ── */
|
||||
.animate-fade-in {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
animation: fadeInUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Smooth scroll ── */
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');
|
||||
@import 'tailwindcss';
|
||||
@plugin 'daisyui' {
|
||||
themes: light --default;
|
||||
}
|
||||
|
||||
/* Admin UI theme: DaisyUI light with a fixed sage primary. Deliberately NOT
|
||||
tied to the site's Globals → Colors (those only apply inside /preview), so
|
||||
a light brand colour can't make admin buttons unreadable. #647556 on white
|
||||
text is ~5:1 contrast (WCAG AA). */
|
||||
@plugin 'daisyui/theme' {
|
||||
name: 'light';
|
||||
default: true;
|
||||
--color-primary: #647556;
|
||||
--color-primary-content: #ffffff;
|
||||
}
|
||||
|
||||
/* Hint text under form fields: DaisyUI's .label is nowrap, which stretched
|
||||
fields to fit long hints. */
|
||||
.fieldset .label {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@theme {
|
||||
--font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
|
||||
--font-serif: 'Playfair Display', Georgia, serif;
|
||||
--color-warm: var(--color-bg, #faf8f5);
|
||||
--color-charcoal: var(--color-heading, #2c2c2c);
|
||||
--color-sage: var(--color-primary, #8a9a7b);
|
||||
--color-sage-dark: color-mix(in srgb, var(--color-primary, #8a9a7b) 80%, #000);
|
||||
--color-terracotta: var(--color-accent, #c9825f);
|
||||
}
|
||||
|
||||
@keyframes shrink {
|
||||
from { scale: 0 1; }
|
||||
to { scale: 1 1; }
|
||||
}
|
||||
|
||||
.delete-fill {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: transparent;
|
||||
transform-origin: left;
|
||||
}
|
||||
|
||||
.delete-fill.animating {
|
||||
animation: shrink 1s ease-in-out forwards;
|
||||
background: var(--error, #f43f5e);
|
||||
}
|
||||
|
||||
.btn.delete-holding {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.btn.delete-holding .text-error {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
:root {
|
||||
--fg-heading: var(--color-heading, #2c2c2c);
|
||||
--fg-subheading: var(--color-subheading, #4a4a4a);
|
||||
--fg-body: var(--color-text, #2c2c2c);
|
||||
background: var(--color-bg, #faf8f5);
|
||||
color: var(--fg-body);
|
||||
font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
|
||||
}
|
||||
|
||||
/* ── Foreground colour utilities (set per-block via BackgroundWrapper) ── */
|
||||
.text-fg-body { color: var(--fg-body, #2c2c2c); }
|
||||
.text-fg-body\/85 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 85%, transparent); }
|
||||
.text-fg-body\/80 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 80%, transparent); }
|
||||
.text-fg-body\/75 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 75%, transparent); }
|
||||
.text-fg-body\/70 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 70%, transparent); }
|
||||
.text-fg-body\/60 { color: color-mix(in srgb, var(--fg-body, #2c2c2c) 60%, transparent); }
|
||||
.text-fg-heading { color: var(--fg-heading, #2c2c2c); }
|
||||
.text-fg-subheading { color: var(--fg-subheading, #4a4a4a); }
|
||||
.text-fg-subheading\/85 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 85%, transparent); }
|
||||
.text-fg-subheading\/80 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 80%, transparent); }
|
||||
.text-fg-subheading\/75 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 75%, transparent); }
|
||||
.text-fg-subheading\/70 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 70%, transparent); }
|
||||
.text-fg-subheading\/60 { color: color-mix(in srgb, var(--fg-subheading, #4a4a4a) 60%, transparent); }
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background:
|
||||
radial-gradient(circle at top left, rgba(var(--color-accent-rgb, 201, 130, 95), 0.1), transparent 36rem),
|
||||
var(--color-bg, #faf8f5);
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
font-family: 'Playfair Display', Georgia, serif;
|
||||
color: var(--fg-heading, #2c2c2c);
|
||||
}
|
||||
|
||||
.prose-wellness p {
|
||||
margin: 0.75rem 0;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.prose-wellness h2 {
|
||||
margin: 1.25rem 0 0.5rem;
|
||||
font-size: clamp(2rem, 4vw, 3.25rem);
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.prose-wellness h3 {
|
||||
margin: 1rem 0 0.5rem;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.prose-wellness ul {
|
||||
list-style: disc;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
|
||||
.prose-wellness a {
|
||||
color: color-mix(in srgb, var(--color-primary, #8a9a7b) 90%, #000);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
/* ── Scroll-reveal animations ── */
|
||||
.reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
transition:
|
||||
opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
|
||||
transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
|
||||
}
|
||||
|
||||
.reveal-visible {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* ── Hero fade-in stagger ── */
|
||||
.animate-fade-in {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
animation: fadeInUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Smooth scroll ── */
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue