Skip to content

Commit 2c03a52

Browse files
committed
"All examples" back-link uses ↑ (up arrow) instead of ← (left arrow)
The link goes to a higher-level index page (/), not to a sibling page. ↑ conveys the up-the-hierarchy navigation; ← would mean "previous page in sequence". Three call sites updated: - src/templates/example.html (example page chrome) - src/app.py (journey page chrome) - scripts/build_prototypes.py (prototype example rendering) Left ← arrows kept where they're correct: "← Current layout" on /layout-options/* (side-to-side), and the prev-example link in the example-nav block (sequence navigation).
1 parent 5ffb3bb commit 2c03a52

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/build_prototypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def render_article(example: dict, *, banners: dict[str, str] | None = None) -> s
102102
output = html.escape(example.get("expected_output", ""))
103103
return f"""
104104
<article class="example-shell">
105-
<div class="example-top"><a class="text-link" href="/"> All examples</a><a class="text-link" href="{html.escape(example['doc_url'])}">Python docs reference</a></div>
105+
<div class="example-top"><a class="text-link" href="/"> All examples</a><a class="text-link" href="{html.escape(example['doc_url'])}">Python docs reference</a></div>
106106
<section class="example-intro">
107107
<p class="eyebrow">{html.escape(example['section'])}</p>
108108
<h1>{html.escape(example['title'])}</h1>

src/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def render_journey_page(journey):
576576
sections.append(f'<section class="journey-section"><h2>{html.escape(section["title"])}</h2><p class="meta">{html.escape(section["summary"])}</p>{figure_html}<ul class="journey-list">{"".join(rows)}</ul></section>')
577577
content = f'''
578578
<article class="example-shell journey-page">
579-
<div class="example-top"><a class="text-link" href="/"> All examples</a><a class="text-link" href="{html.escape(REFERENCE_URL)}">Python docs reference</a></div>
579+
<div class="example-top"><a class="text-link" href="/"> All examples</a><a class="text-link" href="{html.escape(REFERENCE_URL)}">Python docs reference</a></div>
580580
<section class="example-intro">
581581
<p class="eyebrow">Journey</p>
582582
<h1>{html.escape(journey["title"])}</h1>

src/asset_manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Generated by scripts/fingerprint_assets.py. Do not edit by hand.
22
ASSET_PATHS = {'SITE_CSS': '/site.b5d5cf89f344.css', 'SYNTAX_JS': '/syntax-highlight.3b6c7f730d46.js', 'EDITOR_JS': '/editor.dd81f5171b14.js'}
3-
HTML_CACHE_VERSION = 'a7b91f426795'
3+
HTML_CACHE_VERSION = 'b61de6981e3d'

src/templates/example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<article class="example-shell">
2-
<div class="example-top"><a class="text-link" href="/"> All examples</a><a class="text-link" href="__DOC_URL__">Python docs reference</a></div>
2+
<div class="example-top"><a class="text-link" href="/"> All examples</a><a class="text-link" href="__DOC_URL__">Python docs reference</a></div>
33
<section class="example-intro">
44
<p class="eyebrow">__SECTION__</p>
55
<h1>__TITLE__</h1>

0 commit comments

Comments
 (0)