feat(site): add pre-release docs banner on main.videojs.org (#1575)

This commit is contained in:
Renzo Delfino
2026-06-10 14:47:21 -03:00
committed by GitHub
parent 48a984aecd
commit f90a700a00
7 changed files with 54 additions and 9 deletions
@@ -0,0 +1,32 @@
---
import { isPrereleaseSite, PRODUCTION_URL } from '@/consts';
// Only render on the pre-release host. Evaluated at build time, so the markup
// is omitted entirely from production and deploy-preview builds.
const showBanner = isPrereleaseSite(Astro.site);
---
{
showBanner && (
<div
role="region"
aria-label="Pre-release documentation notice"
class:list={[
"py-2 text-p3 md:text-p2",
"border-b border-manila-75 bg-manila-50 text-faded-black",
"dark:border-soot dark:bg-warm-gray dark:text-manila-light",
]}
>
<p class="text-center">
You&rsquo;re viewing pre-release docs.{" "}
<a
href={PRODUCTION_URL.href}
class="font-bold whitespace-nowrap underline intent:decoration-gold"
>
Visit videojs.org
</a>{" "}
for the latest stable version.
</p>
</div>
)
}