tablet: split price/pfand, light mode, bigger bold text

- show drink price and Pfand separately on tiles and in cart
- add light/dark toggle on the bar-picker page (persisted)
- theme via CSS variables, applied on load for tablet + admin
- larger, bolder text throughout; much bigger total sum
This commit is contained in:
müde 2026-06-14 21:57:52 +02:00
commit 2a43b59947

View file

@ -27,6 +27,22 @@ export function formatCents(cents: number): string {
return `${sign}${(abs / 100).toFixed(2)} €`;
}
export type Theme = 'dark' | 'light';
const THEME_KEY = 'wutz.theme';
export function getTheme(): Theme {
return localStorage.getItem(THEME_KEY) === 'light' ? 'light' : 'dark';
}
export function applyTheme(t: Theme = getTheme()): void {
document.documentElement.setAttribute('data-theme', t);
}
export function setTheme(t: Theme): void {
localStorage.setItem(THEME_KEY, t);
applyTheme(t);
}
export function uuid(): string {
if (typeof crypto !== 'undefined' && 'randomUUID' in crypto) {
return (crypto as any).randomUUID();