diff --git a/docs/src/components/Hero.astro b/docs/src/components/Hero.astro index 2564614..1874c21 100644 --- a/docs/src/components/Hero.astro +++ b/docs/src/components/Hero.astro @@ -1,6 +1,8 @@ --- // Override of Starlight's Hero so the splash page's visual slot holds the -// live size chart instead of an image. Structure and styles mirror +// live size chart instead of an image, and the actions row carries a +// copyable `npm create wcb@latest` command chip beside the buttons +// (patterned on astro.build's hero). Structure and styles mirror // @astrojs/starlight/components/Hero.astro (0.39.1) — a page that declares // `hero.image` still gets the stock image treatment; pages without one get // the chart. @@ -10,6 +12,7 @@ import SizeChart from './SizeChart.astro' // mirrors starlight's own constant; not a public export const PAGE_TITLE_ID = '_top' +const CREATE_COMMAND = 'npm create wcb@latest' const { data } = Astro.locals.starlightRoute.entry const { title = data.title, tagline, image, actions = [] } = data.hero || {} @@ -55,23 +58,72 @@ if (image) {
{tagline && } - { - actions.length > 0 && ( -{CREATE_COMMAND}
+
+