| 1 | import type { Metadata } from "next"; |
| 2 | import Link from "next/link"; |
| 3 | import { Suspense } from "react"; |
| 4 | import { PageHeader } from "@/components/ui"; |
| 5 | import { CalendarBrowser } from "@/components/calendar-browser"; |
| 6 | |
| 7 | export const revalidate = 300; |
| 8 | |
| 9 | export const metadata: Metadata = { |
| 10 | title: "Calendar", |
| 11 | description: |
| 12 | "A month grid of when laws take effect, bills become law, and votes happen. Each day links to its official source.", |
| 13 | }; |
| 14 | |
| 15 | export default function CalendarPage() { |
| 16 | return ( |
| 17 | <div |
| 18 | className="mx-auto w-full max-w-[860px] px-6 sm:px-8" |
| 19 | style={{ |
| 20 | paddingTop: "clamp(32px, 6vw, 56px)", |
| 21 | paddingBottom: "clamp(48px, 8vw, 80px)", |
| 22 | }} |
| 23 | > |
| 24 | <Link |
| 25 | href="/" |
| 26 | className="focus-ring tap no-underline hover:underline" |
| 27 | style={{ |
| 28 | display: "inline-flex", |
| 29 | alignItems: "center", |
| 30 | gap: "8px", |
| 31 | fontFamily: "var(--font-mono), ui-monospace, monospace", |
| 32 | fontSize: "13px", |
| 33 | letterSpacing: "0.08em", |
| 34 | color: "var(--dk-signal)", |
| 35 | marginBottom: "32px", |
| 36 | }} |
| 37 | > |
| 38 | ← Home |
| 39 | </Link> |
| 40 | |
| 41 | <PageHeader |
| 42 | eyebrow="Calendar · when it happens" |
| 43 | title="What takes effect when" |
| 44 | lead="A month at a glance. Each day lists the laws that take effect, bills that became law, votes, and floor action. Pick a day to read its events, each sealed to its official source." |
| 45 | /> |
| 46 | |
| 47 | <Suspense fallback={<CalendarSkeleton />}> |
| 48 | <CalendarBrowser /> |
| 49 | </Suspense> |
| 50 | |
| 51 | <div className="mt-12 border-t border-line pt-6"> |
| 52 | <p className="label text-ash-2"> |
| 53 | Dates parsed from congress.gov, federalregister.gov, clerk.house.gov, |
| 54 | and senate.gov. Each event links to its source. No commentary appears here. |
| 55 | </p> |
| 56 | </div> |
| 57 | </div> |
| 58 | ); |
| 59 | } |
| 60 | |
| 61 | function CalendarSkeleton() { |
| 62 | return ( |
| 63 | <div className="mt-8 space-y-6"> |
| 64 | <div className="h-12 w-full animate-pulse rounded-sm bg-graphite" /> |
| 65 | <div className="grid gap-6 lg:grid-cols-[1.5fr_1fr]"> |
| 66 | <div className="hidden h-[28rem] animate-pulse rounded-sm bg-graphite md:block" /> |
| 67 | <div className="h-[28rem] animate-pulse rounded-sm bg-graphite" /> |
| 68 | </div> |
| 69 | </div> |
| 70 | ); |
| 71 | } |