From 22a006bf0fd6760fbeb86134ec5122d2a9765ffb Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Nov 2026 15:53:23 +0000 Subject: [PATCH] Drop the Jump to menu from the overview The groups follow each other with their headings; the site ships no script any more. Gone: the menu, public/toc.js and its styles. The rule in AGENTS.md is "No script" again, and the test refuses any diff --git a/src/styles/global.css b/src/styles/global.css index eecbf6a..8201611 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -204,28 +204,3 @@ main { flex: 1 0 auto; } .foot a { color: var(--muted); text-decoration: none; } .foot a:hover { color: var(--brand); } -/* ---- the menu of the overview: folded at the top, always in view -------- */ -.toc { position: sticky; top: 0; z-index: 5; margin: 0 0 24px; padding: 12px 0; background: var(--bg); } -.toc details { position: relative; display: inline-block; } -.toc summary { - display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer; list-style: none; - border: 1px solid var(--line); border-radius: 10px; background: var(--card); - font-size: 14px; font-weight: 600; color: var(--ink); - transition: border-color .15s; -} -.toc summary::-webkit-details-marker { display: none; } -.toc summary::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .15s; } -.toc details[open] summary::after { transform: translateY(1px) rotate(-135deg); } -.toc summary:hover, .toc details[open] summary { border-color: var(--brand); } -.toc .toc-hint { color: var(--muted); font-weight: 500; } -.toc-list { - position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; padding: 6px; - display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; - background: var(--card); box-shadow: var(--shadow); -} -.toc-list a { display: flex; justify-content: space-between; gap: 16px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; } -.toc-list a span { color: var(--muted); font-variant-numeric: tabular-nums; } -.toc-list a:hover { background: var(--bg); color: var(--ink); } -.toc-list a[aria-current="true"] { color: var(--brand); font-weight: 600; } -.group { scroll-margin-top: 72px; } -@media (prefers-reduced-motion: reduce) { .toc summary, .toc summary::after { transition: none; } } diff --git a/test/site.test.mjs b/test/site.test.mjs index 29836cd..60a3306 100644 --- a/test/site.test.mjs +++ b/test/site.test.mjs @@ -17,11 +17,8 @@ const hosts = ["abap2ui5.github.io", "abap2ui5-addons.github.io", "github.com/ab const pages = facts.filter((r) => !own.some(([o]) => o === r)); function noScript(html, name) { - // the one script allowed is the menu marker, a file of this origin - for (const m of html.matchAll(/]*)>([\s\S]*?)<\/script>/gi)) { - assert.match(m[1], /\ssrc="\/toc\.js"/, `${name}: a script other than /toc.js`); - assert.equal(m[2].trim(), "", `${name}: inline script code`); - } + // no script at all: the search of the family is on the entry page + assert.doesNotMatch(html, / { assert.ok(hosts.some((h) => site.includes(h)), `${r}: ${site} is not one of the project's places`); } assert.doesNotMatch(home, /]*>([\s\S]*?)<\/nav>/); - assert.ok(toc, "a menu of the groups"); for (const id of [...catalog.matchAll(/id: "([^"]+)"/g)].map((m) => m[1])) { - assert.match(toc[1], new RegExp(`href="#${id}"`), `the menu links #${id}`); assert.match(home, new RegExp(`