website: the feature cards just hold their text now

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 <article>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.
This commit is contained in:
Duarte Santos committed 2026-08-25 22:56:39 +02:00
1 parent 1290db11b5
commit 5314b342ff
5 files changed
+50 -148

No files matched your search

+3 -37
View File
@@ -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