diff --git a/Gemfile b/Gemfile index c516f96..eef2d94 100644 --- a/Gemfile +++ b/Gemfile @@ -13,8 +13,6 @@ gem "jsbundling-rails" gem "turbo-rails" # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] gem "stimulus-rails" -# Bundle and process CSS [https://github.com/rails/cssbundling-rails] -gem "cssbundling-rails" gem "tailwindcss-rails" # Windows does not include zoneinfo files, so bundle the tzinfo-data gem @@ -86,3 +84,6 @@ group :test do # Stub Weave's HTTP endpoints in tests gem "webmock" end + +# Lucide, the Patchwork icon set (internal-docs design/icons.md). +gem "lucide-rails", "~> 0.7.4" diff --git a/Gemfile.lock b/Gemfile.lock index 76f4b05..ff79bb2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -115,8 +115,6 @@ GEM bigdecimal rexml crass (1.0.8) - cssbundling-rails (1.4.3) - railties (>= 6.0.0) date (3.6.0) debug (1.11.1) irb (~> 1.10) @@ -203,6 +201,8 @@ GEM loofah (2.25.3) crass (~> 1.0.2) nokogiri (>= 1.19.5) + lucide-rails (0.7.4) + railties (>= 4.1.0) mail (2.9.1) logger mini_mime (>= 0.1.1) @@ -413,7 +413,6 @@ DEPENDENCIES bootsnap brakeman bundler-audit - cssbundling-rails debug dotenv-rails encoded_ids (~> 1.1) @@ -425,6 +424,7 @@ DEPENDENCIES kaminari lograge logstop + lucide-rails (~> 0.7.4) pg (~> 1.1) propshaft puma (>= 5.0) @@ -473,7 +473,6 @@ CHECKSUMS connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e crass (1.0.8) sha256=7a0145c7a2c59f8e7923b3a69ce819c444823a00a5127d805298fea13be24efe - cssbundling-rails (1.4.3) sha256=53aecd5a7d24ac9c8fcd92975acd0e830fead4ee4583d3d3d49bb64651946e41 date (3.6.0) sha256=18ac945c4e24ebd93534f8eab8c2fd8c5604b3e977105b3798d62a1e8d27b580 debug (1.11.1) sha256=2e0b0ac6119f2207a6f8ac7d4a73ca8eb4e440f64da0a3136c30343146e952b6 dotenv (3.2.0) sha256=e375b83121ea7ca4ce20f214740076129ab8514cd81378161f11c03853fe619d @@ -515,6 +514,7 @@ CHECKSUMS lograge (0.15.1) sha256=b8a6b3d45f15855f3b038ce01019317e783fa9ddf774eb20818c751438c5c761 logstop (1.0.0) sha256=4b1d5190dfcc7b8cd26c3d94f7f329a0ebb808593a5dcdf79074f9f20084fa55 loofah (2.25.3) sha256=545f14eef0cc2a7de80df560530d593232b7c07e515c5c4e37532d9cb5b0185c + lucide-rails (0.7.4) sha256=74d99cc79a9c5f2e8b0fa772756bc9190acad16dc58b21f25d4c3009c57e4393 mail (2.9.1) sha256=06574eca475253d6c18145dd70af80d0eb970182d55053497c5f4d797ea160e8 marcel (1.2.1) sha256=1678e9360e32f9eafa917c80029e2f6d10b2715c66a4b87b6d0da9b9cd1f859f mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef diff --git a/Procfile.dev b/Procfile.dev index 67cd82c..3781070 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,5 +1,4 @@ web: env RUBY_DEBUG_OPEN=true bin/rails server js: bun run build --watch -css: bun run build:css --watch css: bin/rails tailwindcss:watch jobs: bundle exec good_job start diff --git a/README.md b/README.md index e4194e1..03eced8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Stash is the Patchwork Labs archive. It takes a URL and keeps a durable copy of ## Stack -Rails 8.1 on Ruby 4.0, server-rendered ERB with Tailwind, GoodJob for the captures, Active Storage for the files, Weave for sign-in. The capture tools are headless Chromium (through Ferrum), git, the GitHub API, yt-dlp, gallery-dl and LibreOffice. +Rails 8.1 on Ruby 4.0, server-rendered ERB with Tailwind in the Patchwork look (internal-docs `design/`, copied from Weave: tokens, components, fonts, `UiHelper`, `IconHelper`, Lucide icons), GoodJob for the captures, Active Storage for the files, Weave for sign-in. The capture tools are headless Chromium (through Ferrum), git, the GitHub API, yt-dlp, gallery-dl and LibreOffice. ## How an archive happens diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css deleted file mode 100644 index 2fc1e50..0000000 --- a/app/assets/stylesheets/application.tailwind.css +++ /dev/null @@ -1,36 +0,0 @@ -@import "tailwindcss"; - -/* The staging frame: a hazard-stripe border around the viewport and a tab at the top. Same look - as Weave and Quilt. Both ignore pointer events and take no space. */ -.staging-frame { - position: fixed; - inset: 0; - z-index: 60; - box-sizing: border-box; - padding: 8px; - pointer-events: none; - background: repeating-linear-gradient(45deg, #facc15 0 12px, #111 12px 24px); - -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); - -webkit-mask-composite: xor; - mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); -} - -.staging-tab { - position: fixed; - top: 0; - left: 50%; - z-index: 61; - transform: translateX(-50%); - pointer-events: none; - user-select: none; - padding: 2px 16px 4px; - border: 2px solid #111; - border-top: 0; - border-radius: 0 0 8px 8px; - background: #facc15; - color: #111; - font-size: 12px; - font-weight: 700; - letter-spacing: 0.12em; - text-transform: uppercase; -} diff --git a/app/assets/tailwind/application.css b/app/assets/tailwind/application.css index f1d8c73..8296421 100644 --- a/app/assets/tailwind/application.css +++ b/app/assets/tailwind/application.css @@ -1 +1,1315 @@ @import "tailwindcss"; +@import "./fonts.css"; + +/* ───────────────────────────────────────────────────────────── + Patchwork "quilt" design tokens. + + The palette is shared with patchworklabs.org: a quilt of purples + with one blue patch, one teal patch, and deep stitch-purple + outlines. Keep the hex values in sync with the website's + globals.css. The canonical reference lives in internal-docs, + design/tokens.md. + + Every color is declared once with light-dark(). The + element carries color-scheme (set by shared/_theme before first + paint, or by the OS when scripts are off), and the browser picks + the side. Utilities such as bg-paper, text-ink and border-seam + resolve through these variables, so the whole app re-themes from + this block alone. + ───────────────────────────────────────────────────────────── */ + +@theme { + /* Grounds */ + --color-quilt: light-dark(#f7f5fb, #16112a); /* page background */ + --color-paper: light-dark(#fefdff, #1f1938); /* cards, tables, inputs */ + --color-panel: light-dark(#f1edf8, #1a1430); /* sidebars, table heads, wells */ + + /* Ink */ + --color-ink: light-dark(#2a2050, #e9e4f7); /* primary text, the stitch color */ + --color-ink-soft: light-dark(#5d5584, #a79ecb); /* secondary text */ + --color-ink-faint: light-dark(#6b6490, #938bb7); /* captions, placeholders; 4.5:1 on paper and panel */ + + /* Lines */ + --color-seam: light-dark(rgb(42 32 80 / 0.24), rgb(233 228 247 / 0.2)); /* dashed stitch lines */ + --color-hairline: light-dark(rgb(42 32 80 / 0.1), rgb(233 228 247 / 0.1)); /* solid dividers */ + + /* Patches */ + --color-grape: light-dark(#6c3ec1, #a988e9); /* primary */ + --color-grape-deep: light-dark(#5a31a6, #9271d6); /* primary, pressed or hovered */ + --color-grape-soft: light-dark(#ebe3f9, #322557); + --color-violet: light-dark(#9b7fd4, #b8a1e4); + --color-violet-soft: light-dark(#f0ebfb, #2c2349); + --color-orchid: light-dark(#a44fc8, #cd8ce6); + --color-orchid-soft: light-dark(#f4e6f9, #3a214c); + --color-sky: light-dark(#2f7cd6, #74a9eb); + --color-sky-soft: light-dark(#dfebfa, #1d2c49); + --color-teal: light-dark(#2aa187, #4fc4a9); + --color-teal-soft: light-dark(#daf1ea, #163a32); + + /* Semantic. Success is the teal patch and info is the sky patch; + warning and danger are the only colors from outside the quilt. */ + --color-success: light-dark(#187261, #4fc4a9); + --color-success-soft: light-dark(#daf1ea, #163a32); + --color-info: light-dark(#2f7cd6, #74a9eb); + --color-info-soft: light-dark(#dfebfa, #1d2c49); + --color-warning: light-dark(#935203, #f0b45a); + --color-warning-soft: light-dark(#fdf1dc, #3d2a0f); + --color-danger: light-dark(#ad2e49, #f28aa0); + --color-danger-soft: light-dark(#fbe6ea, #47202b); + + /* Text on a grape fill */ + --color-on-grape: light-dark(#ffffff, #16112a); + + /* Fonts. Geist carries the interface; Shantell Sans is the + display voice for the wordmark and the big headings on the + focus pages only. */ + --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + --font-display: "Shantell Sans", "Geist", ui-sans-serif, sans-serif; + --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; + + /* Radii */ + --radius-control: 0.625rem; /* 10px: buttons, inputs, badges that are not pills */ + --radius-card: 0.875rem; /* 14px: cards, dialogs */ + + /* Shadows. Both carry an offset and a blur: the card sits on the + quilt, the patch lifts off it like a corner of fabric. */ + --shadow-card: 0 1px 2px light-dark(rgb(42 32 80 / 0.05), rgb(0 0 0 / 0.3)), + 0 8px 20px -12px light-dark(rgb(42 32 80 / 0.25), rgb(0 0 0 / 0.6)); + --shadow-patch: 4px 6px 0 -1px light-dark(rgb(42 32 80 / 0.1), rgb(0 0 0 / 0.35)), + 4px 10px 24px -10px light-dark(rgb(42 32 80 / 0.3), rgb(0 0 0 / 0.6)); + --shadow-overlay: 0 24px 60px -20px light-dark(rgb(42 32 80 / 0.45), rgb(0 0 0 / 0.8)), + 0 2px 6px light-dark(rgb(42 32 80 / 0.1), rgb(0 0 0 / 0.5)); + + /* Motion */ + --ease-out: cubic-bezier(0.22, 1, 0.36, 1); + --duration-fast: 120ms; + --duration-base: 180ms; +} + +/* Theme switch. shared/_theme sets data-theme before first paint. + Without scripts the OS preference applies through "light dark". */ +:root { color-scheme: light dark; } +:root[data-theme="light"] { color-scheme: light; } +:root[data-theme="dark"] { color-scheme: dark; } + +/* Plumbing the motifs need outside of Tailwind utilities */ +:root { + --lattice-line: light-dark(rgb(108 62 193 / 0.045), rgb(169 136 233 / 0.05)); + --focus-ring-color: light-dark(rgb(108 62 193 / 0.7), rgb(169 136 233 / 0.75)); + --focus-ring: 0 0 0 3px var(--focus-ring-color); +} + +/* ───────────────────────────────────────────────────────────── + Base: the parts of the page nobody draws but everyone sees. + ───────────────────────────────────────────────────────────── */ +@layer base { + html { + font-family: var(--font-sans); + color: var(--color-ink); + background-color: var(--color-quilt); + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + font-variant-numeric: tabular-nums; + accent-color: var(--color-grape); + } + + body { min-height: 100dvh; } + + ::selection { + background-color: var(--color-grape); + color: var(--color-on-grape); + } + + /* Keyboard focus is an outline, not a box-shadow, so a component's own + shadow (btn-primary, the floating theme toggle, the current nav link) + can never cover it. */ + :focus-visible { + outline: 3px solid var(--focus-ring-color); + outline-offset: 1px; + border-radius: var(--radius-control); + } + + /* Keyboard users skip the top bar and the sidebar. Visible on focus only. */ + .skip-link { + position: absolute; + top: 0.5rem; + left: 0.5rem; + z-index: 100; + padding: 0.5rem 0.875rem; + border-radius: var(--radius-control); + background-color: var(--color-grape); + color: var(--color-on-grape); + font-size: 0.875rem; + font-weight: 600; + text-decoration: none; + transform: translateY(-200%); + } + .skip-link:focus { transform: none; } + /* The skip link's target takes focus so the next Tab starts there; it + needs no ring of its own. */ + main:focus-visible, [tabindex="-1"]:focus-visible { outline: none; } + + code, kbd, pre, samp { font-family: var(--font-mono); } + + /* Thin, tinted scrollbars on overflowing panels */ + .scroll-x, .table-wrap, .cmdk-list, .sidebar-nav { + scrollbar-width: thin; + scrollbar-color: var(--color-seam) transparent; + } + + /* Turbo frames are inline by default, which lets a wide table inside one + push the page sideways instead of scrolling inside .table-wrap. */ + turbo-frame { display: block; } + + details > summary { cursor: pointer; } + details > summary::-webkit-details-marker { display: none; } + details > summary { list-style: none; } + /* A folded card: the header is the summary, with a chevron that turns. */ + details.card:not([open]) > summary.card-header { border-bottom: 0; } + details.card > summary.card-header > svg:last-child { flex: none; transition: transform var(--duration-fast) var(--ease-out); } + details.card[open] > summary.card-header > svg:last-child { transform: rotate(180deg); } + + + @media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } + /* The remaining-time bar only means something while it moves. */ + .toast-bar { display: none; } + } +} + +/* ───────────────────────────────────────────────────────────── + Components. The vocabulary is documented in internal-docs, + design/components.md, with an ERB example for each class. Add a + class here, then add it there, in the same pull request. + ───────────────────────────────────────────────────────────── */ +@layer components { + + /* ── Grounds ────────────────────────────────────────────── */ + + /* A faint diamond quilting lattice over the lavender paper, for + the focus pages (sign in, consent, onboarding). Operating pages + use the flat bg-quilt so tables stay crisp. */ + .quilt-bg { + background-color: var(--color-quilt); + background-image: + repeating-linear-gradient(45deg, var(--lattice-line) 0 1px, transparent 1px 34px), + repeating-linear-gradient(-45deg, var(--lattice-line) 0 1px, transparent 1px 34px); + background-size: 48px 48px; + background-attachment: fixed; + } + + /* ── Wordmark ───────────────────────────────────────────── */ + + .wordmark { + display: inline-flex; + align-items: center; + gap: 0.5rem; + font-family: var(--font-display); + font-weight: 700; + font-size: 1.25rem; + line-height: 1; + color: var(--color-ink); + text-decoration: none; + letter-spacing: -0.01em; + } + .wordmark-lg { font-size: 1.75rem; } + + /* The grandmother's-flower-garden quilt block: four patches in a + rosette. The only ornament in the system. */ + .rosette { + display: inline-block; + width: 1em; + height: 1em; + flex: none; + vertical-align: -0.15em; + background: + radial-gradient(circle at 50% 27%, var(--color-grape) 0 22%, transparent 23%), + radial-gradient(circle at 27% 63%, var(--color-violet) 0 22%, transparent 23%), + radial-gradient(circle at 73% 63%, var(--color-sky) 0 22%, transparent 23%), + radial-gradient(circle at 50% 50%, var(--color-teal) 0 20%, transparent 21%); + } + + /* ── Surfaces ───────────────────────────────────────────── */ + + /* The workhorse container. One elevation signal: the soft shadow. + The dashed seam is the brand, kept at hairline weight. */ + .card { + background-color: var(--color-paper); + border: 1px dashed var(--color-seam); + border-radius: var(--radius-card); + box-shadow: var(--shadow-card); + } + .card-header { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.75rem 1rem; + padding: 1rem 1.25rem; + border-bottom: 1px solid var(--color-hairline); + } + .card-title { + font-size: 1rem; + font-weight: 600; + line-height: 1.3; + color: var(--color-ink); + } + .card-lede { + margin-top: 0.125rem; + font-size: 0.875rem; + color: var(--color-ink-soft); + } + .card-body { padding: 1.25rem; } + .card-footer { + padding: 0.875rem 1.25rem; + border-top: 1px solid var(--color-hairline); + background-color: var(--color-panel); + border-radius: 0 0 var(--radius-card) var(--radius-card); + } + .card-flush > .table-wrap { border-radius: 0 0 var(--radius-card) var(--radius-card); } + + /* A patch: the hero card for the focus pages. Heavier seam, lifted + shadow, and a slight tilt like fabric laid by hand. */ + .patch { + background-color: var(--color-paper); + border: 2px dashed var(--color-ink-soft); + border-radius: var(--radius-card); + box-shadow: var(--shadow-patch); + } + .patch-tilt-l { transform: rotate(-1.2deg); } + .patch-tilt-r { transform: rotate(1.1deg); } + @media (max-width: 40rem) { + .patch-tilt-l, .patch-tilt-r { transform: none; } + } + + /* A strip of stitched pastel patches, like the bound edge of a + quilt. Place it as the first child of .patch-bound. */ + .quilt-binding { + height: 10px; + position: relative; + background-image: repeating-linear-gradient( + 90deg, + var(--color-grape) 0 26px, + var(--color-violet) 26px 52px, + var(--color-sky) 52px 78px, + var(--color-teal) 78px 104px, + var(--color-orchid) 104px 130px + ); + } + .quilt-binding::after { + content: ""; + position: absolute; + inset: 0; + background-image: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.5) 0 4px, transparent 4px 10px); + opacity: 0.5; + mix-blend-mode: overlay; + } + .patch-bound { overflow: hidden; } + .patch-bound > .quilt-binding { margin: -2px -2px 0; width: calc(100% + 4px); } + + /* A well: a recessed, tinted area inside a card for a highlighted + group of fields or a summary. */ + .well { + background-color: var(--color-panel); + border: 1px solid var(--color-hairline); + border-radius: var(--radius-control); + padding: 1rem; + } + + /* ── Page structure ─────────────────────────────────────── */ + + /* width: 100% matters: as a flex item with auto side margins the page + would size to its content and a wide table would push it past the + viewport instead of scrolling inside .table-wrap. */ + .page { width: 100%; max-width: 72rem; margin-inline: auto; padding: 1.5rem 1rem 4rem; } + .page-narrow { max-width: 44rem; } + .page-wide { max-width: 88rem; } + @media (min-width: 40rem) { .page { padding: 2rem 1.5rem 5rem; } } + + .page-header { + display: flex; + flex-wrap: wrap; + align-items: flex-end; + justify-content: space-between; + gap: 0.75rem 1.5rem; + margin-bottom: 1.5rem; + } + .page-title { + font-size: 1.5rem; + font-weight: 600; + line-height: 1.2; + letter-spacing: -0.02em; + color: var(--color-ink); + text-wrap: balance; + } + .page-lede { + margin-top: 0.375rem; + max-width: 65ch; + color: var(--color-ink-soft); + } + .page-actions { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.5rem; + } + + .section-title { + font-size: 0.8125rem; + font-weight: 600; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--color-ink-faint); + margin-bottom: 0.75rem; + } + + /* ── Buttons ────────────────────────────────────────────── */ + + .btn { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.4rem; + min-height: 2.5rem; + padding: 0.5rem 1rem; + border: 1px solid transparent; + border-radius: var(--radius-control); + font-size: 0.875rem; + font-weight: 600; + line-height: 1.25; + white-space: nowrap; + cursor: pointer; + text-decoration: none; + transition: + background-color var(--duration-fast) var(--ease-out), + border-color var(--duration-fast) var(--ease-out), + color var(--duration-fast) var(--ease-out), + transform var(--duration-fast) var(--ease-out), + box-shadow var(--duration-fast) var(--ease-out); + } + .btn:active { transform: translateY(1px); } + .btn:disabled, .btn[aria-disabled="true"] { + opacity: 0.5; + cursor: not-allowed; + transform: none; + } + .btn svg { width: 1rem; height: 1rem; flex: none; } + + /* Primary: a grape patch with a white stitch seam. One per view. */ + .btn-primary { + background-color: var(--color-grape); + color: var(--color-on-grape); + border: 1px dashed light-dark(rgb(255 255 255 / 0.55), rgb(22 17 42 / 0.5)); + box-shadow: 0 1px 2px light-dark(rgb(42 32 80 / 0.15), rgb(0 0 0 / 0.4)); + } + .btn-primary:hover { background-color: var(--color-grape-deep); } + + /* Secondary: ink seam on paper. The default for everything else. */ + .btn-secondary { + background-color: var(--color-paper); + color: var(--color-ink); + border: 1px dashed var(--color-seam); + } + .btn-secondary:hover { background-color: var(--color-grape-soft); border-color: var(--color-grape); } + + /* Quiet: no chrome until hovered. For toolbars and table rows. */ + .btn-quiet { + background-color: transparent; + color: var(--color-ink-soft); + } + .btn-quiet:hover { background-color: var(--color-grape-soft); color: var(--color-ink); } + + /* Danger: a quiet red that fills on hover. Confirm before the action. */ + .btn-danger { + background-color: transparent; + color: var(--color-danger); + border: 1px dashed color-mix(in oklab, var(--color-danger) 45%, transparent); + } + .btn-danger:hover { background-color: var(--color-danger-soft); border-color: var(--color-danger); } + .btn-danger-solid { + background-color: var(--color-danger); + color: #fff; + } + .btn-danger-solid:hover { background-color: color-mix(in oklab, var(--color-danger) 85%, black); } + + .btn-sm { min-height: 2rem; padding: 0.25rem 0.75rem; font-size: 0.8125rem; } + .btn-sm svg { width: 0.875rem; height: 0.875rem; } + .btn-lg { min-height: 2.875rem; padding: 0.75rem 1.5rem; font-size: 0.9375rem; } + .btn-block { width: 100%; } + .btn-icon { padding: 0; width: 2.5rem; } + .btn-icon.btn-sm { width: 2rem; } + + /* A toolbar of buttons: wraps, keeps gaps even */ + .btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; } + + /* ── Links ──────────────────────────────────────────────── */ + + .link { + color: var(--color-grape); + font-weight: 500; + text-decoration: underline; + text-decoration-style: dashed; + text-underline-offset: 3px; + text-decoration-thickness: 1px; + transition: color var(--duration-fast) var(--ease-out); + } + .link:hover { color: var(--color-ink); } + .link-quiet { color: inherit; text-decoration: none; } + .link-quiet:hover { color: var(--color-grape); text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 3px; } + + /* ── Forms ──────────────────────────────────────────────── */ + + .field-group { display: flex; flex-direction: column; gap: 0.375rem; } + .field-label { + display: block; + font-size: 0.875rem; + font-weight: 500; + color: var(--color-ink); + } + .field-label .optional { font-weight: 400; color: var(--color-ink-faint); } + .field { + display: block; + width: 100%; + min-height: 2.5rem; + padding: 0.5rem 0.75rem; + background-color: var(--color-paper); + color: var(--color-ink); + border: 1px solid var(--color-seam); + border-radius: var(--radius-control); + font: inherit; + font-size: 0.9375rem; + line-height: 1.4; + transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); + } + .field::placeholder { color: var(--color-ink-faint); } + .field:hover { border-color: var(--color-ink-faint); } + .field:focus { outline: none; border-color: var(--color-grape); box-shadow: var(--focus-ring); } + .field:disabled, .field[readonly] { + background-color: var(--color-panel); + color: var(--color-ink-soft); + cursor: default; + } + .field[aria-invalid="true"], .field-group.is-invalid .field { + border-color: var(--color-danger); + } + textarea.field { min-height: 5rem; resize: vertical; } + select.field { + appearance: none; + padding-right: 2.25rem; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a83a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 0.625rem center; + background-size: 1rem; + } + .field-sm { min-height: 2rem; padding: 0.25rem 0.625rem; font-size: 0.875rem; } + .field-hint { font-size: 0.8125rem; color: var(--color-ink-faint); } + .field-error { font-size: 0.8125rem; color: var(--color-danger); } + .field-static { + display: block; + width: 100%; + min-height: 2.5rem; + padding: 0.5rem 0.75rem; + background-color: var(--color-panel); + color: var(--color-ink-soft); + border: 1px solid var(--color-hairline); + border-radius: var(--radius-control); + font-size: 0.9375rem; + line-height: 1.4; + } + + .checkbox, .radio { + width: 1rem; + height: 1rem; + flex: none; + margin-top: 0.125rem; + border: 1px solid var(--color-seam); + border-radius: 0.25rem; + background-color: var(--color-paper); + accent-color: var(--color-grape); + } + .radio { border-radius: 9999px; } + .choice { + display: flex; + align-items: flex-start; + gap: 0.625rem; + font-size: 0.875rem; + color: var(--color-ink); + cursor: pointer; + } + .choice-hint { display: block; margin-top: 0.125rem; color: var(--color-ink-soft); font-weight: 400; } + + /* Fields side by side on wide screens */ + .form-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; } + @media (min-width: 40rem) { + .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } + .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .form-grid .span-2 { grid-column: span 2; } + } + .form-actions { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + align-items: center; + gap: 0.5rem; + padding-top: 0.5rem; + } + + /* Search box: an input with a leading icon */ + .search { + position: relative; + display: block; + } + .search > svg { + position: absolute; + left: 0.75rem; + top: 50%; + width: 1rem; + height: 1rem; + transform: translateY(-50%); + color: var(--color-ink-faint); + pointer-events: none; + } + .search > .field { padding-left: 2.25rem; } + .search > .field::-webkit-search-cancel-button { cursor: pointer; } + + /* ── Badges ─────────────────────────────────────────────── */ + + .badge { + display: inline-flex; + align-items: center; + gap: 0.25rem; + padding: 0.125rem 0.5rem; + border-radius: 9999px; + font-size: 0.75rem; + font-weight: 600; + line-height: 1.25rem; + white-space: nowrap; + background-color: var(--color-panel); + color: var(--color-ink-soft); + border: 1px solid transparent; + } + .badge svg { width: 0.75rem; height: 0.75rem; } + .badge-grape { background-color: var(--color-grape-soft); color: var(--color-grape); } + .badge-violet { background-color: var(--color-violet-soft); color: light-dark(#6b4fb3, #cdbdf0); } + .badge-orchid { background-color: var(--color-orchid-soft); color: light-dark(#8a3dab, #e0a8f0); } + .badge-sky { background-color: var(--color-sky-soft); color: light-dark(#2463ad, #97bff2); } + .badge-teal { background-color: var(--color-teal-soft); color: light-dark(#1a6b5a, #7bd6bf); } + .badge-success { background-color: var(--color-success-soft); color: var(--color-success); } + .badge-info { background-color: var(--color-info-soft); color: light-dark(#2463ad, #97bff2); } + .badge-warning { background-color: var(--color-warning-soft); color: var(--color-warning); } + .badge-danger { background-color: var(--color-danger-soft); color: var(--color-danger); } + .badge-solid { background-color: var(--color-grape); color: var(--color-on-grape); } + .badge-outline { background-color: transparent; border-color: var(--color-seam); color: var(--color-ink-soft); } + + /* A keyboard key, for shortcuts in menus and the command bar */ + .kbd { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 1.5rem; + height: 1.375rem; + padding: 0 0.375rem; + border: 1px solid var(--color-hairline); + border-bottom-width: 2px; + border-radius: 0.375rem; + background-color: var(--color-panel); + font-family: var(--font-sans); + font-size: 0.6875rem; + font-weight: 600; + color: var(--color-ink-faint); + } + + /* ── Callouts ───────────────────────────────────────────── */ + + .callout { + display: flex; + gap: 0.75rem; + padding: 0.875rem 1rem; + border-radius: var(--radius-control); + border: 1px solid var(--color-hairline); + background-color: var(--color-panel); + color: var(--color-ink); + font-size: 0.875rem; + line-height: 1.5; + } + .callout > svg { width: 1.125rem; height: 1.125rem; flex: none; margin-top: 0.125rem; } + .callout-title { font-weight: 600; } + .callout-body { flex: 1; min-width: 0; } + .callout-body p + p { margin-top: 0.375rem; } + .callout-info { background-color: var(--color-info-soft); border-color: color-mix(in oklab, var(--color-info) 30%, transparent); } + .callout-info > svg { color: var(--color-info); } + .callout-success { background-color: var(--color-success-soft); border-color: color-mix(in oklab, var(--color-success) 30%, transparent); } + .callout-success > svg { color: var(--color-success); } + .callout-warning { background-color: var(--color-warning-soft); border-color: color-mix(in oklab, var(--color-warning) 35%, transparent); } + .callout-warning > svg { color: var(--color-warning); } + .callout-danger { background-color: var(--color-danger-soft); border-color: color-mix(in oklab, var(--color-danger) 35%, transparent); } + .callout-danger > svg { color: var(--color-danger); } + .callout-grape { background-color: var(--color-grape-soft); border-color: color-mix(in oklab, var(--color-grape) 35%, transparent); } + .callout-grape > svg { color: var(--color-grape); } + + /* ── Tables ─────────────────────────────────────────────── */ + + /* position: relative keeps an absolutely positioned child (an .sr-only + column header) inside the scroll box, so a wide table scrolls here + instead of widening the page. */ + .table-wrap { position: relative; overflow-x: auto; } + .table { + width: 100%; + border-collapse: collapse; + font-size: 0.875rem; + } + .table th { + padding: 0.625rem 1rem; + text-align: left; + font-size: 0.75rem; + font-weight: 600; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--color-ink-faint); + background-color: var(--color-panel); + border-bottom: 1px solid var(--color-hairline); + white-space: nowrap; + } + .table td { + padding: 0.75rem 1rem; + vertical-align: top; + color: var(--color-ink); + border-bottom: 1px solid var(--color-hairline); + } + .table tbody tr:last-child td { border-bottom: 0; } + .table tbody tr:hover td { background-color: color-mix(in oklab, var(--color-grape-soft) 45%, transparent); } + .table tr.is-current td { background-color: color-mix(in oklab, var(--color-teal-soft) 55%, transparent); } + .table .num { text-align: right; font-variant-numeric: tabular-nums; } + .table .actions { text-align: right; white-space: nowrap; } + .table .actions form { display: inline-block; } + .table .actions > * + * { margin-left: 0.25rem; } + .table-sub { display: block; margin-top: 0.125rem; font-size: 0.75rem; color: var(--color-ink-faint); } + .table-empty { padding: 2.5rem 1rem; text-align: center; color: var(--color-ink-faint); font-size: 0.875rem; } + + /* Mono values in tables and lists: ids, slugs, hashes */ + .mono { font-family: var(--font-mono); font-size: 0.8125em; } + .code-chip { + display: inline-block; + max-width: 100%; + padding: 0.125rem 0.375rem; + border-radius: 0.375rem; + background-color: var(--color-panel); + border: 1px solid var(--color-hairline); + font-family: var(--font-mono); + font-size: 0.8125em; + color: var(--color-ink); + overflow-wrap: anywhere; + } + .code-block { + display: block; + padding: 0.75rem 0.875rem; + border-radius: var(--radius-control); + background-color: var(--color-panel); + border: 1px solid var(--color-hairline); + font-family: var(--font-mono); + font-size: 0.8125rem; + line-height: 1.6; + color: var(--color-ink); + white-space: pre-wrap; + overflow-wrap: anywhere; + } + + /* A value with a copy button beside it */ + .copyable { + display: flex; + align-items: center; + gap: 0.375rem; + min-width: 0; + } + .copyable > .code-chip { flex: 1; min-width: 0; padding: 0.375rem 0.625rem; white-space: nowrap; overflow-x: auto; } + + /* ── Description lists ──────────────────────────────────── */ + + /* Rows of label and value. Stacks on narrow screens. */ + .dl { display: flex; flex-direction: column; } + .dl-row { + display: grid; + grid-template-columns: 1fr; + gap: 0.125rem 1rem; + padding: 0.625rem 0; + border-bottom: 1px solid var(--color-hairline); + } + .dl-row:last-child { border-bottom: 0; } + .dl dt { font-size: 0.8125rem; color: var(--color-ink-faint); } + .dl dd { font-size: 0.875rem; color: var(--color-ink); overflow-wrap: anywhere; } + @media (min-width: 40rem) { + .dl-row { grid-template-columns: 11rem minmax(0, 1fr); align-items: baseline; } + } + .dl-stack .dl-row { grid-template-columns: 1fr; } + + /* ── Stats ──────────────────────────────────────────────── */ + + .stat { + display: flex; + flex-direction: column; + gap: 0.25rem; + padding: 1rem 1.25rem; + } + .stat-label { font-size: 0.8125rem; font-weight: 500; color: var(--color-ink-soft); } + .stat-value { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--color-ink); } + .stat-note { font-size: 0.75rem; color: var(--color-ink-faint); } + + /* ── Empty states ───────────────────────────────────────── */ + + .empty { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: 0.375rem; + padding: 2.5rem 1.5rem; + } + .empty > svg { width: 1.75rem; height: 1.75rem; color: var(--color-ink-faint); margin-bottom: 0.25rem; } + .empty-title { font-weight: 600; color: var(--color-ink); } + .empty-body { max-width: 40ch; font-size: 0.875rem; color: var(--color-ink-soft); } + .empty .btn { margin-top: 0.75rem; } + + /* ── Lists of records ───────────────────────────────────── */ + + .record-list { display: flex; flex-direction: column; } + .record { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 0.5rem 1rem; + padding: 0.75rem 0; + border-bottom: 1px solid var(--color-hairline); + } + .record:last-child { border-bottom: 0; } + .record-main { flex: 1 1 0; min-width: min(14rem, 100%); overflow-wrap: anywhere; } + .record-title { font-size: 0.875rem; font-weight: 500; color: var(--color-ink); } + .record-meta { font-size: 0.8125rem; color: var(--color-ink-faint); } + .record-actions { display: flex; flex: none; align-items: center; gap: 0.25rem; } + .card-body > .record-list > .record:first-child { padding-top: 0; } + .card-body > .record-list > .record:last-child { padding-bottom: 0; } + + /* ── Avatars ────────────────────────────────────────────── */ + + .avatar { + display: inline-flex; + align-items: center; + justify-content: center; + flex: none; + width: 2.5rem; + height: 2.5rem; + border-radius: 9999px; + background-color: var(--color-grape-soft); + color: var(--color-grape); + font-weight: 600; + font-size: 0.875rem; + object-fit: cover; + overflow: hidden; + } + .avatar-sm { width: 1.75rem; height: 1.75rem; font-size: 0.6875rem; } + .avatar-lg { width: 4rem; height: 4rem; font-size: 1.375rem; } + .avatar-xl { width: 5rem; height: 5rem; font-size: 1.75rem; } + + /* ── Steps (onboarding) ─────────────────────────────────── */ + + .steps { display: flex; flex-direction: column; gap: 0.625rem; } + .step { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--color-ink-faint); } + .step-marker { + display: inline-flex; + align-items: center; + justify-content: center; + flex: none; + width: 1.625rem; + height: 1.625rem; + border-radius: 9999px; + background-color: var(--color-panel); + color: var(--color-ink-faint); + font-size: 0.75rem; + font-weight: 700; + } + .step-marker svg { width: 0.875rem; height: 0.875rem; } + .step.is-done { color: var(--color-ink); } + .step.is-done .step-marker { background-color: var(--color-success-soft); color: var(--color-success); } + .step.is-current { color: var(--color-ink); font-weight: 600; } + .step.is-current .step-marker { background-color: var(--color-grape); color: var(--color-on-grape); } + + /* ── App shell: top bar (member pages) ──────────────────── */ + + .topbar { + position: sticky; + top: 0; + z-index: 30; + background-color: color-mix(in oklab, var(--color-quilt) 88%, transparent); + backdrop-filter: blur(8px); + border-bottom: 1px solid var(--color-hairline); + } + .topbar-inner { + max-width: 72rem; + margin-inline: auto; + padding: 0 1rem; + height: 3.5rem; + display: flex; + align-items: center; + gap: 1rem; + } + @media (min-width: 40rem) { .topbar-inner { padding: 0 1.5rem; } } + .topbar-nav { display: none; align-items: center; gap: 0.125rem; margin-left: 0.5rem; } + @media (min-width: 64rem) { .topbar-nav { display: flex; } } + .topbar-end { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; } + + .nav-link { + display: inline-flex; + align-items: center; + gap: 0.5rem; + padding: 0.375rem 0.625rem; + border-radius: var(--radius-control); + font-size: 0.875rem; + font-weight: 500; + color: var(--color-ink-soft); + text-decoration: none; + transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); + } + .nav-link svg { width: 1rem; height: 1rem; flex: none; } + .nav-link:hover { background-color: var(--color-grape-soft); color: var(--color-ink); } + .nav-link[aria-current="page"] { background-color: var(--color-grape-soft); color: var(--color-grape); } + + /* The mobile nav sheet under the top bar */ + .topbar-sheet { + display: none; + padding: 0.5rem 1rem 0.75rem; + border-top: 1px solid var(--color-hairline); + } + .topbar-sheet[data-open="true"] { display: grid; gap: 0.125rem; } + @media (min-width: 64rem) { .topbar-sheet[data-open="true"] { display: none; } } + .topbar-menu-btn { display: inline-flex; } + @media (min-width: 64rem) { .topbar-menu-btn { display: none; } } + /* Admin, Identity and Sign out show only their icon until the bar has room for the words */ + .topbar-btn-label { display: none; } + @media (min-width: 80rem) { .topbar-btn-label { display: inline; } } + + /* ── App shell: sidebar (admin) ─────────────────────────── */ + + .admin-shell { display: flex; min-height: 100dvh; } + .sidebar { + display: flex; + flex-direction: column; + width: 15.5rem; + flex: none; + background-color: var(--color-panel); + border-right: 1px solid var(--color-hairline); + position: fixed; + inset: 0 auto 0 0; + z-index: 40; + transform: translateX(-100%); + /* Closed, the drawer leaves the tab order too (visibility waits for the + slide to finish). */ + visibility: hidden; + transition: transform var(--duration-base) var(--ease-out), visibility 0s linear var(--duration-base); + } + .sidebar[data-open="true"] { transform: none; visibility: visible; transition-delay: 0s; box-shadow: var(--shadow-overlay); } + .sidebar-scrim { + position: fixed; + inset: 0; + z-index: 39; + background-color: light-dark(rgb(42 32 80 / 0.35), rgb(0 0 0 / 0.55)); + display: none; + } + .sidebar-scrim[data-open="true"] { display: block; } + @media (min-width: 64rem) { + .sidebar { position: sticky; top: 0; height: 100dvh; transform: none; visibility: visible; box-shadow: none; } + .sidebar-scrim, .sidebar-scrim[data-open="true"] { display: none; } + } + .sidebar-brand { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.5rem; + height: 3.5rem; + padding: 0 1rem 0 1.25rem; + border-bottom: 1px solid var(--color-hairline); + } + .sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem; } + .sidebar-nav .nav-link { display: flex; width: 100%; padding: 0.5rem 0.625rem; } + .sidebar-nav .nav-link[aria-current="page"] { background-color: var(--color-paper); color: var(--color-grape); box-shadow: var(--shadow-card); } + .nav-section { margin-bottom: 1rem; } + .nav-section-title { + padding: 0 0.625rem; + margin-bottom: 0.25rem; + font-size: 0.6875rem; + font-weight: 600; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--color-ink-faint); + } + .sidebar-foot { + padding: 0.75rem; + border-top: 1px solid var(--color-hairline); + display: flex; + flex-direction: column; + gap: 0.375rem; + } + .sidebar-user { + display: flex; + align-items: center; + gap: 0.625rem; + padding: 0.375rem 0.5rem; + min-width: 0; + } + .sidebar-user-name { font-size: 0.875rem; font-weight: 600; color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + .sidebar-user-role { font-size: 0.75rem; color: var(--color-ink-faint); } + + .admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } + .admin-topbar { + position: sticky; + top: 0; + z-index: 30; + height: 3.5rem; + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0 1rem; + background-color: color-mix(in oklab, var(--color-quilt) 88%, transparent); + backdrop-filter: blur(8px); + border-bottom: 1px solid var(--color-hairline); + } + @media (min-width: 40rem) { .admin-topbar { padding: 0 1.5rem; } } + .admin-topbar-crumb { font-size: 0.875rem; color: var(--color-ink-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .admin-topbar-crumb strong { color: var(--color-ink); font-weight: 600; } + .admin-topbar-end { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; } + .sidebar-menu-btn { display: inline-flex; } + @media (min-width: 64rem) { .sidebar-menu-btn { display: none; } } + + /* The command-bar trigger that lives in both top bars */ + .cmdk-trigger { + display: inline-flex; + align-items: center; + gap: 0.5rem; + height: 2.25rem; + padding: 0 0.625rem 0 0.75rem; + border-radius: var(--radius-control); + border: 1px solid var(--color-hairline); + background-color: var(--color-paper); + color: var(--color-ink-faint); + font-size: 0.875rem; + white-space: nowrap; + flex-shrink: 0; + cursor: pointer; + transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); + } + .cmdk-trigger:hover { border-color: var(--color-seam); color: var(--color-ink-soft); } + .cmdk-trigger svg { width: 1rem; height: 1rem; } + .cmdk-trigger-label { display: none; } + .cmdk-trigger .kbd { display: none; } + @media (min-width: 40rem) { + .cmdk-trigger .kbd { display: inline-flex; } + /* The member top bar is full; only the admin top bar has room for the words */ + .admin-topbar .cmdk-trigger { min-width: 15rem; } + .admin-topbar .cmdk-trigger-label { display: inline; flex: 1; text-align: left; padding-right: 0.5rem; } + } + + /* ── Banners ────────────────────────────────────────────── */ + + /* The impersonation banner: loud on purpose, never dismissible */ + .banner-warning { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + gap: 0.5rem 1rem; + padding: 0.5rem 1rem; + background-color: var(--color-warning); + color: light-dark(#fff, #16112a); + font-size: 0.875rem; + font-weight: 500; + } + .banner-warning svg { width: 1rem; height: 1rem; } + .banner-warning .btn { min-height: 2rem; padding: 0.25rem 0.75rem; font-size: 0.8125rem; background-color: light-dark(rgb(255 255 255 / 0.2), rgb(22 17 42 / 0.2)); color: inherit; border: 1px solid light-dark(rgb(255 255 255 / 0.5), rgb(22 17 42 / 0.4)); } + .banner-warning .btn:hover { background-color: light-dark(rgb(255 255 255 / 0.3), rgb(22 17 42 / 0.3)); } + + /* ── Toasts (flash) ─────────────────────────────────────── */ + + .toasts { + position: fixed; + top: 1rem; + right: 1rem; + left: 1rem; + z-index: 60; + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 0.5rem; + pointer-events: none; + } + @media (min-width: 40rem) { .toasts { left: auto; width: 24rem; } } + .toast { + pointer-events: auto; + position: relative; + display: flex; + align-items: flex-start; + gap: 0.625rem; + width: 100%; + padding: 0.75rem 2.25rem 0.75rem 0.875rem; + border-radius: var(--radius-control); + border: 1px solid var(--color-hairline); + background-color: var(--color-paper); + color: var(--color-ink); + box-shadow: var(--shadow-overlay); + font-size: 0.875rem; + line-height: 1.4; + overflow: hidden; + animation: toast-in var(--duration-base) var(--ease-out); + } + .toast > svg { width: 1.125rem; height: 1.125rem; flex: none; margin-top: 0.0625rem; } + .toast-success > svg { color: var(--color-success); } + .toast-danger > svg { color: var(--color-danger); } + .toast-warning > svg { color: var(--color-warning); } + .toast-info > svg { color: var(--color-info); } + .toast-close { + position: absolute; + top: 0.375rem; + right: 0.375rem; + display: inline-flex; + padding: 0.25rem; + border-radius: 0.375rem; + color: var(--color-ink-faint); + cursor: pointer; + } + .toast-close:hover { background-color: var(--color-panel); color: var(--color-ink); } + .toast-close svg { width: 0.875rem; height: 0.875rem; } + .toast-bar { + position: absolute; + left: 0; + bottom: 0; + height: 2px; + width: 100%; + background-color: var(--color-grape); + transform-origin: left; + animation: toast-bar var(--toast-duration, 6s) linear forwards; + } + .toast-success .toast-bar { background-color: var(--color-success); } + .toast-danger .toast-bar { background-color: var(--color-danger); } + .toast-warning .toast-bar { background-color: var(--color-warning); } + .toast.is-leaving { animation: toast-out var(--duration-base) var(--ease-out) forwards; } + @keyframes toast-in { from { opacity: 0; transform: translateY(-0.5rem); } } + @keyframes toast-out { to { opacity: 0; transform: translateY(-0.25rem); } } + @keyframes toast-bar { to { transform: scaleX(0); } } + + /* ── Theme toggle ───────────────────────────────────────── */ + + /* Sits inline in a top bar, or pinned to the corner on focus pages */ + .theme-toggle { + display: inline-flex; + align-items: center; + justify-content: center; + width: 2.25rem; + height: 2.25rem; + border-radius: var(--radius-control); + color: var(--color-ink-soft); + cursor: pointer; + transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); + } + .theme-toggle:hover { background-color: var(--color-grape-soft); color: var(--color-ink); } + .theme-toggle svg { width: 1.125rem; height: 1.125rem; } + /* One icon shows: the monitor while the theme follows the device, the + sun or the moon once it is pinned. shared/_theme sets both attributes. */ + .theme-toggle .tt-sun, .theme-toggle .tt-moon { display: none; } + :root[data-theme-source="manual"] .theme-toggle .tt-system { display: none; } + :root[data-theme-source="manual"][data-theme="light"] .theme-toggle .tt-sun { display: block; } + :root[data-theme-source="manual"][data-theme="dark"] .theme-toggle .tt-moon { display: block; } + .theme-toggle-floating { + position: fixed; + bottom: 1rem; + right: 1rem; + z-index: 40; + width: 2.75rem; + height: 2.75rem; + border-radius: 9999px; + background-color: var(--color-paper); + border: 1px dashed var(--color-seam); + box-shadow: var(--shadow-card); + } + .theme-toggle-floating:focus-visible { border-radius: 9999px; } + /* The focus pages: a grid so the page's wrapper fills the viewport (a + percentage min-height on the wrapper would not), minus the bottom + corner, which stays clear for the floating toggle. */ + .focus-main { display: grid; min-height: 100dvh; padding-bottom: 4.5rem; } + + + + /* ── Command bar (⌘K) ───────────────────────────────────── */ + + .cmdk { + width: min(40rem, calc(100vw - 2rem)); + max-height: min(32rem, calc(100dvh - 4rem)); + margin: 10vh auto auto; + padding: 0; + border: 1px dashed var(--color-seam); + border-radius: var(--radius-card); + background-color: var(--color-paper); + color: var(--color-ink); + box-shadow: var(--shadow-overlay); + display: none; + flex-direction: column; + overflow: hidden; + } + .cmdk[open] { display: flex; animation: cmdk-in var(--duration-base) var(--ease-out); } + .cmdk::backdrop { + background-color: light-dark(rgb(42 32 80 / 0.35), rgb(0 0 0 / 0.6)); + backdrop-filter: blur(2px); + } + @keyframes cmdk-in { from { opacity: 0; transform: translateY(-0.5rem) scale(0.985); } } + .cmdk-input-row { + display: flex; + align-items: center; + gap: 0.75rem; + padding: 0.875rem 1rem; + border-bottom: 1px solid var(--color-hairline); + } + .cmdk-input-row > svg { width: 1.125rem; height: 1.125rem; color: var(--color-ink-faint); flex: none; } + .cmdk-input { + flex: 1; + min-width: 0; + border: 0; + background: transparent; + font: inherit; + font-size: 1rem; + color: var(--color-ink); + } + .cmdk-input:focus { outline: none; box-shadow: none; } + .cmdk-input::placeholder { color: var(--color-ink-faint); } + .cmdk-list { overflow-y: auto; padding: 0.5rem; flex: 1; } + .cmdk-section-title { + padding: 0.5rem 0.625rem 0.25rem; + font-size: 0.6875rem; + font-weight: 600; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--color-ink-faint); + } + .cmdk-item { + display: flex; + align-items: center; + gap: 0.75rem; + width: 100%; + padding: 0.5rem 0.625rem; + border-radius: var(--radius-control); + text-align: left; + font-size: 0.875rem; + color: var(--color-ink); + cursor: pointer; + scroll-margin: 0.5rem; + } + .cmdk-item > svg { width: 1rem; height: 1rem; flex: none; color: var(--color-ink-faint); } + .cmdk-item[aria-selected="true"] { background-color: var(--color-grape-soft); } + .cmdk-item[aria-selected="true"] > svg { color: var(--color-grape); } + .cmdk-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .cmdk-item-hint { font-size: 0.75rem; color: var(--color-ink-faint); white-space: nowrap; } + .cmdk-empty { padding: 2rem 1rem; text-align: center; font-size: 0.875rem; color: var(--color-ink-faint); } + .cmdk-foot { + display: flex; + align-items: center; + gap: 1rem; + padding: 0.5rem 1rem; + border-top: 1px solid var(--color-hairline); + background-color: var(--color-panel); + font-size: 0.75rem; + color: var(--color-ink-faint); + } + .cmdk-foot span { display: inline-flex; align-items: center; gap: 0.25rem; } + + /* ── Tabs ───────────────────────────────────────────────── */ + + .tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--color-hairline); margin-bottom: 1.25rem; overflow-x: auto; } + .tab { + padding: 0.5rem 0.75rem; + margin-bottom: -1px; + border-bottom: 2px solid transparent; + font-size: 0.875rem; + font-weight: 500; + color: var(--color-ink-soft); + white-space: nowrap; + text-decoration: none; + } + .tab:hover { color: var(--color-ink); } + .tab[aria-current="page"] { color: var(--color-grape); border-bottom-color: var(--color-grape); } + + /* ── Staging marker ─────────────────────────────────────── */ + + /* A yellow and black hazard-stripe frame around the viewport and a + tab at the top. Fixed, ignores the pointer, takes no space. */ + .staging-frame { + position: fixed; + inset: 0; + z-index: 70; + box-sizing: border-box; + padding: 8px; + pointer-events: none; + background: repeating-linear-gradient(45deg, #facc15 0 12px, #111 12px 24px); + -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); + -webkit-mask-composite: xor; + mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); + } + .staging-tab { + position: fixed; + top: 0; + left: 50%; + z-index: 71; + transform: translateX(-50%); + pointer-events: none; + user-select: none; + padding: 2px 16px 4px; + border: 2px solid #111; + border-top: 0; + border-radius: 0 0 8px 8px; + background: #facc15; + color: #000; + font-size: 0.75rem; + font-weight: 700; + letter-spacing: 0.1em; + text-transform: uppercase; + } + + /* ── Loading ────────────────────────────────────────────── */ + + .spinner { animation: spin 0.8s linear infinite; } + @keyframes spin { to { transform: rotate(360deg); } } + .skeleton { + border-radius: 0.375rem; + background: linear-gradient(90deg, var(--color-panel) 25%, var(--color-grape-soft) 50%, var(--color-panel) 75%); + background-size: 200% 100%; + animation: shimmer 1.4s ease-in-out infinite; + } + @keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } } + + /* Turbo: dim a frame while it reloads */ + turbo-frame[busy] { opacity: 0.6; transition: opacity var(--duration-base) var(--ease-out); } +} + +/* ── Secure ID image viewer (see app/javascript/lib/secure_viewer.js) ── + No select, no drag, no touch callout. It blurs when the window loses + focus, and print never shows it. */ +.secure-viewer { + user-select: none; + -webkit-user-select: none; + -webkit-touch-callout: none; +} +.secure-viewer-canvas { + display: block; + max-width: 100%; + height: auto; + border: 1px solid var(--color-hairline); + border-radius: var(--radius-control); + pointer-events: none; + transition: filter 120ms ease-out; +} +.secure-viewer-blurred .secure-viewer-canvas { filter: blur(24px); } +@media print { + .secure-viewer, [data-controller~="secure-image"] { display: none !important; } +} +@media print { + [data-controller~="break-glass"] [data-break-glass-target="canvas"] { display: none !important; } +} diff --git a/app/assets/tailwind/fonts.css b/app/assets/tailwind/fonts.css new file mode 100644 index 0000000..1e52be1 --- /dev/null +++ b/app/assets/tailwind/fonts.css @@ -0,0 +1,116 @@ +/* Self-hosted brand fonts — Geist (body) + Shantell Sans (display). + Downloaded from Google Fonts, served locally from /public/fonts. + Keep in sync with patchworklabs.org. */ + +@font-face { + font-family: 'Geist'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url('/fonts/geist-400-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: 'Geist'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url('/fonts/geist-400-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: 'Geist'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url('/fonts/geist-500-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: 'Geist'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url('/fonts/geist-500-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: 'Geist'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url('/fonts/geist-600-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: 'Geist'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url('/fonts/geist-600-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: 'Geist'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url('/fonts/geist-700-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: 'Geist'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url('/fonts/geist-700-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: 'Shantell Sans'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url('/fonts/shantell-sans-500-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: 'Shantell Sans'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url('/fonts/shantell-sans-500-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: 'Shantell Sans'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url('/fonts/shantell-sans-600-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: 'Shantell Sans'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url('/fonts/shantell-sans-600-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: 'Shantell Sans'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url('/fonts/shantell-sans-700-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: 'Shantell Sans'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url('/fonts/shantell-sans-700-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; +} diff --git a/app/controllers/concerns/authentication.rb b/app/controllers/concerns/authentication.rb index f436a4a..e169547 100644 --- a/app/controllers/concerns/authentication.rb +++ b/app/controllers/concerns/authentication.rb @@ -57,6 +57,8 @@ def start_session(sub:, name:, email:, roles:) end def render_forbidden - render "errors/forbidden", status: :forbidden + # The member layout, whichever controller raised: the sign-in controllers use the focus + # layout, and the page is a card with the top bar, not a patch. + render "errors/forbidden", status: :forbidden, layout: "application" end end diff --git a/app/controllers/dev_sessions_controller.rb b/app/controllers/dev_sessions_controller.rb index 77f8f7d..2a36577 100644 --- a/app/controllers/dev_sessions_controller.rb +++ b/app/controllers/dev_sessions_controller.rb @@ -3,6 +3,7 @@ # and this controller checks the mode again on each request. class DevSessionsController < ApplicationController allow_unauthenticated_access + layout "focus" before_action :require_dev_mode PRESETS = [ diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index bee2f5a..546f6cb 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,6 +1,7 @@ # The sign-in page, the Weave OIDC flow and sign-out. class SessionsController < ApplicationController allow_unauthenticated_access + layout "focus" def new redirect_to archives_path if current_user&.reader? diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 443c536..d7c5a4d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5,28 +5,20 @@ def staging_environment? Rails.env.staging? || ENV["STASH_ENVIRONMENT"] == "staging" end - # The color of each status word. The badge always shows the word too, so the color never carries - # the meaning alone. - STATUS_CLASSES = { - "done" => "bg-emerald-100 text-emerald-900 dark:bg-emerald-900 dark:text-emerald-100", - "running" => "bg-sky-100 text-sky-900 dark:bg-sky-900 dark:text-sky-100", - "queued" => "bg-stone-100 text-stone-700 dark:bg-stone-800 dark:text-stone-300", - "partial" => "bg-amber-100 text-amber-900 dark:bg-amber-900 dark:text-amber-100", - "skipped" => "bg-stone-100 text-stone-600 dark:bg-stone-800 dark:text-stone-400", - "failed" => "bg-rose-100 text-rose-900 dark:bg-rose-900 dark:text-rose-100" + # The badge tone of each status word (internal-docs design/tokens.md: state uses the semantic + # tones). The badge always shows the word too, so the color never carries the meaning alone. + STATUS_TONES = { + "done" => :success, + "running" => :info, + "queued" => :neutral, + "partial" => :warning, + "skipped" => :outline, + "failed" => :danger }.freeze def status_badge(status) return "" if status.blank? - classes = STATUS_CLASSES.fetch(status.to_s, STATUS_CLASSES["queued"]) - content_tag(:span, status.to_s, class: "inline-block rounded-full px-2 py-0.5 text-xs font-medium #{classes}") - end - - # A header nav link. It is the current page (aria-current) when this action serves the section. - def nav_link(label, path, section) - current = section == "new" ? action_name == "new" : (controller_name == section && action_name != "new") - link_to label, path, class: "#{current ? "text-stone-900 dark:text-stone-100 font-medium" : "text-stone-600 dark:text-stone-400"} hover:text-stone-900 dark:hover:text-stone-100", - aria: { current: (current ? "page" : nil) } + badge status.to_s, tone: STATUS_TONES.fetch(status.to_s, :neutral) end end diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb new file mode 100644 index 0000000..1eb71d2 --- /dev/null +++ b/app/helpers/icon_helper.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# Lucide is the Patchwork icon set (see internal-docs, design/icons.md). +# The lucide-rails gem bundles every icon; this wrapper fixes the size and +# the accessibility attributes so every call site reads the same. +# +# icon(:search) # 16px, decorative +# icon("log-out", size: 20) # dashes or underscores both work +# icon(:check, title: "Verified") # announced to screen readers +module IconHelper + def icon(name, size: 16, title: nil, **options) + attributes = options.merge(width: size, height: size) + if title + # lucide-rails adds aria-hidden="true" by default; a labelled icon must + # override it or assistive tech skips the label. + attributes[:role] = "img" + attributes["aria-label"] = title + attributes["aria-hidden"] = "false" + else + attributes["aria-hidden"] = "true" + end + lucide_icon(name.to_s.tr("_", "-"), **attributes.transform_keys(&:to_s)) + end +end diff --git a/app/helpers/ui_helper.rb b/app/helpers/ui_helper.rb new file mode 100644 index 0000000..758ba00 --- /dev/null +++ b/app/helpers/ui_helper.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +# View helpers for the shared UI vocabulary. The CSS classes live in +# app/assets/tailwind/application.css and are documented in internal-docs, +# design/components.md. These helpers only save typing for the pieces that +# carry logic (tones, active states, errors). +module UiHelper + BADGE_TONES = %i[neutral grape violet orchid sky teal success info warning danger solid outline].freeze + + # badge("Verified", tone: :success) + # badge("Admin", tone: :grape, icon: :shield_check) + def badge(text, tone: :neutral, icon: nil, **options) + raise ArgumentError, "unknown badge tone #{tone.inspect}" unless BADGE_TONES.include?(tone.to_sym) + + classes = [ "badge", ("badge-#{tone}" unless tone.to_sym == :neutral), options.delete(:class) ].compact.join(" ") + tag.span(class: classes, **options) do + safe_join([ (icon(icon, size: 12) if icon), text ].compact) + end + end + + # page_header("Users", lede: "Everyone with a Weave account.") do + # link_to "New user", new_admin_user_path, class: "btn btn-primary" + # end + def page_header(title, lede: nil, title_tag: :h1, &block) + tag.header(class: "page-header") do + heading = tag.div do + safe_join([ + content_tag(title_tag, title, class: "page-title"), + (tag.p(lede, class: "page-lede") if lede) + ].compact) + end + actions = block ? tag.div(class: "page-actions", &block) : nil + safe_join([ heading, actions ].compact) + end + end + + # nav_link("Users", admin_users_path, icon: :users) + # Marks the link current when the request path starts with the href, so a + # section stays lit on its child pages. Pass active: to decide yourself. + def nav_link(label, path, icon: nil, active: nil, exact: false, **options) + active = nav_active?(path, exact:) if active.nil? + classes = [ "nav-link", options.delete(:class) ].compact.join(" ") + options["aria-current"] = "page" if active + link_to(path, class: classes, **options) do + safe_join([ (icon(icon) if icon), tag.span(label) ].compact) + end + end + + def nav_active?(path, exact: false) + current = request.path + return current == path if exact || path == "/" + + current == path || current.start_with?("#{path}/") + end + + # empty_state("No groups yet", body: "Create a group to give users access to an app.", icon: :users) do + # link_to "New group", new_admin_group_path, class: "btn btn-primary" + # end + def empty_state(title, body: nil, icon: nil, &block) + tag.div(class: "empty") do + safe_join([ + (icon(icon, size: 28) if icon), + tag.p(title, class: "empty-title"), + (tag.p(body, class: "empty-body") if body), + (capture(&block) if block) + ].compact) + end + end + + # The validation summary above a form. Renders nothing without errors. + def form_errors(record) + return if record.errors.empty? + + render "shared/form_errors", record: record + end + + # A value next to a button that copies it. Wires the clipboard controller. + # copy_button(application.uid) + # copy_button(uri, label: "Copy redirect URI") + def copy_button(value, label: "Copy", **options) + tag.div(class: "copyable", data: { controller: "clipboard", clipboard_text_value: value }) do + safe_join([ + tag.code(value, class: "code-chip"), + tag.button(type: "button", class: "btn btn-secondary btn-sm btn-icon", title: label, "aria-label": label, + data: { action: "clipboard#copy", clipboard_target: "button" }, **options) do + safe_join([ icon(:copy, class: "copy-idle"), icon(:check, class: "copy-done", hidden: true) ]) + end + ]) + end + end + + # avatar(user) -> 40px initials or Slack photo + # avatar(user, size: :xl) -> 80px + def avatar(user, size: nil) + classes = [ "avatar", ("avatar-#{size}" if size) ].compact.join(" ") + if user.respond_to?(:slack_profile_image_url) && user.slack_profile_image_url.present? + image_tag(user.slack_profile_image_url, alt: user.full_name, class: classes) + else + tag.span(user.initials.to_s.upcase, class: classes, "aria-label": user.full_name, role: "img") + end + end + + # A link to a URL that a member typed in somewhere (a Slack profile field, + # for example). Only http and https URLs become links; anything else is + # shown as text, so a stored "javascript:" value can never run. + # external_link("Website", user.slack_website) + def external_link(label, url, **options) + if http_url?(url) + link_to label, url, target: "_blank", rel: "noopener noreferrer", class: "link", **options + else + tag.span(label, class: "text-ink-faint", title: url.to_s) + end + end + + def http_url?(value) + uri = URI.parse(value.to_s.strip) + uri.is_a?(URI::HTTP) && uri.host.present? + rescue URI::InvalidURIError + false + end + + # dl_row("Email", user.email) + # dl_row("Role") { badge(user.role.humanize, tone: :grape) } + def dl_row(label, value = nil, &block) + tag.div(class: "dl-row") do + safe_join([ tag.dt(label), tag.dd(block ? capture(&block) : value) ]) + end + end +end diff --git a/app/javascript/controllers/clipboard_controller.js b/app/javascript/controllers/clipboard_controller.js new file mode 100644 index 0000000..3b52299 --- /dev/null +++ b/app/javascript/controllers/clipboard_controller.js @@ -0,0 +1,31 @@ +import { Controller } from "@hotwired/stimulus" + +// Copies a value to the clipboard. The CSP blocks inline onclick handlers, +// so copy buttons wire up through this controller instead. The button holds +// two icons, .copy-idle and .copy-done; the done one shows for a moment. +export default class extends Controller { + static targets = ["button"] + static values = { text: String } + + async copy() { + try { + await navigator.clipboard.writeText(this.textValue) + } catch { + return + } + if (!this.hasButtonTarget) return + + const idle = this.buttonTarget.querySelector(".copy-idle") + const done = this.buttonTarget.querySelector(".copy-done") + if (idle && done) { + idle.hidden = true + done.hidden = false + clearTimeout(this.timer) + this.timer = setTimeout(() => { idle.hidden = false; done.hidden = true }, 1500) + } else { + const label = this.buttonTarget.textContent + this.buttonTarget.textContent = "Copied" + setTimeout(() => { this.buttonTarget.textContent = label }, 1500) + } + } +} diff --git a/app/javascript/controllers/drawer_controller.js b/app/javascript/controllers/drawer_controller.js new file mode 100644 index 0000000..db10b79 --- /dev/null +++ b/app/javascript/controllers/drawer_controller.js @@ -0,0 +1,65 @@ +import { Controller } from "@hotwired/stimulus" + +// Opens and closes a panel that is hidden on small screens: the admin +// sidebar and the member nav sheet. The panel and the optional scrim carry +// data-open; the CSS does the rest. The panel may be absent (a signed-out +// top bar has no menu), so every method checks for it. +// +// Keyboard: opening moves focus to the first link in the panel, closing +// returns it to the button that opened it. An optional content target +// (the admin main column) goes inert while the panel is open, so Tab stays +// inside the drawer. +export default class extends Controller { + static targets = ["panel", "scrim", "button", "content"] + + connect() { + this.closeOnVisit = () => this.close() + document.addEventListener("turbo:before-visit", this.closeOnVisit) + // Past 64rem the CSS shows the panel in place, so an open drawer must + // let go of the page (inert, scrim) when the viewport grows past it. + this.wide = window.matchMedia("(min-width: 64rem)") + this.closeOnWide = (event) => { if (event.matches) this.close() } + this.wide.addEventListener("change", this.closeOnWide) + } + + disconnect() { + document.removeEventListener("turbo:before-visit", this.closeOnVisit) + this.wide.removeEventListener("change", this.closeOnWide) + this.contentTargets.forEach((content) => content.removeAttribute("inert")) + } + + + toggle(event) { + this.isOpen ? this.close() : this.open(event) + } + + open(event) { + if (!this.hasPanelTarget || this.isOpen) return + this.opener = event?.currentTarget || document.activeElement + this.set(true) + this.panelTarget.querySelector("a, button, [tabindex='0']")?.focus() + } + + close() { + if (!this.isOpen) return + this.set(false) + this.opener?.focus() + this.opener = null + } + + keydown(event) { + if (event.key === "Escape" && this.isOpen) this.close() + } + + get isOpen() { + return this.hasPanelTarget && this.panelTarget.dataset.open === "true" + } + + set(open) { + if (!this.hasPanelTarget) return + this.panelTarget.dataset.open = String(open) + if (this.hasScrimTarget) this.scrimTarget.dataset.open = String(open) + this.buttonTargets.forEach((button) => button.setAttribute("aria-expanded", String(open))) + this.contentTargets.forEach((content) => content.toggleAttribute("inert", open)) + } +} diff --git a/app/javascript/controllers/flash_controller.js b/app/javascript/controllers/flash_controller.js new file mode 100644 index 0000000..a248648 --- /dev/null +++ b/app/javascript/controllers/flash_controller.js @@ -0,0 +1,43 @@ +import { Controller } from "@hotwired/stimulus" + +// Flash messages render as toasts (shared/_flash). Each one leaves on its +// own after `duration` ms, pauses while hovered, and closes on its button. +export default class extends Controller { + static targets = ["toast"] + static values = { duration: { type: Number, default: 6000 } } + + connect() { + this.timers = new Map() + this.toastTargets.forEach((toast) => this.schedule(toast)) + } + + disconnect() { + this.timers.forEach((timer) => clearTimeout(timer)) + } + + dismiss(event) { + this.leave(event.currentTarget.closest("[data-flash-target='toast']")) + } + + pause(event) { + clearTimeout(this.timers.get(event.currentTarget)) + } + + resume(event) { + this.schedule(event.currentTarget) + } + + schedule(toast) { + toast.style.setProperty("--toast-duration", `${this.durationValue}ms`) + this.timers.set(toast, setTimeout(() => this.leave(toast), this.durationValue)) + } + + leave(toast) { + if (!toast || toast.classList.contains("is-leaving")) return + clearTimeout(this.timers.get(toast)) + toast.classList.add("is-leaving") + toast.addEventListener("animationend", () => toast.remove(), { once: true }) + // Reduced motion ends the animation at once, so remove on a short timer too. + setTimeout(() => toast.remove(), 400) + } +} diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index 8142091..54f62cf 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -1,4 +1,13 @@ // Stimulus controllers are registered here. Run ./bin/rails stimulus:manifest:update after you add one. import { application } from "./application" +import ClipboardController from "./clipboard_controller" +application.register("clipboard", ClipboardController) + +import DrawerController from "./drawer_controller" +application.register("drawer", DrawerController) + +import FlashController from "./flash_controller" +application.register("flash", FlashController) + export { application } diff --git a/app/views/archives/index.html.erb b/app/views/archives/index.html.erb index 66d21c5..6eaf678 100644 --- a/app/views/archives/index.html.erb +++ b/app/views/archives/index.html.erb @@ -1,65 +1,82 @@ <% content_for :title, "Archives" %> -
-

