From 6cf0b259e194ded9ba33ba149a3cf5c7a9f2e5f1 Mon Sep 17 00:00:00 2001 From: Radin Hamidi Rad Date: Wed, 29 Apr 2026 21:56:13 -0400 Subject: [PATCH 1/3] Header: linkout icons, current-tab; sitemap: point at populated file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three pieces of user-requested polish: 1. Marketing nav: add Leaderboard alongside Dashboard, both with the linkout arrow icon and opening in the current tab. Drop the trailing "↗" from the old "Dashboard ↗" label since the icon now conveys it. 2. Leaderboard nav: keep the Toolkit link (re-added earlier), with the same linkout icon, current-tab. 3. Header component: add a `newTab` prop separate from `external`. `external` controls icon rendering only; `newTab` controls target/rel. Default behavior is current-tab — let users middle-click / cmd-click for a new tab when they want one. Also propagate same-tab to EcosystemMap cards (they were forcing _blank for any http link). Sitemap visibility: `sitemap-index.xml` is one level above the URLs (it just points at sitemap-0.xml — standard Sitemaps protocol). When visited directly it looks empty. Updated to point at /sitemap-0.xml so anything inspecting the page lands on the populated file. robots.txt now lists both URLs (crawlers handle either form). Stacked on chore/copy-polish (PR #13). Once that merges, this PR's diff narrows to just these files. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../site/src/layouts/Default.astro | 1 + web/shared/components/Header.astro | 31 +++++++++++++++++-- web/site/src/components/EcosystemMap.astro | 2 -- web/site/src/layouts/Default.astro | 8 +++-- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/reproducibility/site/src/layouts/Default.astro b/reproducibility/site/src/layouts/Default.astro index 1fac4bd..c54cb92 100644 --- a/reproducibility/site/src/layouts/Default.astro +++ b/reproducibility/site/src/layouts/Default.astro @@ -11,6 +11,7 @@ interface Props { const { title, description } = Astro.props; +// External links render the linkout icon and open in the current tab. const navLinks = [ { label: "Datasets", href: "/datasets/" }, { label: "Methods", href: "/methods/" }, diff --git a/web/shared/components/Header.astro b/web/shared/components/Header.astro index 84526c1..ab41dc9 100644 --- a/web/shared/components/Header.astro +++ b/web/shared/components/Header.astro @@ -7,7 +7,15 @@ interface NavLink { label: string; href: string; + /** + * Renders the external-link arrow icon next to the label so users can see + * at a glance that the link leaves the current site. Note: by default the + * link still opens in the *same* tab — set `newTab: true` for cross-site + * links you really want to open in a fresh tab. + */ external?: boolean; + /** Open in a new tab. Adds rel="noopener noreferrer" automatically. */ + newTab?: boolean; } interface Props { @@ -44,11 +52,28 @@ const { links.map((l) => ( {l.label} + {l.external && ( + + )} )) } diff --git a/web/site/src/components/EcosystemMap.astro b/web/site/src/components/EcosystemMap.astro index 270ff0c..5bb74f9 100644 --- a/web/site/src/components/EcosystemMap.astro +++ b/web/site/src/components/EcosystemMap.astro @@ -53,8 +53,6 @@ const cards = [ cards.map((c) => ( - + {jsonLd &&