Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions app/docs/(content)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default async function ContentLayout({ children }: { children: ReactNode
const sidebarStructure = await getSidebar();

return (
<div className="relative z-10 mx-auto min-h-[calc(100vh-7rem)] max-w-[90rem] px-4 py-12 pt-32 md:pt-28">
<div className="flex flex-col gap-8 lg:flex-row">
<div className="relative z-10 mx-auto min-h-[calc(100vh-7rem)] max-w-[90rem] px-4 py-8 pt-28 sm:px-6 md:py-12 md:pt-28">
<div className="flex flex-col gap-6 lg:flex-row lg:gap-8">
<SidebarWrapper sidebarStructure={sidebarStructure} />
<main className="flex min-w-0 flex-1 flex-col items-stretch">
<div className="w-full" style={{ minHeight: "60vh" }}>
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function RootLayout({
<Navbar />
</header>

<main id="main-content" tabIndex={-1}>
<main className="pt-20" id="main-content" tabIndex={-1}>
{children}
</main>

Expand Down
4 changes: 2 additions & 2 deletions components/docs/sidebar/sidebar-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const SidebarWrapper: FC<SidebarWrapperProps> = ({ sidebarStructure }) => {
<>
<SearchModal isOpen={isSearchOpen} onClose={() => setIsSearchOpen(false)} />
<aside className="hidden w-72 shrink-0 lg:block">
<div className="sticky top-32 flex h-[calc(100vh-8rem)] flex-col gap-4">
<div className="sticky top-32 flex h-[calc(100vh-8rem)] flex-col gap-3">
<SearchTrigger onClick={() => setIsSearchOpen(true)} />
<div
className="scrollbar-hide relative flex min-h-0 flex-1 flex-col overflow-auto overscroll-contain rounded-xl border border-gray-200 bg-white/90 shadow-lg backdrop-blur-md transition-shadow hover:shadow-xl dark:border-gray-800 dark:bg-gray-900/60"
Expand All @@ -72,7 +72,7 @@ const SidebarWrapper: FC<SidebarWrapperProps> = ({ sidebarStructure }) => {
</div>
</aside>

<div className="flex flex-col gap-4 lg:hidden">
<div className="flex flex-col gap-3 lg:hidden">
<SearchTrigger onClick={() => setIsSearchOpen(true)} />
<DocSidebar sidebarStructure={sidebarStructure} />
</div>
Expand Down
88 changes: 61 additions & 27 deletions components/hero/announcement-banner.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,70 @@
"use client";

import { ArrowRight, Sparkles } from "lucide-react";
import { AnimatePresence, motion } from "framer-motion";
import { ArrowRight, Sparkles, X } from "lucide-react";
import Link from "next/link";
import { useCallback, useEffect, useState } from "react";

const BANNER_DISMISS_KEY = "announcement-banner-dismissed-v1";

export default function AnnouncementBanner() {
const [isVisible, setIsVisible] = useState(false);

useEffect(() => {
const dismissed = sessionStorage.getItem(BANNER_DISMISS_KEY);
if (!dismissed) {
setIsVisible(true);
}
}, []);

const dismiss = useCallback(() => {
setIsVisible(false);
sessionStorage.setItem(BANNER_DISMISS_KEY, "1");
}, []);

return (
<div className="relative isolate z-50 flex flex-col gap-2 overflow-hidden border-blue-100 border-b bg-gradient-to-r from-blue-50/80 via-white/80 to-blue-100/80 px-4 py-2.5 text-sm backdrop-blur-md md:flex-row md:items-center md:justify-center dark:border-blue-900/30 dark:from-blue-950/30 dark:via-gray-900/30 dark:to-blue-950/30">
{/* Decorative gradients */}
<div className="absolute inset-0 -z-10 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-blue-400/20 via-transparent to-transparent dark:from-blue-500/10" />

{/* Content wrapper */}
<div className="flex flex-wrap items-center justify-center gap-x-3 gap-y-1.5 text-center">
<span className="inline-flex items-center gap-1.5 rounded-full bg-blue-100/80 px-2.5 py-0.5 font-semibold text-blue-700 text-xs ring-1 ring-blue-200 ring-inset dark:bg-blue-500/10 dark:text-blue-300 dark:ring-blue-500/20">
<Sparkles className="h-3 w-3" />
<span>New</span>
</span>

<p className="text-gray-600 dark:text-gray-300">
We just launched the new{" "}
<span className="font-semibold text-gray-900 dark:text-white">
Notification Generator
</span>
</p>

<Link
className="group inline-flex items-center gap-1 font-medium text-blue-600 transition-colors hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300"
href="/notification-generator"
<AnimatePresence>
{!!isVisible && (
<motion.div
animate={{ height: "auto", opacity: 1 }}
className="relative isolate overflow-hidden border-blue-200/60 border-b bg-gradient-to-r from-blue-600 via-indigo-600 to-blue-700 dark:border-blue-800/40 dark:from-blue-900/90 dark:via-indigo-900/90 dark:to-blue-900/90"
exit={{ height: 0, opacity: 0 }}
initial={{ height: "auto", opacity: 1 }}
transition={{ duration: 0.2, ease: "easeInOut" }}
>
Check it out
<ArrowRight className="h-3.5 w-3.5 transform-gpu transition-transform will-change-transform group-hover:translate-x-0.5" />
</Link>
</div>
</div>
<div className="absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMjAiIGN5PSIyMCIgcj0iMSIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjA1KSIvPjwvc3ZnPg==')] opacity-50" />

<div className="relative mx-auto flex max-w-[90rem] items-center justify-center px-4 py-2">
<div className="flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-center">
<span className="inline-flex items-center gap-1 rounded-full bg-white/15 px-2 py-0.5 font-semibold text-white/95 text-xs backdrop-blur-sm">
<Sparkles className="h-3 w-3" />
New
</span>

<p className="text-sm text-white/90">
Explore the latest <span className="font-semibold text-white">stable</span> and <span className="font-semibold text-white">dev</span> builds using the <span className="font-semibold text-white">Build Explorer</span>.
</p>

<Link
className="group inline-flex items-center gap-1 font-medium text-sm text-white/95 underline decoration-white/30 underline-offset-2 transition-colors hover:decoration-white/60"
href="/builds"
>
Check it out
<ArrowRight className="h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5" />
</Link>
</div>

<button
aria-label="Dismiss announcement"
className="absolute top-1/2 right-3 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-full text-white/60 transition-colors hover:bg-white/10 hover:text-white"
onClick={dismiss}
type="button"
>
<X className="h-3.5 w-3.5" />
</button>
</div>
</motion.div>
)}
</AnimatePresence>
);
}
Loading