Archives

- - <%= form_with url: archives_path, method: :get, class: "flex gap-2" do |form| %> - <%= form.label :q, "Search", class: "sr-only" %> - <%= form.search_field :q, value: @term, placeholder: "URL, host or note", class: "w-72 rounded border border-stone-300 px-3 py-1.5 text-sm dark:border-stone-700 dark:bg-stone-950" %> - <%= form.submit "Search", class: "rounded border border-stone-300 px-3 py-1.5 text-sm hover:bg-stone-100 dark:border-stone-700 dark:hover:bg-stone-800" %> +
+ <%= page_header "Archives", lede: "Everything Stash keeps, newest first." do %> + <% if policy(Archive).create? %> + <%= link_to new_archive_path, class: "btn btn-primary" do %> + <%= icon(:plus) %>Archive a URL + <% end %> + <% end %> <% end %> -
-<% if @archives.empty? %> -

+ <%= form_with url: archives_path, method: :get, class: "mb-6 flex flex-wrap items-center gap-2" do |form| %> + + + <%= form.button "Search", type: :submit, class: "btn btn-secondary" %> + <% if @term.present? %> - No archive matches "<%= @term %>". - <% else %> - Nothing is archived yet. - <% if policy(Archive).create? %> - <%= link_to "Archive a URL", new_archive_path, class: "underline" %>. - <% end %> + <%= link_to "Clear", archives_path, class: "btn btn-quiet" %> <% end %> -

-<% else %> -
- - - - - - - - - - + <% end %> - - <% @archives.each do |archive| %> - - + + <% end %> + +
URLKindStatusCapturesArchived
- <%= link_to archive.url, archive, class: "font-medium underline", title: archive.url %> + <% if @archives.empty? %> +
+ <% if @term.present? %> + <%= empty_state "No archive matches “#{@term}”", body: "Try the host name, part of the URL or a word from the note.", icon: :search_x do %> + <%= link_to "Show all", archives_path, class: "btn btn-secondary" %> + <% end %> + <% else %> + <%= empty_state "Nothing is archived yet", body: "Patch apps send their submissions here. You can also archive a URL by hand.", icon: :archive do %> + <% if policy(Archive).create? %> + <%# The page header already has the primary "Archive a URL" button. %> + <%= link_to "Archive a URL", new_archive_path, class: "btn btn-secondary" %> + <% end %> + <% end %> + <% end %> +
+ <% else %> +
+
+ + + + + + + + + + - <% if archive.note.present? %> - <%= archive.note %> - <% end %> - + + <% @archives.each do |archive| %> + + - + <% if archive.note.present? %> + <%= archive.note %> + <% end %> + - + + + - - - <% end %> - -
URLKindStatusCapturesArchived
+ <%= link_to archive.url, archive, class: "link-quiet font-medium block truncate", title: archive.url %> - <%= archive.kind %><%= status_badge(archive.status) %> - <%= archive.captures.map(&:method_name).join(", ") %> - <%= badge archive.kind, tone: :teal %><%= status_badge(archive.status) %><%= archive.captures.map(&:method_name).join(", ") %> - <%= time_tag archive.created_at, archive.created_at.utc.strftime("%Y-%m-%d %H:%M UTC") %> -
-
+
+ <%= time_tag archive.created_at, archive.created_at.utc.strftime("%Y-%m-%d %H:%M UTC") %> +
+
+
-
<%= paginate @archives %>
-<% end %> +
<%= paginate @archives %>
+ <% end %> + diff --git a/app/views/archives/new.html.erb b/app/views/archives/new.html.erb index 4e8cd3c..0f12a1a 100644 --- a/app/views/archives/new.html.erb +++ b/app/views/archives/new.html.erb @@ -1,37 +1,37 @@ <% content_for :title, "Archive a URL" %> -
-

Archive a URL

- -

- Paste a link to a web page, a GitHub repository, a Google Doc or Slides deck, a PDF, a video or a photo post. Stash - picks the capture methods from the URL. -

- - <%= form_with model: @archive, class: "mt-6 space-y-4" do |form| %> - <% if @archive.errors.any? %> - - <% end %> - -
- <%= form.label :url, "URL", class: "block text-sm font-medium" %> - <%= form.url_field :url, required: true, placeholder: "https://", class: "mt-1 w-full rounded border border-stone-300 px-3 py-2 dark:border-stone-700 dark:bg-stone-950" %> -
+
+ <%= page_header "Archive a URL", + lede: "Paste a link to a web page, a GitHub repository, a Google Doc or Slides deck, a PDF, a video or a photo post. Stash picks the capture methods from the URL." %> + + <%= form_with model: @archive, class: "space-y-6" do |form| %> + <%= form_errors(@archive) %> + +
+
+
+ <%= form.label :url, "URL", class: "field-label" %> + <%= form.url_field :url, required: true, placeholder: "https://", class: "field", autofocus: true %> +
+ +
+ <%= form.label :note, class: "field-label" do %> + Note (optional) + <% end %> -
- <%= form.label :note, "Note (optional)", class: "block text-sm font-medium" %> - <%= form.text_area :note, rows: 3, maxlength: 2000, class: "mt-1 w-full rounded border border-stone-300 px-3 py-2 dark:border-stone-700 dark:bg-stone-950" %> + <%= form.text_area :note, rows: 3, maxlength: 2000, class: "field" %> + +

Why this URL is archived, for the people who open it later.

+
+
- <%= form.submit "Archive", class: "rounded bg-amber-600 px-4 py-2 font-medium text-white hover:bg-amber-700" %> +
+ <%= form.button type: :submit, class: "btn btn-primary" do %> + <%= icon(:archive) %>Archive + <% end %> + + <%= link_to "Cancel", archives_path, class: "btn btn-secondary" %> +
<% end %> -
+ diff --git a/app/views/archives/show.html.erb b/app/views/archives/show.html.erb index b3bdc0e..dab9d52 100644 --- a/app/views/archives/show.html.erb +++ b/app/views/archives/show.html.erb @@ -1,128 +1,167 @@ <% content_for :title, @archive.host %> -

<%= link_to "All archives", archives_path, class: "underline" %>

+
+

+ <%= link_to archives_path, class: "link-quiet inline-flex items-center gap-1" do %> + <%= icon(:arrow_left) %>All archives + <% end %> +

-
-
-

<%= @archive.url %>

+
+ <% end %> +
+ + + <% unless @archive.finished? %> +
+ <%= icon(:loader_circle, size: 18, class: "spinner") %> + +
+

Captures are running

+

Reload this page in a moment.

+
+
+ <% end %> -
- <%= link_to "Open original", @archive.url, class: "rounded border border-stone-300 px-3 py-1.5 text-sm hover:bg-stone-100 dark:border-stone-700 dark:hover:bg-stone-800", rel: "noopener noreferrer nofollow", target: "_blank" %> + <% @captures.each do |capture| %> +
+
+
+

<%= capture.method_name %>

+ <%= status_badge(capture.status) %> + + <% if capture.duration %> + <%= capture.duration.round(1) %> s + <% end %> +
- <% if policy(@archive).rerun? && @archive.finished? %> - <%= button_to "Run again", rerun_archive_path(@archive), class: "rounded border border-stone-300 px-3 py-1.5 text-sm hover:bg-stone-100 dark:border-stone-700 dark:hover:bg-stone-800", form: { data: { turbo_confirm: "Run every capture again? The old files are replaced." } } %> - <% end %> -
-
+ <%= capture.public_id %> +
-<% unless @archive.finished? %> -

- Captures are running. Reload this page in a moment. -

-<% end %> +
+ <% if capture.error.present? %> +
+ <%= icon(:circle_x, size: 18) %> -
- <% @captures.each do |capture| %> -
-
-

<%= capture.method_name %>

- <%= status_badge(capture.status) %> - - <% if capture.duration %> - <%= capture.duration.round(1) %> s +
<%= capture.error %>
+
<% end %> - <%= capture.public_id %> - + <% if capture.artifacts.any? %> +
+ <% capture.artifacts.each do |artifact| %> +
+
+
+ <%= badge artifact.role, tone: :sky %> + <%= link_to artifact.filename, artifact_path(artifact), class: "link" %> +
+ +
+ <%= artifact.content_type %> · <%= number_to_human_size(artifact.byte_size) %> · + sha256 <%= artifact.sha256.first(12) %> +
+
+ +
+ <%= link_to artifact_path(artifact), class: "btn btn-quiet btn-sm" do %> + <%= icon(:download) %>Download + <% end %> +
+
+ <% end %> +
+ <% end %> - <% if capture.error.present? %> -

<%= capture.error %>

- <% end %> + <% screenshot = capture.artifacts.find { |a| a.role == "screenshot" } %> - <% if capture.artifacts.any? %> - - <% end %> + <% end %> - <% screenshot = capture.artifacts.find { |a| a.role == "screenshot" } %> + <% if capture.log.present? %> +
+ Log - <% if screenshot %> - <%= link_to artifact_path(screenshot), class: "mt-3 block" do %> - <%= image_tag artifact_path(screenshot), alt: "Screenshot of #{@archive.url}", class: "max-h-96 rounded border border-stone-200 object-cover object-top dark:border-stone-700", loading: "lazy" %> +
<%= capture.log %>
+
<% end %> - <% end %> - - <% if capture.log.present? %> -
- Log -
<%= capture.log %>
-
- <% end %> - + <% if capture.error.blank? && capture.artifacts.empty? && capture.log.blank? %> +

Nothing stored yet.

+ <% end %> +
+ <% end %> - - -<% if policy(@archive).destroy? %> -
-

Delete this archive

-

- Deletes every capture and file. The audit log keeps the URL, your reason and the checksums. -

+ <% if policy(@archive).destroy? %> +
+
+
+

Delete this archive

+ +

+ Deletes every capture and file. The audit log keeps the URL, your reason and the checksums. +

+
+
+ +
+ <%= form_with url: archive_path(@archive), method: :delete, class: "flex flex-wrap items-end gap-2", data: { turbo_confirm: "Delete this archive and its files?" } do |form| %> +
+ <%= form.label :reason, class: "field-label" %> + <%= form.text_field :reason, required: true, placeholder: "Why", class: "field" %> +
- <%= form_with url: archive_path(@archive), method: :delete, class: "mt-3 flex flex-wrap gap-2", data: { turbo_confirm: "Delete this archive and its files?" } do |form| %> - <%= form.label :reason, "Reason", class: "sr-only" %> - <%= form.text_field :reason, required: true, placeholder: "Why", class: "w-96 rounded border border-stone-300 px-3 py-1.5 text-sm dark:border-stone-700 dark:bg-stone-950" %> - <%= form.submit "Delete", class: "rounded bg-rose-700 px-3 py-1.5 text-sm font-medium text-white hover:bg-rose-800" %> - <% end %> -
-<% end %> + <%= form.button type: :submit, class: "btn btn-danger" do %> + <%= icon(:trash_2) %>Delete + <% end %> + <% end %> + +
+ <% end %> + diff --git a/app/views/dev_sessions/new.html.erb b/app/views/dev_sessions/new.html.erb index ff5abe1..3b53a3d 100644 --- a/app/views/dev_sessions/new.html.erb +++ b/app/views/dev_sessions/new.html.erb @@ -1,55 +1,76 @@ <% content_for :title, "Dev sign-in" %> -
-

Dev sign-in

+
+
+
-

- Development only. Pick a fake user. Nothing here talks to Weave. -

+
+
+ <%= render "shared/wordmark", size: :lg, href: nil %> -

Presets

+

Dev sign-in

-
    - <% DevSessionsController::PRESETS.each do |preset| %> -
  • - <%= form_with url: dev_sign_in_path, method: :post do |form| %> - <%= form.hidden_field :sub, value: preset[:sub] %> - <%= form.hidden_field :name, value: preset[:name] %> +

    Development only. Pick a fake user. Nothing here talks to Weave.

    +
- <% preset[:roles].each do |role| %> - <%= hidden_field_tag "roles[]", role, id: nil %> - <% end %> +
+

Presets

- <%= form.submit "#{preset[:name]} (#{preset[:roles].presence&.join(", ") || "no roles"})", class: "w-full rounded border border-stone-300 px-3 py-2 text-left text-sm hover:bg-stone-50 dark:border-stone-700 dark:hover:bg-stone-800" %> - <% end %> - - <% end %> - +
+ <% DevSessionsController::PRESETS.each do |preset| %> + <%= form_with url: dev_sign_in_path, method: :post, class: "record" do |form| %> + <%= form.hidden_field :sub, value: preset[:sub] %> + <%= form.hidden_field :name, value: preset[:name] %> -

Custom user

+ <% preset[:roles].each do |role| %> + <%= hidden_field_tag "roles[]", role, id: nil %> + <% end %> - <%= form_with url: dev_sign_in_path, method: :post, class: "mt-2 space-y-3" do |form| %> -
- <%= form.label :sub, "Weave sub (PWL id)", class: "block text-sm font-medium" %> - <%= form.text_field :sub, value: "PWLDEVCUSTOM1", required: true, class: "mt-1 w-full rounded border border-stone-300 px-3 py-2 dark:border-stone-700 dark:bg-stone-950" %> -
+
+
<%= preset[:name] %>
+
<%= preset[:roles].presence&.join(", ") || "no roles" %>
+
-
- <%= form.label :name, class: "block text-sm font-medium" %> - <%= form.text_field :name, value: "Custom User", class: "mt-1 w-full rounded border border-stone-300 px-3 py-2 dark:border-stone-700 dark:bg-stone-950" %> -
+
+ <%= form.button "Sign in", type: :submit, class: "btn btn-secondary btn-sm" %> +
+ <% end %> + <% end %> +
+
-
- Roles +
+

Custom user

- <% Weave::Roles::ALL.each do |role| %> - - <% end %> -
+ <%= form_with url: dev_sign_in_path, method: :post, class: "space-y-4" do |form| %> +
+ <%= form.label :sub, "Weave sub (PWL id)", class: "field-label" %> + <%= form.text_field :sub, value: "PWLDEVCUSTOM1", required: true, class: "field" %> +
- <%= form.submit "Sign in", class: "rounded bg-amber-600 px-4 py-2 font-medium text-white hover:bg-amber-700" %> - <% end %> -
+
+ <%= form.label :name, class: "field-label" %> + <%= form.text_field :name, value: "Custom User", class: "field" %> +
+ +
+ Roles + +
+ <% Weave::Roles::ALL.each do |role| %> + + <% end %> +
+
+ +
+ <%= form.button "Sign in", type: :submit, class: "btn btn-primary" %> +
+ <% end %> + + + + diff --git a/app/views/errors/forbidden.html.erb b/app/views/errors/forbidden.html.erb index 99519d4..a593bd4 100644 --- a/app/views/errors/forbidden.html.erb +++ b/app/views/errors/forbidden.html.erb @@ -1,17 +1,22 @@ <% content_for :title, "Not allowed" %> -
-
- <%= render "shared/brand_mark" %> +
+
+
+
+ <%= icon(:shield_off, size: 28, class: "text-ink-soft") %> -

403: Not allowed

+

403: Not allowed

+
-

You do not have a Stash role that allows this.

+

You do not have a Stash role that allows this.

-

- Stash roles are viewer, archivist and admin. Ask a Weave admin for one. -

+

+ Stash roles are viewer, archivist and + admin. Ask a Weave admin for one. +

-

<%= link_to "Back to sign-in", sign_in_path, class: "underline" %>

-
+

<%= link_to "Back to sign-in", sign_in_path, class: "link" %>

+
+ diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 44587da..5dafa98 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,105 +1,27 @@ +<%# The member layout: the top bar and a .page column. Sign-in and the dev sign-in use layouts/focus. %> - <%= content_for(:title) ? "#{content_for(:title)} | Stash" : "Stash" %> - - - - - - - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - - <%# ?v=2: the files in public/ get a one year cache header, and the placeholder had these names. %> - - - - - <%# - Only the built file (bun run build:css). `:app` also linked the Tailwind source, whose - `@import "tailwindcss"` 404s in the browser, and tailwindcss-rails' copy of the same styles. - %> - <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> - <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %> + <%= [content_for(:title), "Stash"].compact_blank.join(" · ") %> + <%= render "shared/head" %> - + + <%= render "shared/staging_badge" %> + <%= render "shared/topbar" %> - - Skip to content - - -
-
- <%= link_to root_path, class: "flex items-center gap-2 text-lg font-semibold tracking-tight" do %> - <%= render "shared/brand_mark" %> Stash - <% end %> - - <% if signed_in? %> - - -
- <%= current_user.display_name %> - - - Roles: - - <% current_user.roles.each do |role| %> - <%= role %> - <% end %> - - - <%= button_to "Sign out", sign_out_path, method: :delete, class: "text-stone-600 underline hover:text-stone-900 dark:text-stone-400 dark:hover:text-stone-100" %> -
- <% end %> -
-
- -
- <% if notice.present? %> -

- <%= notice %> -

- <% end %> - - <% if alert.present? %> - - <% end %> - +
<%= yield %>
+ + + +
<%= render "shared/flash" %>
diff --git a/app/views/layouts/focus.html.erb b/app/views/layouts/focus.html.erb new file mode 100644 index 0000000..a9b279a --- /dev/null +++ b/app/views/layouts/focus.html.erb @@ -0,0 +1,22 @@ +<%# The focus layout: one centered patch on the quilt. Sign-in and the dev sign-in render here. %> + + + + + <%= [content_for(:title), "Stash"].compact_blank.join(" · ") %> + <%= render "shared/head" %> + + + + + <%= render "shared/staging_badge" %> + +
<%= render "shared/flash" %>
+ +
+ <%= yield %> +
+ + <%= render "shared/theme_toggle", floating: true %> + + diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 9ad1b37..d895748 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,31 +1,39 @@ <% content_for :title, "Sign in" %> -
-
- <%= render "shared/brand_mark" %> +
+
+
-

Sign in to Stash

+
+
+ <%= render "shared/wordmark", size: :lg, href: nil %> -

- Stash is the Patchwork Labs archive: web pages, repositories, documents and media, kept as they were. -

+

Sign in to Stash

- <% if Weave::Config.configured? %> - <%# Turbo off: Turbo submits with fetch, and fetch cannot follow the redirect to Weave's origin. %> - <%= button_to "Sign in with Weave", auth_weave_path, form: { data: { turbo: false } }, class: "mt-6 w-full rounded bg-amber-600 px-4 py-2 font-medium text-white hover:bg-amber-700" %> - <% else %> -

- Weave sign-in is not set up. Set WEAVE_ISSUER, WEAVE_CLIENT_ID and WEAVE_CLIENT_SECRET. -

- <% end %> +

+ The Patchwork Labs archive: web pages, repositories, documents and media, kept as they were. +

+
- <% if Stash::AuthMode.dev? %> -

<%= link_to "Dev sign-in", dev_sign_in_path, class: "underline" %>

- <% end %> -
+ <% if Weave::Config.configured? %> + <%# Turbo off: Turbo submits with fetch, and fetch cannot follow the redirect to Weave's origin. %> + <%= button_to auth_weave_path, form: { data: { turbo: false } }, class: "btn btn-primary btn-lg btn-block" do %> + <%= icon(:log_in) %>Sign in with Weave + <% end %> + <% else %> + + <% end %> + + <% if Stash::AuthMode.dev? %> +

<%= link_to "Dev sign-in", dev_sign_in_path, class: "link" %>

+ <% end %> +
+ diff --git a/app/views/shared/_brand_mark.html.erb b/app/views/shared/_brand_mark.html.erb deleted file mode 100644 index 3ff53b0..0000000 --- a/app/views/shared/_brand_mark.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<%# A small stack of fabric squares: a stash. %> - diff --git a/app/views/shared/_flash.html.erb b/app/views/shared/_flash.html.erb new file mode 100644 index 0000000..56ad0f2 --- /dev/null +++ b/app/views/shared/_flash.html.erb @@ -0,0 +1,34 @@ +<%# Flash messages as toasts. The flash Stimulus controller dismisses them. %> +<% if flash.any? %> +
+ <% flash.each do |name, message| %> + <% + tone, glyph, live = case name.to_s + when "notice", "success" then [:success, :circle_check, "polite"] + when "alert", "error" then [:danger, :circle_x, "assertive"] + when "warning" then [:warning, :triangle_alert, "polite"] + else [:info, :info, "polite"] + end + %> + + + <% end %> +
+<% end %> diff --git a/app/views/shared/_form_errors.html.erb b/app/views/shared/_form_errors.html.erb new file mode 100644 index 0000000..7280f7f --- /dev/null +++ b/app/views/shared/_form_errors.html.erb @@ -0,0 +1,16 @@ +<%# The validation summary above a form. Use through form_errors(record). %> + diff --git a/app/views/shared/_head.html.erb b/app/views/shared/_head.html.erb new file mode 100644 index 0000000..d2c450c --- /dev/null +++ b/app/views/shared/_head.html.erb @@ -0,0 +1,27 @@ +<%# Everything every layout puts in , after its own . The same head as Weave. %> +<meta charset="UTF-8"> +<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"> +<meta name="application-name" content="Stash"> +<meta name="apple-mobile-web-app-title" content="Stash"> +<meta name="author" content="Patchwork Labs Inc"> +<meta name="robots" content="noindex, nofollow"> +<meta name="theme-color" content="#f7f5fb" media="(prefers-color-scheme: light)"> +<meta name="theme-color" content="#16112a" media="(prefers-color-scheme: dark)"> + +<%# ?v=3: the files in public/ get a one year cache header, and two placeholders had these names. %> +<link rel="icon" href="/icon.svg?v=3" type="image/svg+xml"> +<link rel="icon" href="/icon.png?v=3" type="image/png"> +<link rel="apple-touch-icon" href="/icon.png?v=3"> + +<%= csrf_meta_tags %> +<%= csp_meta_tag %> + +<%# The two weights every page uses, so the first paint is in Geist. %> +<link rel="preload" href="/fonts/geist-400-latin.woff2" as="font" type="font/woff2" crossorigin> +<link rel="preload" href="/fonts/geist-600-latin.woff2" as="font" type="font/woff2" crossorigin> + +<%# Sets data-theme before first paint; the stylesheet keys everything off it. %> +<%= render "shared/theme" %> +<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %> +<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %> +<%= yield :head %> diff --git a/app/views/shared/_theme.html.erb b/app/views/shared/_theme.html.erb new file mode 100644 index 0000000..6ea28a3 --- /dev/null +++ b/app/views/shared/_theme.html.erb @@ -0,0 +1,36 @@ +<%# + Theme plumbing, in <head> before the stylesheets so there is no flash. + + Every Patchwork app follows the device: with nothing stored, the theme + is whatever prefers-color-scheme says, and it switches live when the + OS does. A click on a [data-theme-toggle] cycles system -> light -> + dark -> system and stores the pick in localStorage ("light" or "dark"; + nothing stored means system). The <html> element carries + data-theme (the resolved theme the stylesheet reads) and + data-theme-source ("system" or "manual", which the toggle's icon reads). + Delegated listeners keep working across Turbo visits. +%> + +<script nonce="<%= content_security_policy_nonce %>"> + (() => { + const root = document.documentElement; + const media = matchMedia("(prefers-color-scheme: dark)"); + const stored = () => { + try { const value = localStorage.getItem("theme"); return value === "light" || value === "dark" ? value : null; } catch { return null; } + }; + const apply = () => { + const pick = stored(); + root.dataset.theme = pick || (media.matches ? "dark" : "light"); + root.dataset.themeSource = pick ? "manual" : "system"; + }; + apply(); + media.addEventListener("change", apply); + document.addEventListener("click", (event) => { + if (!event.target.closest("[data-theme-toggle]")) return; + const pick = stored(); + const next = pick === null ? "light" : pick === "light" ? "dark" : null; + try { next ? localStorage.setItem("theme", next) : localStorage.removeItem("theme"); } catch { /* private window */ } + apply(); + }); + })(); +</script> diff --git a/app/views/shared/_theme_toggle.html.erb b/app/views/shared/_theme_toggle.html.erb new file mode 100644 index 0000000..b04df2e --- /dev/null +++ b/app/views/shared/_theme_toggle.html.erb @@ -0,0 +1,20 @@ +<%# + Theme switch. Cycles system -> light -> dark -> system; shared/_theme + handles the click by delegation. The icon shows the current setting: + a monitor while following the device, a sun or a moon when pinned. + render "shared/theme_toggle" -> inline, for a top bar + render "shared/theme_toggle", floating: true -> pinned to the corner (focus pages) +%> +<% classes = ["theme-toggle", ("theme-toggle-floating" if local_assigns[:floating])].compact.join(" ") %> + +<button + type="button" + data-theme-toggle + class="<%= classes %>" + aria-label="Theme: follows your device. Click to pin light, then dark, then back to your device." + title="Theme" +> + <%= icon(:monitor, size: 18, class: "tt-system") %> + <%= icon(:sun, size: 18, class: "tt-sun") %> + <%= icon(:moon, size: 18, class: "tt-moon") %> +</button> diff --git a/app/views/shared/_topbar.html.erb b/app/views/shared/_topbar.html.erb new file mode 100644 index 0000000..8c21153 --- /dev/null +++ b/app/views/shared/_topbar.html.erb @@ -0,0 +1,76 @@ +<%# The member-pages top bar (layouts/application). The same shell as Weave's. %> +<header class="topbar" data-controller="drawer" data-action="keydown@window->drawer#keydown"> + <div class="topbar-inner"> + <%= render "shared/wordmark" %> + + <% if signed_in? %> + <nav class="topbar-nav" aria-label="Main"> + <%= nav_link "Archives", archives_path, icon: :archive, active: controller_name == "archives" && action_name != "new" %> + + <% if policy(Archive).create? %> + <%= nav_link "Archive a URL", new_archive_path, icon: :plus, exact: true %> + <% end %> + + <% if current_user.admin? %> + <%= nav_link "Jobs", "/admin/jobs", icon: :activity, active: false %> + <% end %> + </nav> + <% end %> + + <div class="topbar-end"> + <%= render "shared/theme_toggle" %> + + <% if signed_in? %> + <span class="hidden lg:inline-flex items-center gap-2 text-sm"> + <span class="font-medium"><%= current_user.display_name %></span> + <span class="sr-only">Roles:</span> + + <% current_user.roles.each do |role| %> + <%= badge role, tone: (role == "admin" ? :violet : :neutral) %> + <% end %> + </span> + + <%= button_to sign_out_path, method: :delete, class: "btn btn-quiet btn-sm hidden lg:inline-flex", form_class: "inline-block", "aria-label": "Sign out", title: "Sign out" do %> + <%= icon(:log_out) %><span class="topbar-btn-label">Sign out</span> + <% end %> + + <button + type="button" + class="btn btn-quiet btn-sm btn-icon topbar-menu-btn" + aria-label="Open menu" + aria-expanded="false" + data-drawer-target="button" + data-action="drawer#toggle" + > + <%= icon(:menu, size: 18) %> + </button> + <% end %> + </div> + </div> + + <% if signed_in? %> + <nav class="topbar-sheet" data-drawer-target="panel" aria-label="Main menu"> + <%= nav_link "Archives", archives_path, icon: :archive, active: controller_name == "archives" && action_name != "new" %> + + <% if policy(Archive).create? %> + <%= nav_link "Archive a URL", new_archive_path, icon: :plus, exact: true %> + <% end %> + + <% if current_user.admin? %> + <%= nav_link "Jobs", "/admin/jobs", icon: :activity, active: false %> + <% end %> + + <div class="px-3 py-2 text-sm text-ink-soft"> + <%= current_user.display_name %> + + <% current_user.roles.each do |role| %> + <%= badge role, tone: (role == "admin" ? :violet : :neutral) %> + <% end %> + </div> + + <%= button_to sign_out_path, method: :delete, class: "nav-link w-full", form_class: "contents" do %> + <%= icon(:log_out) %><span>Sign out</span> + <% end %> + </nav> + <% end %> +</header> diff --git a/app/views/shared/_wordmark.html.erb b/app/views/shared/_wordmark.html.erb new file mode 100644 index 0000000..af45666 --- /dev/null +++ b/app/views/shared/_wordmark.html.erb @@ -0,0 +1,20 @@ +<%# + The Stash wordmark: the Patchwork rosette and the name in the display face. + render "shared/wordmark" -> links to the root page + render "shared/wordmark", size: :lg, href: nil -> static, larger (focus pages) +%> +<% size = local_assigns.fetch(:size, :md) %> +<% href = local_assigns.fetch(:href, root_path) %> +<% classes = ["wordmark", ("wordmark-lg" if size == :lg)].compact.join(" ") %> + +<% if href %> + <%= link_to href, class: classes, "aria-label": "Stash home" do %> + <span class="rosette" aria-hidden="true"></span> + Stash + <% end %> +<% else %> + <span class="<%= classes %>"> + <span class="rosette" aria-hidden="true"></span> + Stash + </span> +<% end %> diff --git a/bun.lock b/bun.lock index 74788bd..27bc1ea 100644 --- a/bun.lock +++ b/bun.lock @@ -7,8 +7,6 @@ "dependencies": { "@hotwired/stimulus": "3.2.2", "@hotwired/turbo-rails": "8.0.23", - "@tailwindcss/cli": "4.3.3", - "tailwindcss": "4.3.3", }, }, }, @@ -19,150 +17,6 @@ "@hotwired/turbo-rails": ["@hotwired/turbo-rails@8.0.23", "", { "dependencies": { "@hotwired/turbo": "^8.0.23", "@rails/actioncable": ">=7.0" } }, "sha512-iBILwda3qmQC7FYM70+4s6kEQ7Fx9dJ6+yGxjPyrz9a5JDx1+y7OAA5TA7GGVOZJoicMLrKGdFDNorl40X35lw=="], - "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], - - "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="], - - "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], - - "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="], - - "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], - - "@parcel/watcher": ["@parcel/watcher@2.5.1", "", { "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", "micromatch": "^4.0.5", "node-addon-api": "^7.0.0" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.5.1", "@parcel/watcher-darwin-arm64": "2.5.1", "@parcel/watcher-darwin-x64": "2.5.1", "@parcel/watcher-freebsd-x64": "2.5.1", "@parcel/watcher-linux-arm-glibc": "2.5.1", "@parcel/watcher-linux-arm-musl": "2.5.1", "@parcel/watcher-linux-arm64-glibc": "2.5.1", "@parcel/watcher-linux-arm64-musl": "2.5.1", "@parcel/watcher-linux-x64-glibc": "2.5.1", "@parcel/watcher-linux-x64-musl": "2.5.1", "@parcel/watcher-win32-arm64": "2.5.1", "@parcel/watcher-win32-ia32": "2.5.1", "@parcel/watcher-win32-x64": "2.5.1" } }, "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg=="], - - "@parcel/watcher-android-arm64": ["@parcel/watcher-android-arm64@2.5.1", "", { "os": "android", "cpu": "arm64" }, "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA=="], - - "@parcel/watcher-darwin-arm64": ["@parcel/watcher-darwin-arm64@2.5.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw=="], - - "@parcel/watcher-darwin-x64": ["@parcel/watcher-darwin-x64@2.5.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg=="], - - "@parcel/watcher-freebsd-x64": ["@parcel/watcher-freebsd-x64@2.5.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ=="], - - "@parcel/watcher-linux-arm-glibc": ["@parcel/watcher-linux-arm-glibc@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA=="], - - "@parcel/watcher-linux-arm-musl": ["@parcel/watcher-linux-arm-musl@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q=="], - - "@parcel/watcher-linux-arm64-glibc": ["@parcel/watcher-linux-arm64-glibc@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w=="], - - "@parcel/watcher-linux-arm64-musl": ["@parcel/watcher-linux-arm64-musl@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg=="], - - "@parcel/watcher-linux-x64-glibc": ["@parcel/watcher-linux-x64-glibc@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A=="], - - "@parcel/watcher-linux-x64-musl": ["@parcel/watcher-linux-x64-musl@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg=="], - - "@parcel/watcher-win32-arm64": ["@parcel/watcher-win32-arm64@2.5.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw=="], - - "@parcel/watcher-win32-ia32": ["@parcel/watcher-win32-ia32@2.5.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ=="], - - "@parcel/watcher-win32-x64": ["@parcel/watcher-win32-x64@2.5.1", "", { "os": "win32", "cpu": "x64" }, "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA=="], - "@rails/actioncable": ["@rails/actioncable@8.1.400", "", {}, "sha512-Qffc3/I9xcpeaal12hmi9EPRV3hz9FvakUHBR7kL0jpZviWwO9dyaG8F1ltcjkHIdFxQ5QqzRyequAWHMq17xQ=="], - - "@tailwindcss/cli": ["@tailwindcss/cli@4.3.3", "", { "dependencies": { "@parcel/watcher": "2.5.1", "@tailwindcss/node": "4.3.3", "@tailwindcss/oxide": "4.3.3", "enhanced-resolve": "^5.24.1", "mri": "^1.2.0", "picocolors": "^1.1.1", "tailwindcss": "4.3.3" }, "bin": { "tailwindcss": "./dist/index.mjs" } }, "sha512-ZvS/n1ZHOBKcVlhkt8l5NNr1EDXk1NboYO5CYDOs6NUmvT9z6bzkwsosaJftY57T/3gWNzWMJzIXLodZC8ssdw=="], - - "@tailwindcss/node": ["@tailwindcss/node@4.3.3", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.24.1", "jiti": "^2.7.0", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.3.3" } }, "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg=="], - - "@tailwindcss/oxide": ["@tailwindcss/oxide@4.3.3", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.3", "@tailwindcss/oxide-darwin-arm64": "4.3.3", "@tailwindcss/oxide-darwin-x64": "4.3.3", "@tailwindcss/oxide-freebsd-x64": "4.3.3", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", "@tailwindcss/oxide-linux-x64-musl": "4.3.3", "@tailwindcss/oxide-wasm32-wasi": "4.3.3", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" } }, "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA=="], - - "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.3.3", "", { "os": "android", "cpu": "arm64" }, "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw=="], - - "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.3.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw=="], - - "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.3.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw=="], - - "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.3.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw=="], - - "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3", "", { "os": "linux", "cpu": "arm" }, "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ=="], - - "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.3.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w=="], - - "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.3.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA=="], - - "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.3.3", "", { "os": "linux", "cpu": "x64" }, "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w=="], - - "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.3.3", "", { "os": "linux", "cpu": "x64" }, "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img=="], - - "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.3.3", "", { "dependencies": { "@emnapi/core": "^1.11.1", "@emnapi/runtime": "^1.11.1", "@emnapi/wasi-threads": "^1.2.2", "@napi-rs/wasm-runtime": "^1.1.4", "@tybys/wasm-util": "^0.10.2", "tslib": "^2.8.1" }, "cpu": "none" }, "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ=="], - - "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.3.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ=="], - - "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.3", "", { "os": "win32", "cpu": "x64" }, "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw=="], - - "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], - - "detect-libc": ["detect-libc@1.0.3", "", { "bin": { "detect-libc": "./bin/detect-libc.js" } }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="], - - "enhanced-resolve": ["enhanced-resolve@5.26.0", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw=="], - - "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], - - "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], - - "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], - - "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], - - "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], - - "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], - - "lightningcss": ["lightningcss@1.32.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="], - - "lightningcss-android-arm64": ["lightningcss-android-arm64@1.32.0", "", { "os": "android", "cpu": "arm64" }, "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg=="], - - "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.32.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ=="], - - "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.32.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w=="], - - "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.32.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig=="], - - "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.32.0", "", { "os": "linux", "cpu": "arm" }, "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw=="], - - "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ=="], - - "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg=="], - - "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA=="], - - "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg=="], - - "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.32.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw=="], - - "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.32.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q=="], - - "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], - - "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], - - "mri": ["mri@1.2.0", "", {}, "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="], - - "node-addon-api": ["node-addon-api@7.1.1", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="], - - "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], - - "picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], - - "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], - - "tailwindcss": ["tailwindcss@4.3.3", "", {}, "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ=="], - - "tapable": ["tapable@2.3.3", "", {}, "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A=="], - - "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], - - "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="], - - "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], - - "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.3", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g=="], - - "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.6", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" }, "bundled": true }, "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw=="], - - "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.4", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A=="], - - "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.9.1", "", { "bundled": true }, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], - - "lightningcss/detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], } } diff --git a/package.json b/package.json index 308bc0d..d524a16 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,10 @@ "name": "app", "private": true, "scripts": { - "build": "bun bun.config.js", - "build:css": "bunx @tailwindcss/cli -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify" + "build": "bun bun.config.js" }, "dependencies": { "@hotwired/stimulus": "3.2.2", - "@hotwired/turbo-rails": "8.0.23", - "@tailwindcss/cli": "4.3.3", - "tailwindcss": "4.3.3" + "@hotwired/turbo-rails": "8.0.23" } } \ No newline at end of file diff --git a/public/400.html b/public/400.html index bd250c5..d59ca41 100644 --- a/public/400.html +++ b/public/400.html @@ -2,142 +2,253 @@ <html lang="en"> <head> - <title>The server cannot process the request due to a client error (400 Bad Request) - - + - - - -
-
- - - - - -
- -
-

- The server cannot process the request due to a client error. Please check the request and try - again. If you're the application owner check the logs for more information. +

+ + +
+

Stash · Patchwork Labs

+

400

+ +

We couldn’t follow that thread.

+ +

+ The server couldn’t understand your request. Please check the address and try again.

-
+ + Back to home +
diff --git a/public/404.html b/public/404.html index a1ea932..8d6ddc1 100644 --- a/public/404.html +++ b/public/404.html @@ -2,142 +2,250 @@ - The page you were looking for doesn't exist (404 Not found) - - + - - - -
-
- - - - - -
- -
-

- The page you were looking for doesn't exist. You may have mistyped the address or the page - may have moved. If you're the application owner check the logs for more information. -

-
+
+ + +
+

Stash · Patchwork Labs

+

404

+ +

This patch isn’t in the quilt.

+ +

The page you’re looking for doesn’t exist or may have been moved.

+ Back to home +
diff --git a/public/406-unsupported-browser.html b/public/406-unsupported-browser.html index 27b5932..710815d 100644 --- a/public/406-unsupported-browser.html +++ b/public/406-unsupported-browser.html @@ -2,139 +2,252 @@ - Your browser is not supported (406 Not Acceptable) - - + - - - -
-
- - - - - -
- -
-

Your browser is not supported.
Please upgrade your browser to continue.

-
+
+ + +
+

Stash · Patchwork Labs

+

406

+ +

Your browser needs an update.

+ +

+ Stash requires a modern browser. Please update to a recent version of Chrome, Firefox, Safari, or Edge and try + again. +

+
diff --git a/public/422.html b/public/422.html index 318f339..dee9e5a 100644 --- a/public/422.html +++ b/public/422.html @@ -2,142 +2,254 @@ - The change you wanted was rejected (422 Unprocessable Entity) - - + - - - -
-
- - - - - -
- -
-

- The change you wanted was rejected. Maybe you tried to change something you didn't have - access to. If you're the application owner check the logs for more information. +

+ + +
+

Stash · Patchwork Labs

+

422

+ +

That change came unstitched.

+ +

+ The change you requested was rejected. You may not have permission to make it, or your session may have + expired. Try signing in again.

-
+ + Back to home +
diff --git a/public/500.html b/public/500.html index 340c4b1..55b2998 100644 --- a/public/500.html +++ b/public/500.html @@ -2,142 +2,254 @@ - We're sorry, but something went wrong (500 Internal Server Error) - - + - - - -
-
- - - - - -
- -
-

- We're sorry, but something went wrong.
- If you're the application owner check the logs for more information. +

+ + +
+

Stash · Patchwork Labs

+

500

+ +

We dropped a stitch.

+ +

+ Something went wrong on our end. It has been logged and we’re looking into it — please try again + in a few minutes.

-
+ + Back to home +
diff --git a/public/503.html b/public/503.html new file mode 100644 index 0000000..34758c2 --- /dev/null +++ b/public/503.html @@ -0,0 +1,250 @@ + + + + + + + + + Service unavailable (503) · Stash + + + + + + + +
+ + +
+

Stash · Patchwork Labs

+

503

+ +

Down for mending.

+ +

Stash is temporarily offline for maintenance. We’ll be back shortly.

+
+
+ + diff --git a/public/fonts/geist-400-latin-ext.woff2 b/public/fonts/geist-400-latin-ext.woff2 new file mode 100644 index 0000000..8a1d3df Binary files /dev/null and b/public/fonts/geist-400-latin-ext.woff2 differ diff --git a/public/fonts/geist-400-latin.woff2 b/public/fonts/geist-400-latin.woff2 new file mode 100644 index 0000000..8f01e76 Binary files /dev/null and b/public/fonts/geist-400-latin.woff2 differ diff --git a/public/fonts/geist-500-latin-ext.woff2 b/public/fonts/geist-500-latin-ext.woff2 new file mode 100644 index 0000000..8a1d3df Binary files /dev/null and b/public/fonts/geist-500-latin-ext.woff2 differ diff --git a/public/fonts/geist-500-latin.woff2 b/public/fonts/geist-500-latin.woff2 new file mode 100644 index 0000000..8f01e76 Binary files /dev/null and b/public/fonts/geist-500-latin.woff2 differ diff --git a/public/fonts/geist-600-latin-ext.woff2 b/public/fonts/geist-600-latin-ext.woff2 new file mode 100644 index 0000000..8a1d3df Binary files /dev/null and b/public/fonts/geist-600-latin-ext.woff2 differ diff --git a/public/fonts/geist-600-latin.woff2 b/public/fonts/geist-600-latin.woff2 new file mode 100644 index 0000000..8f01e76 Binary files /dev/null and b/public/fonts/geist-600-latin.woff2 differ diff --git a/public/fonts/geist-700-latin-ext.woff2 b/public/fonts/geist-700-latin-ext.woff2 new file mode 100644 index 0000000..8a1d3df Binary files /dev/null and b/public/fonts/geist-700-latin-ext.woff2 differ diff --git a/public/fonts/geist-700-latin.woff2 b/public/fonts/geist-700-latin.woff2 new file mode 100644 index 0000000..8f01e76 Binary files /dev/null and b/public/fonts/geist-700-latin.woff2 differ diff --git a/public/fonts/shantell-sans-500-latin-ext.woff2 b/public/fonts/shantell-sans-500-latin-ext.woff2 new file mode 100644 index 0000000..54671c3 Binary files /dev/null and b/public/fonts/shantell-sans-500-latin-ext.woff2 differ diff --git a/public/fonts/shantell-sans-500-latin.woff2 b/public/fonts/shantell-sans-500-latin.woff2 new file mode 100644 index 0000000..a80e8e9 Binary files /dev/null and b/public/fonts/shantell-sans-500-latin.woff2 differ diff --git a/public/fonts/shantell-sans-600-latin-ext.woff2 b/public/fonts/shantell-sans-600-latin-ext.woff2 new file mode 100644 index 0000000..54671c3 Binary files /dev/null and b/public/fonts/shantell-sans-600-latin-ext.woff2 differ diff --git a/public/fonts/shantell-sans-600-latin.woff2 b/public/fonts/shantell-sans-600-latin.woff2 new file mode 100644 index 0000000..a80e8e9 Binary files /dev/null and b/public/fonts/shantell-sans-600-latin.woff2 differ diff --git a/public/fonts/shantell-sans-700-latin-ext.woff2 b/public/fonts/shantell-sans-700-latin-ext.woff2 new file mode 100644 index 0000000..54671c3 Binary files /dev/null and b/public/fonts/shantell-sans-700-latin-ext.woff2 differ diff --git a/public/fonts/shantell-sans-700-latin.woff2 b/public/fonts/shantell-sans-700-latin.woff2 new file mode 100644 index 0000000..a80e8e9 Binary files /dev/null and b/public/fonts/shantell-sans-700-latin.woff2 differ diff --git a/public/icon.png b/public/icon.png index cb6b05c..872d731 100644 Binary files a/public/icon.png and b/public/icon.png differ diff --git a/public/icon.svg b/public/icon.svg index cd12cfc..2c3293a 100644 --- a/public/icon.svg +++ b/public/icon.svg @@ -1,7 +1,9 @@ - - - - - - + + + + + + + diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb index 21ec0e8..fcf31eb 100644 --- a/test/controllers/sessions_controller_test.rb +++ b/test/controllers/sessions_controller_test.rb @@ -15,7 +15,7 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest get sign_in_path assert_select "link[rel=stylesheet]", count: 1 - assert_select "link[rel=stylesheet][href^=?]", "/assets/application-" + assert_select "link[rel=stylesheet][href^=?]", "/assets/tailwind-" end test "the Weave button submits without Turbo, so the browser follows the redirect to Weave" do