Skip to content

v4.1.0

Choose a tag to compare

@stamat stamat released this 10 Aug 18:58
· 2 commits to main since this release

The edit-link row asked readers to fix the page and told them nothing about how
stale it was. A page nobody has revised since a rewrite two versions ago reads
exactly like one corrected this morning.

Added

  • docs renders a Last updated: line at the left of the edit-link row
    whenever a page has updated in its data — hand-written in front matter, or
    filled in for every page by Poops ≥ 2.4.0's markup.options.lastUpdated, which
    dates pages from a committed index of content hashes rather than from git or an
    mtime a clone destroys. A page without updated renders no line, and the edit
    link stays exactly where it was. The date prints as MMM D, YYYY beside a
    machine-readable <time datetime>; the format is the theme's, not a new config
    key.

    New DOM and a new class. The row is now .edit-link-row > p.last-updated + a.edit-link, and it renders for a page carrying updated but no
    repo/filePath to link to — a case that previously rendered nothing at all.
    .edit-link-row gained align-items, flex-wrap and gap; it still ends
    flush right, with .last-updated pushed away from it by its own auto margin.
    Below 40rem the row turns into a centred column instead — wrapped, the date
    hugging the left edge and the button the right read as two unrelated things. A
    site overriding either class should look at it once.

Changed

  • The icon links and the theme switch go into the drawer with the links. On a
    phone the bar held a brand, a search field, every site.iconLinks button, the
    GitHub link, the theme switch and a hamburger — so the title truncated to a few
    characters to pay for controls the drawer under it had room for. They now move
    into the drawer as the row under the links, and move back onto the bar when
    <navbar-elemental> measures its way out of stack mode. Search stays: it is
    already an icon at that width and expanding it is the reason to keep it in reach.

    Moved, not copied. One <switch-elemental> in the page at every width, so
    there is never a second switch left saying the theme is off while the page is
    dark. With scripting off there is no drawer either, and the controls stay on the
    bar exactly as before.

    New DOM and a moved custom property. In stack mode the row gains a final
    <li class="drawer-actions" data-navbar-stack> holding those controls —
    data-navbar-stack keeps it out of the element's measurement, so it never
    competes with a link for room on the bar. --actions-inset is now declared on
    .topbar > navbar-elemental rather than on .topbar-actions: read from the
    group the switch has just left, the padding it sets would compute to nothing. A
    site overriding it on .topbar-actions still gets what it asked for on the bar
    and should set it on the bar instead.

Full Changelog: v4.0.2...v4.1.0