site: put the board above the fold
The page claimed 'mission control' and showed a terminal. It now shows
the board itself, directly under the hero, on bench's own repo with
three agents working — the claim demonstrated rather than described.
The terminal gives up the height for it: the .env preamble and the
Ctrl-C line go, the install command and the three setup questions stay.
tests/test_site_landing.py's TRANSCRIPT follows, and still holds every
remaining line against the source that prints it.
The shot goes through stamp() like the stylesheet, so its url carries a
?v=<hash>. Without that, /static/*'s year-long immutable cache would
make the screenshot unreplaceable. 1600px wide and palettised to 256
colours — 164K rather than 452K, and a flat dark UI loses nothing to it.
img{max-width:100%} is now a base rule rather than only .prose img: the
shot lives outside the article body, where that rule never reached.
This commit is contained in:
+3
-1
@@ -98,7 +98,8 @@ STATIC_SKIP = ("*.md", ".DS_Store")
|
||||
|
||||
# The assets a template links directly, and the placeholder each one is
|
||||
# offered under. See stamp() for why they carry a query string.
|
||||
STAMPED = {"stylesheet": "static/site.css", "icon": "static/favicon.svg"}
|
||||
STAMPED = {"stylesheet": "static/site.css", "icon": "static/favicon.svg",
|
||||
"board_shot": "static/board.png"}
|
||||
|
||||
ATX = re.compile(r"^(#{1,6})[ \t]+(.*?)[ \t]*#*[ \t]*$")
|
||||
FENCE = re.compile(r"^ {0,3}(`{3,}|~{3,})")
|
||||
@@ -602,6 +603,7 @@ def render_page(page: dict, manifest: dict, *, site: Path, repo: Path,
|
||||
fields = {
|
||||
"stylesheet": stamps["stylesheet"],
|
||||
"icon": stamps["icon"],
|
||||
"board_shot": stamps["board_shot"],
|
||||
"title": escape(page["title"]),
|
||||
"description": escape(page.get("description")
|
||||
or config.get("description", "")),
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 164 KiB |
@@ -66,6 +66,9 @@ a:hover{color:var(--text);text-decoration:underline}
|
||||
.dim{color:var(--dim)}
|
||||
.spacer{flex:1}
|
||||
.rule{height:1px;background:var(--border-soft);margin:12px 0}
|
||||
/* No image, anywhere, may widen the page. .prose img keeps its own
|
||||
rule for the article body; this is the floor under every layout. */
|
||||
img{max-width:100%;height:auto}
|
||||
@media (prefers-reduced-motion: reduce){
|
||||
*,*::before,*::after{animation:none !important;transition:none !important}
|
||||
}
|
||||
@@ -305,6 +308,24 @@ a:hover{color:var(--text);text-decoration:underline}
|
||||
.t-muted{color:var(--ink-muted)}
|
||||
.t-dim{color:var(--ink-dim)}
|
||||
|
||||
/* The board itself, directly under the hero — the claim the copy makes,
|
||||
shown rather than described. Sized so its top edge clears the fold on
|
||||
a laptop, which is what the shortened terminal above it buys. */
|
||||
.shot{margin:0;padding:0 44px 30px}
|
||||
.shot-img{
|
||||
display:block;width:100%;height:auto;
|
||||
border:1px solid var(--border);border-radius:12px;
|
||||
box-shadow:var(--shadow);background:var(--ink);
|
||||
}
|
||||
.shot-cap{
|
||||
display:flex;gap:12px;align-items:baseline;padding:10px 2px 0;
|
||||
font-size:var(--t-ui);line-height:1.55;color:var(--muted);
|
||||
}
|
||||
.shot-tag{
|
||||
flex:0 0 auto;font-size:var(--t-micro);letter-spacing:.1em;
|
||||
text-transform:uppercase;color:var(--dim);
|
||||
}
|
||||
|
||||
/* The three sentences between the hero and the doors. Quiet on purpose:
|
||||
no cards, no borders, no colour — the doors below are the page's one
|
||||
grid of boxes, and repeating that shape here would make the reader
|
||||
@@ -446,6 +467,7 @@ a:hover{color:var(--text);text-decoration:underline}
|
||||
.snags{padding:8px 24px 26px}
|
||||
.snag-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
|
||||
.strip{padding:18px 24px}
|
||||
.shot{padding:0 24px 26px}
|
||||
|
||||
/* Only a code block or a table may scroll sideways, so a token that
|
||||
cannot break — a url, a curl one-liner in running text — breaks
|
||||
@@ -532,6 +554,8 @@ a:hover{color:var(--text);text-decoration:underline}
|
||||
.doors{padding:0 16px 24px}
|
||||
.snags{padding:8px 16px 22px}
|
||||
.strip{padding:16px}
|
||||
.shot{padding:0 16px 22px}
|
||||
.shot-cap{flex-direction:column;gap:4px}
|
||||
.page-article .prose{padding:20px 16px 32px}
|
||||
.menu-summary{padding:9px 14px}
|
||||
.footer{padding:18px 14px}
|
||||
|
||||
@@ -89,23 +89,33 @@ $nav
|
||||
</div>
|
||||
<pre class="terminal-body">$install_block
|
||||
|
||||
No .task-manager/manager/local/.env yet — a few questions and bench writes one.
|
||||
Enter takes the default in [brackets]; Ctrl-D skips the rest.
|
||||
|
||||
solo or team? <span class="t-accent">[solo]</span>:
|
||||
which agent adapter? <span class="t-accent">[claude]</span>:
|
||||
what command runs this project's tests? <span class="t-accent">[python3 -m unittest]</span>:
|
||||
|
||||
Wrote .task-manager/manager/local/.env — every other setting is in there, commented; edit it any time.
|
||||
|
||||
<span class="t-dim"> …</span>
|
||||
|
||||
Task board for ~/your-repo/.task-manager/tasks
|
||||
<span class="t-accent">http://127.0.0.1:26071/</span>
|
||||
<span class="t-dim">Ctrl-C to stop</span></pre>
|
||||
<span class="t-accent">http://127.0.0.1:26071/</span></pre>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- What the command above opens. The shot is stamped like the
|
||||
stylesheet ($$board_shot carries ?v=<hash>), because /static/* is
|
||||
cached immutable for a year and a screenshot that could never be
|
||||
replaced would be a poor thing to publish. -->
|
||||
<figure class="shot">
|
||||
<img class="shot-img" src="$board_shot" width="1600" height="857"
|
||||
alt="The bench board: cards in backlog, to-do, in-progress, review
|
||||
and done, three agents working, each card showing its branch
|
||||
and the command its agent is running." decoding="async">
|
||||
<figcaption class="shot-cap">
|
||||
<span class="mono shot-tag">the board</span>
|
||||
<span>bench's own, running on this repo. Three agents at work, each on
|
||||
its own branch — and every one of them stops at review.</span>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<!-- Three sentences a reader has said out loud before finding this page.
|
||||
Each one is answered by a mechanism rather than a promise, and each
|
||||
mechanism has a door below it that explains itself. -->
|
||||
|
||||
@@ -40,21 +40,19 @@ CONFIG = REPO / "manager" / "core" / "config.py"
|
||||
#
|
||||
# The page shows fewer lines than a real first run does; its title bar
|
||||
# says "abridged". It shows none a first run does not.
|
||||
#
|
||||
# Shorter since the board shot joined the hero: the terminal gives up
|
||||
# height so the screenshot below it clears the fold. Trimming lines is
|
||||
# allowed — every line here must still be shown, and still be real — but
|
||||
# a line added back has to earn both halves of that again.
|
||||
TRANSCRIPT = [
|
||||
("a few questions and bench writes one.",
|
||||
"a few questions and bench writes", INSTALL),
|
||||
("Enter takes the default in [brackets]; Ctrl-D skips the rest.",
|
||||
"Enter takes the default in [brackets]; Ctrl-D skips the rest.", INSTALL),
|
||||
("solo or team?", "solo or team?", INSTALL),
|
||||
("which agent adapter?", "which agent adapter?", INSTALL),
|
||||
("what command runs this project's tests?",
|
||||
"what command runs this project's tests?", INSTALL),
|
||||
("python3 -m unittest", "python3 -m unittest", INSTALL),
|
||||
("every other setting is in there, commented; edit it any time.",
|
||||
"every other setting is in there,", INSTALL),
|
||||
("Task board for", "Task board for", BOARD),
|
||||
("http://127.0.0.1:", "http://127.0.0.1:", BOARD),
|
||||
("Ctrl-C to stop", "Ctrl-C to stop", BOARD),
|
||||
("26071", "26071", CONFIG),
|
||||
]
|
||||
|
||||
|
||||
@@ -252,9 +252,14 @@ class OnlyCodeAndTablesScrollSideways(unittest.TestCase):
|
||||
block.get(".prose :not(pre) > code", "").replace(" ", ""))
|
||||
|
||||
def test_an_image_can_never_widen_the_page(self):
|
||||
"""Both the article body's rule and the floor under every layout:
|
||||
the landing page's board shot lives outside .prose, so a rule
|
||||
scoped to prose would not have covered it."""
|
||||
base = rules(base_sheet(self.css))
|
||||
self.assertIn("max-width:100%",
|
||||
base.get(".prose img", "").replace(" ", ""))
|
||||
for selector in (".prose img", "img"):
|
||||
with self.subTest(selector=selector):
|
||||
self.assertIn("max-width:100%",
|
||||
base.get(selector, "").replace(" ", ""))
|
||||
|
||||
|
||||
class EveryTemplateSaysHowWideItIs(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user