vinindkoeb/app/static/site.css
carsten 609c3efb05 Opgave 8c: ny offentlig bestillings-/tilmeldingsside
Server-renderet af FastAPI selv (Jinja2 + vanilla JS/CSS, intet
build-step) mod det eksisterende domæneopløste JSON-API fra 8b.
GET / viser bestillingssiden når en runde er åben (rundeoverskrift,
intro_text, kategori-grupperet vinkatalog med live-beregnet
EUR/DKK-total, bestillingsformular), ellers en tilmeldingsside.
GET /tilmelding er altid tilgængelig uafhængigt af rundestatus, og
GET /afhentning viser rutens meeting_info. Layoutet er modelleret
efter den gamle sides bestillingsside. get_current_round's
serialiseringslogik er udtrukket til en delt _build_page_info-helper,
så JSON-API'et og de nye HTML-sider genbruger nøjagtig samme
domæne-/rundeopslag.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 22:55:55 +02:00

229 lines
3.1 KiB
CSS

* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: #222;
background: #fff;
}
.navbar {
background: #1a1a1a;
color: #fff;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
padding: 16px 24px;
}
.navbar-brand {
font-size: 1.1rem;
font-weight: 600;
}
.navbar-links a {
color: #fff;
text-decoration: none;
margin-left: 24px;
font-size: 0.95rem;
}
.navbar-links a:hover {
text-decoration: underline;
}
.content {
max-width: 1150px;
margin: 0 auto;
padding: 32px 24px 64px;
}
.route-label {
text-align: center;
margin: 0 0 4px;
color: #666;
}
.round-heading {
text-align: center;
font-size: 2.2rem;
margin: 0 0 24px;
}
.intro-text {
text-align: center;
max-width: 700px;
margin: 0 auto 16px;
line-height: 1.6;
}
.intro-text p {
margin: 0 0 12px;
}
.signup-link {
text-align: center;
margin: 0 0 32px;
color: #555;
}
.order-layout {
display: flex;
gap: 32px;
align-items: flex-start;
flex-wrap: wrap;
}
.catalog {
flex: 3 1 600px;
min-width: 0;
}
.wine-table {
width: 100%;
border-collapse: collapse;
}
.wine-table .category-row th {
text-align: center;
text-transform: uppercase;
font-size: 0.95rem;
padding: 16px 8px 8px;
border-bottom: 1px solid #ddd;
}
.wine-table td {
padding: 6px 8px;
border-bottom: 1px solid #f0f0f0;
vertical-align: middle;
}
.qty-cell {
width: 56px;
}
.qty-input {
width: 48px;
padding: 4px;
}
.price-cell,
.row-total-cell {
text-align: right;
white-space: nowrap;
width: 80px;
}
.organic-badge {
font-size: 0.75rem;
color: #2e7d32;
border: 1px solid #2e7d32;
border-radius: 4px;
padding: 0 4px;
margin-left: 4px;
}
.order-sidebar {
flex: 1 1 260px;
min-width: 240px;
position: sticky;
top: 24px;
}
.total-line {
font-weight: 600;
margin: 0 0 4px;
}
.rate-note {
font-size: 0.85rem;
color: #666;
margin: 0 0 20px;
}
.field-label {
display: block;
font-weight: 600;
margin: 16px 0 4px;
}
.field-label input {
display: block;
width: 100%;
margin-top: 4px;
padding: 8px;
font-size: 1rem;
}
.field-help {
font-size: 0.85rem;
color: #666;
margin: 4px 0 0;
}
.checkbox-label {
display: flex;
align-items: flex-start;
gap: 8px;
margin: 20px 0;
font-size: 0.9rem;
}
button[type="submit"] {
width: 100%;
padding: 12px;
font-size: 1rem;
background: #1a1a1a;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
}
button[type="submit"]:hover {
background: #333;
}
.form-message {
margin-top: 12px;
padding: 10px;
border-radius: 4px;
font-size: 0.9rem;
}
.form-message.success {
background: #e6f4ea;
color: #1e4620;
}
.form-message.error {
background: #fdecea;
color: #611a15;
}
.signup-card {
max-width: 420px;
margin: 0 auto;
}
.signup-card form {
margin-top: 24px;
}
.prose p {
line-height: 1.6;
}
@media (max-width: 800px) {
.order-layout {
flex-direction: column;
}
.order-sidebar {
position: static;
width: 100%;
}
}