Files
menu/public/styles.css
T
tanshu 58ecfa0dc3 Publish menus from the browser instead of scp
The admin signs in with the shared password, creates a Menu Set, drops photos
into it (shrunk in the browser first), reorders Pages by dragging or with
up/down buttons, previews the Draft exactly as customers would see it, and
publishes it over the previous set. Restore and delete close the loop. Mutations
need a session, a same-origin request and a CSRF token derived from the session;
a Draft's media is served only to a session holder.
2026-09-22 21:22:26 +05:30

440 lines
7.6 KiB
CSS

/* Hops n Grains menu. Steel is the taproom, paper is the menu: the interface
stays quiet so the photographed pages are the only loud thing. */
@font-face {
font-family: 'Archivo';
font-style: normal;
font-weight: 100 900;
font-stretch: 62% 125%;
font-display: swap;
src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Archivo';
font-style: normal;
font-weight: 100 900;
font-stretch: 62% 125%;
font-display: swap;
src: url('/assets/fonts/archivo-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
U+2C60-2C7F, U+A720-A7FF;
}
:root {
--steel: #14181b;
--rail: #1f262b;
--paper: #f2efe9;
--accent: #0088aa;
--copper: #b2703b;
--ink: #e8e6e1;
--ink-dim: #99a2a8;
--ink-on-paper: #1b1f22;
--hairline: color-mix(in srgb, var(--copper) 40%, transparent);
--hairline-soft: color-mix(in srgb, var(--copper) 22%, transparent);
--step-0: 1rem;
--step-1: 1.25rem;
--step-2: 1.55rem;
--step-3: 2.4rem;
--page-max: 780px;
--content-max: 56rem;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
background: var(--steel);
color: var(--ink);
font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
font-size: var(--step-0);
line-height: 1.5;
}
a {
color: inherit;
text-decoration: none;
}
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 3px;
}
/* ---------- Landing ---------- */
.landing {
max-width: var(--content-max);
margin: 0 auto;
padding: 0 1.25rem 3rem;
}
.masthead {
padding: clamp(2.5rem, 11vh, 5.5rem) 0 1.75rem;
}
.wordmark {
margin: 0;
font-size: clamp(1.9rem, 8vw, 2.9rem);
font-weight: 600;
font-stretch: 122%;
letter-spacing: -0.01em;
line-height: 1.05;
}
.masthead__tagline {
margin: 0.4rem 0 0;
color: var(--ink-dim);
font-size: var(--step-1);
}
.rows {
border-top: 1px solid var(--hairline);
}
.row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
padding: 1.1rem 0.15rem;
border-bottom: 1px solid var(--hairline);
}
.row__label {
font-size: clamp(1.45rem, 6.5vw, 2rem);
font-weight: 600;
font-stretch: 116%;
line-height: 1.15;
}
.row__meta {
color: var(--ink-dim);
font-size: 0.95rem;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.row:hover .row__label,
.row:focus-visible .row__label {
color: var(--accent);
}
.empty {
max-width: 34ch;
margin: 0;
color: var(--ink-dim);
font-size: var(--step-1);
}
/* ---------- Section page: the rail and the pour line ---------- */
.bar {
position: sticky;
top: 0;
z-index: 20;
display: flex;
align-items: center;
gap: 0.85rem;
padding: 0.5rem 0.9rem 0.4rem;
background: var(--rail);
}
.bar__brand {
font-size: 0.95rem;
font-weight: 600;
font-stretch: 118%;
white-space: nowrap;
}
.rail {
display: flex;
flex: 1 1 auto;
gap: 0.15rem;
overflow-x: auto;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar {
display: none;
}
.rail__item {
padding: 0.35rem 0.6rem;
color: var(--ink-dim);
font-size: 0.95rem;
white-space: nowrap;
}
.rail__item.is-current {
background: var(--accent);
color: var(--steel);
font-weight: 600;
}
.pour {
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 2px;
background: var(--hairline-soft);
}
.pour__fill {
display: block;
width: 0;
height: 100%;
background: var(--copper);
}
.section-heading {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
max-width: var(--page-max);
margin: 1.35rem auto 0.85rem;
padding: 0 1rem;
}
.section-heading__label {
font-size: var(--step-2);
font-weight: 600;
font-stretch: 116%;
}
.section-heading__date {
color: var(--ink-dim);
font-size: 0.9rem;
font-variant-numeric: tabular-nums;
}
.notice {
max-width: var(--page-max);
margin: 0 auto 1rem;
padding: 0.6rem 0.8rem;
border-left: 2px solid var(--copper);
background: var(--rail);
font-size: 0.95rem;
}
.notice a {
color: var(--accent);
text-decoration: underline;
}
.notice--admin {
max-width: none;
border-left-color: var(--accent);
background: color-mix(in srgb, var(--accent) 22%, var(--rail));
}
/* ---------- The Pages ---------- */
.pages {
max-width: var(--page-max);
margin: 0 auto;
padding: 0 0.75rem 1.25rem;
}
.page {
margin: 0 0 0.7rem;
background: var(--paper);
}
.page__zoom {
display: block;
}
.page img {
display: block;
width: 100%;
height: auto;
}
/* ---------- Footer: page index and older menus ---------- */
.foot {
max-width: var(--page-max);
margin: 0 auto 4.5rem;
padding: 0 1rem 1rem;
border-top: 1px solid var(--hairline-soft);
}
.fold {
padding: 0.7rem 0;
border-bottom: 1px solid var(--hairline-soft);
}
.fold summary {
color: var(--ink-dim);
font-size: 0.95rem;
cursor: pointer;
}
.fold[open] summary {
color: var(--ink);
}
.index {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin: 0;
padding: 0.85rem 0 0;
list-style: none;
}
.index a {
display: block;
min-width: 2.3rem;
padding: 0.3rem 0.45rem;
background: var(--rail);
font-variant-numeric: tabular-nums;
text-align: center;
}
.index a:hover,
.index a:focus-visible {
background: var(--accent);
color: var(--steel);
}
.older {
margin: 0.5rem 0 0;
padding: 0;
list-style: none;
}
.older a {
display: flex;
justify-content: space-between;
gap: 1rem;
padding: 0.45rem 0.15rem;
}
.older__label {
font-weight: 500;
}
.older__date {
color: var(--ink-dim);
font-size: 0.9rem;
font-variant-numeric: tabular-nums;
}
.fold__back {
margin: 0.7rem 0 0;
}
.fold__back a {
color: var(--accent);
text-decoration: underline;
}
/* ---------- Counter and zoom ---------- */
.counter {
position: fixed;
right: 0.9rem;
bottom: calc(0.9rem + env(safe-area-inset-bottom));
z-index: 30;
display: inline-flex;
align-items: baseline;
gap: 0.3rem;
padding: 0.45rem 0.7rem;
border: 1px solid var(--hairline);
background: var(--paper);
color: var(--ink-on-paper);
font: inherit;
font-size: 0.9rem;
font-variant-numeric: tabular-nums;
cursor: pointer;
}
.counter[hidden] {
display: none;
}
.counter__total {
color: color-mix(in srgb, var(--ink-on-paper) 55%, transparent);
}
.zoom {
position: fixed;
inset: 0;
z-index: 40;
overflow: auto;
background: rgba(8, 10, 12, 0.95);
-webkit-overflow-scrolling: touch;
}
.zoom img {
display: block;
width: min(100%, 1600px);
height: auto;
margin: 0 auto;
}
.zoom__close {
position: fixed;
top: 0.6rem;
right: 0.6rem;
z-index: 1;
padding: 0.5rem 0.75rem;
border: 1px solid var(--hairline);
background: var(--paper);
color: var(--ink-on-paper);
font: inherit;
cursor: pointer;
}
/* ---------- Wider screens ---------- */
@media (min-width: 60rem) {
.pages {
max-width: 820px;
}
}
@media print {
.bar,
.counter,
.fold,
.notice {
display: none;
}
body {
background: #fff;
color: #000;
}
.page {
break-inside: avoid;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation: none !important;
transition: none !important;
scroll-behavior: auto !important;
}
}