From 28c2c2dd535e1caa4e53323c9da60bf9ceec86eb Mon Sep 17 00:00:00 2001 From: Wen Bo Xie Date: Wed, 2 Dec 2026 22:48:20 -0500 Subject: [PATCH] feat(www): add Launch Week 16 banner (#54511) Add a dismissible bar above the www nav that promotes Launch Week 16 (December 7-11) and links to /launch-week. Hide the bar on /launch-week pages. Hide it on /state-of-startups too because the fixed nav on that page would cover it. ## Banner polish Adds shared animated dot artwork, a link CTA, and responsive spacing and alignment. Reduced-motion preferences keep the dots static. Studio uses this artwork in the dependent #54512. | After | | --- | | 31035 | | 18287 | | 89244 | | 99848 | ## Review instructions 1. Open the www homepage on the preview in light and dark mode. Check the centred desktop message, link hover, and close button. 2. At a phone width, check the left-aligned copy and artwork on the right. Open the mobile menu and close it; the banner should return. 3. Dismiss the banner and reload. It should stay dismissed. Validation: scoped ESLint, formatting, and ui-patterns typecheck pass. --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> --- .../Announcement/LaunchWeek16Banner.tsx | 62 +++++++++++++++++++ apps/www/components/Nav/index.tsx | 7 +++ packages/ui-patterns/package.json | 9 +++ .../Banners/LaunchWeek16DotField.module.css | 19 ++++++ .../src/Banners/LaunchWeek16DotField.tsx | 58 +++++++++++++++++ 5 files changed, 155 insertions(+) create mode 100644 apps/www/components/Announcement/LaunchWeek16Banner.tsx create mode 100644 packages/ui-patterns/src/Banners/LaunchWeek16DotField.module.css create mode 100644 packages/ui-patterns/src/Banners/LaunchWeek16DotField.tsx diff --git a/apps/www/components/Announcement/LaunchWeek16Banner.tsx b/apps/www/components/Announcement/LaunchWeek16Banner.tsx new file mode 100644 index 00000000000..d67743d0610 --- /dev/null +++ b/apps/www/components/Announcement/LaunchWeek16Banner.tsx @@ -0,0 +1,62 @@ +'use client' + +import { safeLocalStorage } from 'common' +import { ArrowUpRight, X } from 'lucide-react' +import { useEffect, useState } from 'react' +import { Button } from 'ui' + +import { LaunchWeek16DotField } from 'ui-patterns/Banners/LaunchWeek16DotField' + +const DISMISSAL_KEY = 'announcement_lw16' + +export const LaunchWeek16Banner = () => { + const [hidden, setHidden] = useState(true) + + useEffect(() => { + setHidden(safeLocalStorage.getItem(DISMISSAL_KEY) === 'hidden') + }, []) + + const handleClose = () => { + safeLocalStorage.setItem(DISMISSAL_KEY, 'hidden') + setHidden(true) + } + + if (hidden) return null + + return ( +
+ +
+

+ Launch Week 16 + / December 7–11 +

+
+
+ ) +} diff --git a/apps/www/components/Nav/index.tsx b/apps/www/components/Nav/index.tsx index b5628e1d84d..d50fee30c88 100644 --- a/apps/www/components/Nav/index.tsx +++ b/apps/www/components/Nav/index.tsx @@ -1,5 +1,6 @@ 'use client' +import { LaunchWeek16Banner } from 'components/Announcement/LaunchWeek16Banner' import ScrollProgress from 'components/ScrollProgress' import { getMenu } from 'data/nav' import { DevToolbarTrigger } from 'dev-tools' @@ -62,6 +63,7 @@ const Nav = ({ hideNavbar, stickyNavbar = true }: Props) => { const isGAWeekSection = pathname?.startsWith('/ga-week') const isStateOfStartupsPage = pathname?.startsWith('/state-of-startups') + const hideLaunchWeekBanner = isStateOfStartupsPage || pathname?.startsWith('/launch-week') const disableStickyNav = isGAWeekSection || !stickyNavbar const showLaunchWeekNavMode = isGAWeekSection && !open @@ -84,6 +86,11 @@ const Nav = ({ hideNavbar, stickyNavbar = true }: Props) => { return ( <> + {!hideLaunchWeekBanner && ( +
+ +
+ )}
{ + const column = index % 96 + const row = Math.floor(index / 96) + const seed = Math.sin(column * 127.1 + row * 311.7) * 43758.5453 + const variation = seed - Math.floor(seed) + const phaseSeed = Math.sin(column * 269.5 + row * 183.3) * 43758.5453 + const phase = phaseSeed - Math.floor(phaseSeed) + const field = + (Math.sin(column * 0.18 + Math.sin(row * 0.22) * 0.8) + + Math.cos(column * 0.39 - row * 0.12) * 0.45 + + 1.45) / + 2.9 + + return { + cx: column * 9 + 4.5, + cy: row * 9 + 4.5, + r: 0.35 + field ** 1.5 * 2, + opacity: variation < field * 0.85 + 0.15 ? 0.45 + field * 0.55 : 0, + duration: 1 + phase, + delay: -variation * 2, + } +}) + +export const LaunchWeek16DotField = ({ className }: { className?: string }) => { + const patternId = useId() + + return ( + + ) +}