Let the owner change the name, the icon and the dates
Three things that needed a rebuild and a redeploy, or had no way in at all, now have a Site identity panel in the admin: the restaurant's name and tagline, an SVG icon upload, and a switch for whether a menu says when it was published. They live in data/site.json and data/brand/icon.svg, extending ADR 0007: what the owner changes is content, and the config is the seed plus the theme, which still needs a rebuild. An uploaded SVG is a document that would run with this origin's authority, so it is reduced to shapes on the way in and served with default-src 'none'. The archive list keeps its dates even when the switch is off, because those dates are how one old menu is told from another. Also fixes the live check's own trap: the app caches identity in memory, so the tests drive it through the app rather than a second store instance, which would be a second writer.
This commit is contained in:
1 parent
b6f05f6828
commit
32eeed144f
12 files changed
+646
-18
No files matched your search
@@ -436,3 +436,36 @@ body {
|
||||
.fold--categories .muted {
|
||||
margin: 0.5rem 0 0;
|
||||
}
|
||||
|
||||
/* ---------- Site identity ---------- */
|
||||
|
||||
.check {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
color: var(--ink-soft, var(--ink-dim));
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.check input[type='checkbox'] {
|
||||
width: 1.05rem;
|
||||
height: 1.05rem;
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
.identity__icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 1px solid var(--hairline);
|
||||
border-radius: var(--radius-pill, 999px);
|
||||
background: var(--rail);
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.fold--identity .inline-form {
|
||||
margin-top: 0.9rem;
|
||||
}
|
||||
|
||||
.fold--identity .inline-form + form {
|
||||
margin-top: 0.6rem;
|
||||
}
|
||||
Reference in new issue
Block a user