Files
bench/site/templates/article.html
T
istos db3b56b737 merge main into task/35: keep both rails' folded strips and 34's lede
article.html: 34 added the lede under the h1, 35 added the folded
contents strip in the same place. Both belong, and site.css settles the
order — its lede adjacency names .menu-contents + p, so the strip sits
between the title and the lede.

Two things the merge exposed rather than caused:

- $toc and $sidebar were spelled inside article.html's own comments,
  and string.Template substitutes there too, so every page carried a
  second copy of both rails inside a comment (28 toc links for 7
  headings). Doubled to $$toc / $$sidebar, as the template contract
  already said to.
- test_site_pages assumed one rendering of each rail. Both are now
  written twice by design, so the tests assert every rendering agrees
  with the page instead of assuming there is one.

The card file keeps main's location: the board owns a card's stage, and
main had already moved 35 to review/.
2026-07-31 15:27:00 +02:00

121 lines
4.0 KiB
HTML

<!doctype html>
<!-- Layout "article" — 1a Harbour from the turn-2 docs design: three
columns, the sidebar carrying the IA, the generated body in the
middle, contents and the two GitHub links in the gutter.
A phone has room for one of those columns, so the other two are
written twice: once as the column the design draws, and once as a
<details> strip that is display:none until the breakpoint which
hides its column. The strips carry the same $$sidebar and $$toc, so
there is one source for the links and no way for the folded copy to
say something the column does not.
Placeholders are string.Template's; a literal dollar in the markup
would have to be doubled. -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>$title · $site_title</title>
<meta name="description" content="$description">
<link rel="canonical" href="$canonical">
<link rel="icon" href="$icon">
<link rel="stylesheet" href="$stylesheet">
</head>
<body class="page-article">
<div class="topbar">
<span class="topbar-org">12vectors</span>
<span class="topbar-sep">/</span>
<span class="topbar-repo">bench</span>
<span class="spacer"></span>
<span>docs for $version</span>
</div>
<header class="masthead">
<a class="wordmark" href="/">
<span class="wordmark-name">$site_title</span>
<span class="wordmark-tag">$site_tagline</span>
</a>
<nav class="nav">
$nav
</nav>
<span class="spacer"></span>
<a class="button button-solid" href="$repo_url">GitHub ↗</a>
</header>
<!-- The section nav, folded. Shown from 760px down, where the .side
column below is gone. A <details> is the whole mechanism: one menu
that opens and closes needs no script, and this site has none. -->
<details class="menu">
<summary class="menu-summary">Documentation</summary>
<nav class="menu-panel">
$sidebar
</nav>
</details>
<div class="shell">
<aside class="side">
$sidebar
<div class="side-note">
<span class="mono dim">$version</span>
<span>Generated from the repository's own markdown. What the docs
say and what bench does cannot drift apart.</span>
</div>
</aside>
<article class="prose">
<div class="crumbs">$breadcrumb</div>
<h1>$title</h1>
<!-- "On this page", folded under the title. Shown from 1080px down,
where the gutter that normally carries it is gone. A page whose
body has no h2s gets an empty $$toc, and the stylesheet drops the
strip rather than offering a summary over nothing. It sits above
the lede on purpose: the stylesheet's lede adjacency names
.menu-contents + p for exactly this order. -->
<details class="menu menu-contents">
<summary class="menu-summary">On this page</summary>
<nav class="menu-panel">
$toc
</nav>
</details>
<!-- The one sentence an article authors. Everything below it is the
body placeholder: a heading slice of the file named in the
gutter. (Placeholders substitute inside comments too, so this
one cannot spell that name out.) -->
<p class="prose-lede">$lede</p>
$body
$flow
</article>
<aside class="gutter">
<div class="toc">
$toc
<div class="rule"></div>
<a class="gutter-link" href="$source_url">Edit this page on GitHub ↗</a>
<a class="gutter-link" href="$issues_url">Open an issue ↗</a>
</div>
<p class="marginalia">← this page is a slice of
<span class="mono">$source_path</span>; rename that heading and the
build stops</p>
</aside>
</div>
<footer class="footer">
<pre class="footer-mark"> ___________________
|___________________|
|| ||
|| ||</pre>
<div class="footer-id">
<span class="footer-name">$site_title</span>
<span class="mono">a 12vectors product · built in the open</span>
</div>
<span class="spacer"></span>
<a class="mono footer-repo" href="$repo_url">github.com/12vectors/bench</a>
</footer>
</body>
</html>