Initial commit: content-driven onboarding portal
Leptos/Axum app that renders a Question/Alternative/Feature schema loaded from a sibling content repo (portal-content). Kanidm OIDC login, content-driven authorization (Question.qualifies), a generic NATS KV-backed resource + state-transition mechanism (no bespoke "applicant" concept baked into the runtime - it's all content), a SHA-256 DAG chain tying submissions and decisions together, and the "YES - Rasterized Lines" piece (ported from the live uhhm.no site) as the landing hero.
This commit is contained in:
+327
@@ -0,0 +1,327 @@
|
||||
/* Same self-hosted Quicksand used for headings on Gitea/the homepage
|
||||
dashboard elsewhere in this stack (see
|
||||
~/repos/infrastructure/gitea-custom-header.tmpl) - reused as-is
|
||||
(same files, same unicode-range split) rather than pulled from a
|
||||
font CDN. */
|
||||
@font-face {
|
||||
font-family: "Quicksand";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("/fonts/quicksand-semibold-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: "Quicksand";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("/fonts/quicksand-semibold-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;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Quicksand";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("/fonts/quicksand-semibold-vietnamese.woff2") format("woff2");
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
:root {
|
||||
/* the one brand color - everything else is neutral. Tuned for
|
||||
legibility against near-black, distinct from the YES canvas's own
|
||||
cyan/magenta/yellow so UI chrome never fights with it. */
|
||||
--accent: #f0923c;
|
||||
--accent-soft: rgba(240, 146, 60, 0.16);
|
||||
|
||||
--paper: #0a0a0a;
|
||||
--paper-raised: #161616;
|
||||
--ink: #ededed;
|
||||
--ink-dim: #9a9a9a;
|
||||
--line: #2a2a2a;
|
||||
|
||||
--heading: "Quicksand", var(--sans);
|
||||
--sans: -apple-system, "SF Pro Text", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
|
||||
|
||||
--radius: 1.1rem;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font-family: var(--sans);
|
||||
font-size: 17px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
font-family: var(--heading);
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
margin: 0 0 0.4em;
|
||||
}
|
||||
|
||||
p { margin: 0 0 0.9em; }
|
||||
|
||||
a { color: var(--accent); }
|
||||
|
||||
::selection { background: var(--accent-soft); color: var(--ink); }
|
||||
|
||||
main.loading, main.not-found {
|
||||
min-height: 60vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
text-align: center;
|
||||
color: var(--ink-dim);
|
||||
}
|
||||
|
||||
/* hero */
|
||||
|
||||
.hero {
|
||||
max-width: 780px;
|
||||
margin: 0 auto;
|
||||
padding: 4rem 1.5rem 2.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.wordmark {
|
||||
font-family: var(--heading);
|
||||
font-size: 0.85rem;
|
||||
letter-spacing: 0.16em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-dim);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hero-copy h1 { font-size: 2.1rem; }
|
||||
|
||||
.hero-copy p {
|
||||
color: var(--ink-dim);
|
||||
font-size: 1.05rem;
|
||||
max-width: 46ch;
|
||||
}
|
||||
|
||||
/* the actual "YES - Rasterized Lines" piece live at uhhm.no (see
|
||||
public/yes.js) - landing page only. Full-viewport so it's a real
|
||||
moment, not a thumbnail; hero-copy overlays near the bottom rather
|
||||
than interrupting the canvas. */
|
||||
|
||||
.hero-yes {
|
||||
position: relative;
|
||||
max-width: none;
|
||||
width: 100%;
|
||||
height: 100svh;
|
||||
padding: 0;
|
||||
justify-content: flex-end;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero-canvas {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
.hero-canvas canvas {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hero-canvas #rasterCanvas {
|
||||
mix-blend-mode: overlay;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.hero-yes .hero-copy {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 0 1.5rem 3.5rem;
|
||||
gap: 0.6rem;
|
||||
text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
/* alternatives */
|
||||
|
||||
.alternatives {
|
||||
max-width: 780px;
|
||||
margin: 0 auto 5rem;
|
||||
padding: 0 1.5rem;
|
||||
display: grid;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.alt-card {
|
||||
background: var(--paper-raised);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.75rem 1.9rem;
|
||||
}
|
||||
|
||||
.alt-card h2 { font-size: 1.3rem; }
|
||||
|
||||
.alt-description { color: var(--ink-dim); }
|
||||
|
||||
.alt-encouragement {
|
||||
font-size: 0.9rem;
|
||||
color: var(--accent);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.features { display: grid; gap: 1.1rem; margin-top: 0.6rem; }
|
||||
|
||||
.feature h3 { font-size: 1rem; margin-bottom: 0.15em; }
|
||||
.feature p { color: var(--ink-dim); font-size: 0.95rem; }
|
||||
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.35rem;
|
||||
margin-top: 0.6rem;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
color: var(--ink-dim);
|
||||
}
|
||||
|
||||
.required { color: var(--accent); margin-left: 0.2em; }
|
||||
|
||||
input, textarea {
|
||||
font: inherit;
|
||||
color: var(--ink);
|
||||
background: var(--paper);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.6rem;
|
||||
padding: 0.65rem 0.8rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
textarea { min-height: 5rem; resize: vertical; }
|
||||
|
||||
input:focus, textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--accent-soft);
|
||||
}
|
||||
|
||||
.alt-submit {
|
||||
margin-top: 1.4rem;
|
||||
font-family: var(--sans);
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
color: #0a0a0a;
|
||||
background: var(--accent);
|
||||
border: none;
|
||||
border-radius: 0.7rem;
|
||||
padding: 0.75rem 1.4rem;
|
||||
cursor: pointer;
|
||||
transition: filter 120ms, transform 120ms;
|
||||
}
|
||||
|
||||
.alt-submit:hover { filter: brightness(1.08); }
|
||||
.alt-submit:active { transform: translateY(1px); }
|
||||
.alt-submit:disabled { filter: grayscale(0.5) brightness(0.85); cursor: wait; }
|
||||
|
||||
.gate-card { text-align: center; }
|
||||
|
||||
/* resources */
|
||||
|
||||
.resource { margin-top: 0.6rem; }
|
||||
|
||||
.resource-loading, .resource-empty {
|
||||
color: var(--ink-dim);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.resource-error { color: #ff6b6b; font-size: 0.9rem; }
|
||||
|
||||
.resource-raw {
|
||||
background: var(--paper);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.6rem;
|
||||
padding: 0.8rem;
|
||||
font-size: 0.82rem;
|
||||
overflow-x: auto;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.answer-list { display: grid; gap: 0.8rem; }
|
||||
|
||||
.answer-row {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.8rem;
|
||||
padding: 1rem 1.1rem;
|
||||
display: grid;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.answer-row.decided { opacity: 0.55; }
|
||||
|
||||
.answer-fields {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||
gap: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.answer-field { display: flex; flex-direction: column; gap: 0.1rem; }
|
||||
|
||||
.answer-field-key {
|
||||
font-size: 0.72rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--ink-dim);
|
||||
}
|
||||
|
||||
.answer-field-value { font-size: 0.92rem; word-break: break-word; }
|
||||
|
||||
.answer-meta {
|
||||
display: flex;
|
||||
gap: 0.8rem;
|
||||
align-items: center;
|
||||
font-size: 0.78rem;
|
||||
color: var(--ink-dim);
|
||||
}
|
||||
|
||||
.answer-state {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.answer-actions { display: flex; gap: 0.6rem; }
|
||||
|
||||
.answer-action {
|
||||
font-family: var(--sans);
|
||||
font-weight: 600;
|
||||
font-size: 0.82rem;
|
||||
color: var(--ink);
|
||||
background: var(--paper);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.4rem 0.8rem;
|
||||
cursor: pointer;
|
||||
transition: border-color 120ms, color 120ms;
|
||||
}
|
||||
|
||||
.answer-action:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.answer-action:disabled { opacity: 0.5; cursor: wait; }
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.hero { padding: 3rem 1.25rem 2rem; }
|
||||
.alt-card { padding: 1.4rem 1.3rem; }
|
||||
}
|
||||
Reference in New Issue
Block a user