Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions site/src/components/VersionBanner.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import stable from '../generated/echo-source.json';
import manifest from '../generated/config-fields.json';
import { formatRevision } from '../data/source.mjs';
import { isProPage } from '../pro-page.mjs';
import { Icon } from '@astrojs/starlight/components';

const isNext = process.env.DOCS_CHANNEL === 'next';
const revision = manifest.revision;
Expand All @@ -19,25 +18,16 @@ const labels = {
}[locale];
// /pro is a release-site product page, not versioned documentation.
const isProduct = isProPage(path);
// Echo Pro launch note: the English release home only, in place of the
// version strip; it also hides the hero's Pro line (global style below).
// Remove this block and that style by 25 Nov 2026.
const isLaunchHome = !isNext && path === '/';
const counterpart = /\/(?:404|404\.html)\/?$/.test(path)
? (isNext ? '/' : '/next/')
: isNext ? path.replace(/^\/next/, '') || '/' : `/next${path}`;
---

{isLaunchHome && <aside class="echo-version-banner launch" aria-label="Announcement" data-pagefind-ignore>
<span><strong>New: Echo Pro</strong> — multi-tenant auth, quotas and signed webhooks for Echo&nbsp;v5.<span class="detail"> Founding pricing for the first 25 organisations.</span></span>
<a class="switch" href="/pro" data-ga-event="pro_click" data-ga-placement="launch_banner">See Echo Pro <Icon name="right-arrow" class="arrow" /></a>
</aside>}

{isProduct && path.replace(/\/$/, '') !== '/pro' && <aside class="echo-version-banner" aria-label="Echo Pro version" data-pagefind-ignore>
<strong>Echo Pro {pro.version}</strong><span>· Go 1.26+ · Echo v5.4.2</span><a href="/pro/install/">Install</a>
</aside>}

{!isProduct && !isLaunchHome && <nav class="echo-version-banner" aria-label="Documentation version" data-pagefind-ignore>
{!isProduct && <nav class="echo-version-banner" aria-label="Documentation version" data-pagefind-ignore>
<strong>{isNext ? labels.next : `${labels.release} · Echo ${stable.release}`}</strong>
<span>· {labels.source} <a href={`https://github.com/labstack/echo/tree/${revision}`}>{formatRevision(revision)}</a></span>
<a class="switch" data-version-switch href={counterpart}>{labels.switch}</a>
Expand All @@ -49,17 +39,5 @@ const counterpart = /\/(?:404|404\.html)\/?$/.test(path)
.echo-version-banner strong { color: var(--sl-color-white); font-weight: 600; }
.echo-version-banner a { color: var(--echo-cyan-text); text-decoration: underline; text-underline-offset: .15em; }
.echo-version-banner .switch { margin-inline-start: .7rem; font-weight: 600; }
/* DM Sans has no arrow glyph; the icon keeps it from falling back to a system font. */
.echo-version-banner .arrow { display: inline-block; vertical-align: -0.125em; font-size: 1em; }
.echo-version-banner.launch span { text-align: center; text-wrap: balance; }
.echo-version-banner a:focus-visible { outline: 2px solid var(--echo-cyan-text); outline-offset: 2px; }
@media (max-width: 40rem) {
.echo-version-banner.launch .detail { display: none; }
.echo-version-banner.launch .switch { margin-inline-start: 0; }
}
</style>

<style is:global>
/* The launch note carries the Pro pitch while it runs. */
body:has(.echo-version-banner.launch) .hh-pro { display: none; }
</style>