mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): add pre-release docs banner on main.videojs.org (#1575)
This commit is contained in:
@@ -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’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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user