Colors are now fixed from the design mockups instead of the per-restaurant palette: white background, red #dc2626 accent. paletteToCssVars() ignores the stored palette and always emits the fixed tokens (covers both the public and editor pages), and globals.css :root matches. The palette editor section will be removed separately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
import type { Palette } from './types';
|
|
|
|
// Elegant glass presets the restaurant can pick from (or customize).
|
|
export const PALETTE_PRESETS: { id: string; label: string; palette: Palette }[] = [
|
|
{
|
|
id: 'sand',
|
|
label: 'Arena',
|
|
palette: { background: '#f4f1ec', surface: 'rgba(255,255,255,0.55)', accent: '#b45309', text: '#2a2520', tab: 'rgba(255,255,255,0.45)' },
|
|
},
|
|
{
|
|
id: 'sage',
|
|
label: 'Salvia',
|
|
palette: { background: '#eef2ec', surface: 'rgba(255,255,255,0.5)', accent: '#3f6212', text: '#26301f', tab: 'rgba(255,255,255,0.5)' },
|
|
},
|
|
{
|
|
id: 'blush',
|
|
label: 'Rubor',
|
|
palette: { background: '#f6eef0', surface: 'rgba(255,255,255,0.55)', accent: '#be185d', text: '#33232a', tab: 'rgba(255,255,255,0.5)' },
|
|
},
|
|
{
|
|
id: 'sky',
|
|
label: 'Cielo',
|
|
palette: { background: '#eaf1f7', surface: 'rgba(255,255,255,0.55)', accent: '#1d4ed8', text: '#1f2a37', tab: 'rgba(255,255,255,0.5)' },
|
|
},
|
|
{
|
|
id: 'graphite',
|
|
label: 'Grafito',
|
|
palette: { background: '#edeef0', surface: 'rgba(255,255,255,0.6)', accent: '#334155', text: '#1f2937', tab: 'rgba(255,255,255,0.55)' },
|
|
},
|
|
];
|
|
|
|
// FIXED brand palette — the per-restaurant palette feature is being retired, so
|
|
// these colors are hardcoded from the approved design mockups and the argument is
|
|
// ignored. Emitted into :root (public) and [data-editor-root] (editor).
|
|
const FIXED_VARS =
|
|
'--bg:#ffffff;' +
|
|
'--bg-2:#ffffff;' +
|
|
'--surface:rgba(255,255,255,0.55);' +
|
|
'--accent:#dc2626;' +
|
|
'--text:#2a2520;' +
|
|
'--tab:rgba(255,255,255,0.45);';
|
|
|
|
// Kept for signature compatibility with the pages that still call it; the passed
|
|
// palette is intentionally ignored now that colors are fixed.
|
|
export function paletteToCssVars(_palette?: Palette): string {
|
|
return FIXED_VARS;
|
|
}
|