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:
parent
40cdc98f82
commit
2a43b59947
6 changed files with 111 additions and 28 deletions
|
|
@ -1,4 +1,6 @@
|
|||
import { useState } from 'preact/hooks';
|
||||
import type { Bar } from '@wutzcalc/shared';
|
||||
import { getTheme, setTheme } from '../api';
|
||||
|
||||
interface Props {
|
||||
bars: Bar[] | null;
|
||||
|
|
@ -6,6 +8,14 @@ interface Props {
|
|||
}
|
||||
|
||||
export function BarPicker({ bars, onPick }: Props) {
|
||||
const [theme, setThemeState] = useState(getTheme());
|
||||
|
||||
function toggleTheme() {
|
||||
const next = theme === 'dark' ? 'light' : 'dark';
|
||||
setTheme(next);
|
||||
setThemeState(next);
|
||||
}
|
||||
|
||||
return (
|
||||
<div class="bar-picker">
|
||||
<h1>Bar auswählen</h1>
|
||||
|
|
@ -18,6 +28,9 @@ export function BarPicker({ bars, onPick }: Props) {
|
|||
</button>
|
||||
))
|
||||
)}
|
||||
<button class="theme-toggle" onClick={toggleTheme}>
|
||||
{theme === 'dark' ? '☀ Heller Modus' : '🌙 Dunkler Modus'}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue