From 5314b342ffe8f35e433ffe6c6395bb00bd4c8350 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Tue, 25 Aug 2026 22:56:39 +0200 Subject: [PATCH] website: the feature cards just hold their text now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dialog is gone. It showed the same paragraph that was already on the card, only unclamped — so a click bought you nothing, which is a bad trade for making fourteen cards look like something you have to interact with. The cards are plain
s now and the text is simply on them, no line clamp. What is left of the click: four cards point into the docs — importing, self-hosting, the MCP server, backups — where there genuinely is more to read. Those are ordinary links at the foot of their card rather than a click target covering the whole box. Cards are a little wider (250-310px) to carry the full text without turning into columns of two words, and the rail still snaps and scrolls the same way. Verified in the browser at 1440 and 390: fourteen cards, no dialog left in the DOM, no buttons inside the rail, all four docs links present, nothing clipped (every .fcard-b has scrollHeight == clientHeight), every card the same height, still flush with the text above, no horizontal overflow, no JS errors. --- website/about.html | 4 +-- website/docs.html | 4 +-- website/index.html | 81 ++++++++++++++++++++-------------------------- website/site.js | 40 ++--------------------- website/styles.css | 69 +++++---------------------------------- 5 files changed, 50 insertions(+), 148 deletions(-) diff --git a/website/about.html b/website/about.html index c662937..38f8962 100644 --- a/website/about.html +++ b/website/about.html @@ -9,7 +9,7 @@ - + @@ -130,6 +130,6 @@ - + diff --git a/website/docs.html b/website/docs.html index 9fc3ff8..7275ca4 100644 --- a/website/docs.html +++ b/website/docs.html @@ -9,7 +9,7 @@ - + @@ -209,6 +209,6 @@ docker compose up -d - + diff --git a/website/index.html b/website/index.html index 2e1ddc3..9e247fb 100644 --- a/website/index.html +++ b/website/index.html @@ -14,7 +14,7 @@ - + + diff --git a/website/site.js b/website/site.js index 1b6a8c0..bc0b72a 100644 --- a/website/site.js +++ b/website/site.js @@ -177,45 +177,11 @@ const GL_PROJECT = 'https://gitlab.com/api/v4/projects/DuarteSantos8%2Fopengym' } catch (e) { /* fallback entries stay */ } })() -/* The "and the rest of it" rail: each card opens its own full text in a shared dialog, and - the arrows scroll the rail for pointers that cannot swipe. Everything the dialog shows is - read out of the card itself, so this only ever re-presents text that is already on the - page — with JS off the cards stay unclamped and there is nothing to open. */ +/* The "and the rest of it" rail: arrows for pointers that cannot swipe. The cards are plain + reading, so there is nothing to activate on them. */ ;(() => { const rail = document.querySelector('.frail') - const dlg = document.querySelector('.fdlg') - if (!rail || !dlg || typeof dlg.showModal !== 'function') return - - const use = dlg.querySelector('.fdlg-ic use') - const title = dlg.querySelector('#fdlg-t') - const body = dlg.querySelector('.fdlg-b') - const go = dlg.querySelector('.fdlg-go') - - rail.querySelectorAll('.fcard').forEach(card => { - card.addEventListener('click', () => { - const href = card.querySelector('.fcard-link')?.dataset.href - use.setAttribute('href', card.querySelector('.fcard-ic use').getAttribute('href')) - title.textContent = card.querySelector('.fcard-t').textContent - body.textContent = card.querySelector('.fcard-b').textContent - if (href) { - go.href = href - go.textContent = card.querySelector('.fcard-link').textContent + ' →' - go.hidden = false - } else { - go.hidden = true - } - dlg.showModal() - }) - }) - - dlg.querySelector('.fdlg-x').addEventListener('click', () => dlg.close()) - // Clicking the backdrop closes it: the click lands on the dialog itself, outside its box. - dlg.addEventListener('click', e => { - const r = dlg.getBoundingClientRect() - const inside = e.clientX >= r.left && e.clientX <= r.right && e.clientY >= r.top && e.clientY <= r.bottom - if (!inside) dlg.close() - }) - + if (!rail) return const nav = document.querySelector('.frail-nav') if (nav) { nav.hidden = false diff --git a/website/styles.css b/website/styles.css index 5e4b918..9d11afc 100644 --- a/website/styles.css +++ b/website/styles.css @@ -724,18 +724,16 @@ table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 26px; .frail { align-items: stretch; padding-top: 10px; padding-bottom: 10px; } .more + .bleed, .bleed:has(.frail) { margin-top: clamp(18px, 2.4vw, 26px); } +/* Not interactive: the card holds its whole text, so there is nothing to open. Only the + four cards that point into the docs carry a link, because that is the only place there is + genuinely more to read. */ .fcard { - flex: 0 0 auto; width: clamp(232px, 74vw, 290px); scroll-snap-align: center; + flex: 0 0 auto; width: clamp(250px, 78vw, 310px); scroll-snap-align: center; display: flex; flex-direction: column; text-align: left; padding: 22px; background: var(--surface); border: 1px solid var(--hair-soft); border-radius: var(--r-m); - color: var(--fg); font: inherit; cursor: pointer; - transition: border-color .3s var(--ease), background-color .3s var(--ease), - transform .3s var(--ease); + color: var(--fg); } -.fcard:hover { transform: translateY(-2px); border-color: var(--hair); background: var(--surface-2); } -.fcard:active { transform: none; } -.fcard:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; } .fcard-ic { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 15px; display: flex; align-items: center; justify-content: center; flex: none; @@ -744,16 +742,11 @@ table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 26px; .fcard-ic svg { width: 21px; height: 21px; } .fcard-t { font-size: 16.5px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 6px; } .fcard-b { color: var(--fg-2); font-size: 14.5px; line-height: 1.5; } -/* Only clamped when the dialog exists to show the rest. */ -.js .fcard-b { - display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; - overflow: hidden; -} -.fcard-link { display: none; } -.js .fcard-link { - display: block; margin-top: auto; padding-top: 14px; +.fcard-link { + display: block; margin-top: auto; padding-top: 16px; color: var(--acc); font-size: 13.5px; font-weight: 500; } +.fcard-link:hover { text-decoration: underline; } /* `display: flex` here beats the UA's `[hidden] { display: none }`, so the attribute has to be honoured explicitly — otherwise the arrows show up without JS, where they do nothing. */ @@ -771,52 +764,6 @@ table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 26px; /* Touch scrolls; the arrows are for pointers that cannot swipe. */ @media (hover: none) { .frail-nav { display: none; } } -.fdlg { - /* margin:auto is what centres a modal dialog, and `* { margin: 0 }` at the top of this - file had taken it away — the dialog was rendering at its static position, which put it - off the top-left of the viewport on desktop and completely off-screen on a phone. */ - /* Pinned to the viewport, not the document. Left to the browser it resolved to - `position: absolute`, so `inset: 0; margin: auto` centred it inside the initial - containing block — near the top of the PAGE — and opening it scrolled the whole page - up to meet it. `fixed` also makes this the containing block for the close button. */ - position: fixed; inset: 0; margin: auto; - width: min(460px, calc(100% - 2 * var(--pad))); - height: fit-content; - max-height: calc(100dvh - 2 * var(--pad)); - padding: 26px; border: 1px solid var(--hair); border-radius: var(--r-m); - background: var(--surface); color: var(--fg); - overflow: auto; overscroll-behavior: contain; -} -/* Fade in with the backdrop rather than snapping into place. */ -.fdlg[open] { animation: dlgIn .26s var(--ease); } -.fdlg[open]::backdrop { animation: dlgBackdrop .26s var(--ease); } -@keyframes dlgIn { from { opacity: 0; transform: translateY(8px) scale(.985); } } -@keyframes dlgBackdrop { from { opacity: 0; } } -@media (prefers-reduced-motion: reduce) { - .fdlg[open], .fdlg[open]::backdrop { animation: none; } -} -.fdlg::backdrop { background: rgba(0, 0, 0, .62); } -.fdlg-ic { - width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px; - display: flex; align-items: center; justify-content: center; - background: color-mix(in srgb, var(--acc) 15%, transparent); color: var(--acc); -} -.fdlg-ic svg { width: 23px; height: 23px; } -.fdlg h3 { font-size: 20px; margin-bottom: 10px; } -.fdlg-b { color: var(--fg-2); font-size: 15.5px; line-height: 1.6; margin: 0; } -.fdlg-go { - display: inline-block; margin-top: 20px; color: var(--acc); - font-size: 14.5px; font-weight: 500; -} -/* Same trap as .frail-nav: without this, a card with no link still shows one. */ -.fdlg-go[hidden] { display: none; } -.fdlg-x { - position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; - display: flex; align-items: center; justify-content: center; - background: none; border: 0; border-radius: 50%; color: var(--fg-3); cursor: pointer; -} -.fdlg-x:hover { color: var(--fg); background: var(--surface-2); } -.fdlg-x svg { width: 17px; height: 17px; } /* ------------------------------------------------------------ first-visit intro The hero settles in on the first load of a visit instead of appearing all at once.