| 1 | import type { Metadata } from "next"; |
| 2 | import Link from "next/link"; |
| 3 | import { Card, PageHeader, SectionHeader } from "@/components/ui"; |
| 4 | import { SourceLink } from "@/components/source-link"; |
| 5 | import { ExecutiveBrowser } from "@/components/executive-browser"; |
| 6 | import { getExecutive } from "@/lib/feed"; |
| 7 | import { CiteThis } from "@/components/cite-this"; |
| 8 | |
| 9 | export const metadata: Metadata = { |
| 10 | title: "Federal Register", |
| 11 | description: |
| 12 | "Executive Orders, proposed and final rules, and notices from the Federal Register. Filterable by type.", |
| 13 | }; |
| 14 | |
| 15 | export const revalidate = 300; |
| 16 | |
| 17 | const TYPE_LABEL: Record<string, string> = { |
| 18 | eo: "Executive Order", |
| 19 | nprm: "Proposed Rule", |
| 20 | final_rule: "Final Rule", |
| 21 | notice: "Notice", |
| 22 | }; |
| 23 | |
| 24 | export default function ExecutivePage() { |
| 25 | const all = getExecutive(); |
| 26 | |
| 27 | const byType = all.reduce<Record<string, number>>((m, e) => { |
| 28 | const k = (e.type || "").toLowerCase(); |
| 29 | m[k] = (m[k] ?? 0) + 1; |
| 30 | return m; |
| 31 | }, {}); |
| 32 | |
| 33 | return ( |
| 34 | <div |
| 35 | className="mx-auto w-full max-w-[860px] px-6 sm:px-8" |
| 36 | style={{ |
| 37 | paddingTop: "clamp(32px, 6vw, 56px)", |
| 38 | paddingBottom: "clamp(48px, 8vw, 80px)", |
| 39 | }} |
| 40 | > |
| 41 | {} |
| 42 | <nav aria-label="Breadcrumb" className="mb-10"> |
| 43 | <ol className="flex flex-wrap items-center gap-2" style={{ marginBottom: "12px" }}> |
| 44 | <li> |
| 45 | <Link |
| 46 | href="/" |
| 47 | className="focus-ring label no-underline hover:underline" |
| 48 | style={{ color: "var(--dk-signal)", fontSize: "12px", letterSpacing: "0.12em" }} |
| 49 | > |
| 50 | Home |
| 51 | </Link> |
| 52 | </li> |
| 53 | <li aria-hidden="true" className="label" style={{ color: "var(--dk-ash-2)", fontSize: "12px" }}>/</li> |
| 54 | <li |
| 55 | className="label" |
| 56 | style={{ color: "var(--dk-ash)", fontSize: "12px", letterSpacing: "0.12em" }} |
| 57 | aria-current="page" |
| 58 | > |
| 59 | Federal Register |
| 60 | </li> |
| 61 | </ol> |
| 62 | <Link |
| 63 | href="/" |
| 64 | className="focus-ring tap no-underline hover:underline" |
| 65 | style={{ |
| 66 | display: "inline-flex", |
| 67 | alignItems: "center", |
| 68 | gap: "8px", |
| 69 | fontFamily: "var(--font-mono), ui-monospace, monospace", |
| 70 | fontSize: "13px", |
| 71 | letterSpacing: "0.08em", |
| 72 | color: "var(--dk-signal)", |
| 73 | }} |
| 74 | > |
| 75 | ← Back to home |
| 76 | </Link> |
| 77 | </nav> |
| 78 | |
| 79 | <PageHeader |
| 80 | eyebrow="Federal Register" |
| 81 | title="Executive actions" |
| 82 | lead="Executive Orders, proposed and final rules, and notices published in the Federal Register. Each entry links to the official document on federalregister.gov." |
| 83 | /> |
| 84 | |
| 85 | <div className="mt-8 grid gap-4 sm:grid-cols-2 lg:grid-cols-4"> |
| 86 | <TypeCard label="Executive Orders" count={byType.eo ?? 0} /> |
| 87 | <TypeCard label="Proposed Rules" count={byType.nprm ?? 0} /> |
| 88 | <TypeCard label="Final Rules" count={byType.final_rule ?? 0} /> |
| 89 | <TypeCard label="Notices" count={byType.notice ?? 0} /> |
| 90 | </div> |
| 91 | |
| 92 | <div className="mt-10"> |
| 93 | <SectionHeader |
| 94 | eyebrow={`${all.length} actions`} |
| 95 | title="On the record" |
| 96 | description="Newest first. Filter by type. Every row links to the Federal Register document." |
| 97 | /> |
| 98 | <ExecutiveBrowser seed={all} typeLabels={TYPE_LABEL} /> |
| 99 | </div> |
| 100 | |
| 101 | <p className="label mt-8 text-ash-2"> |
| 102 | Source: federalregister.gov API. Types and document numbers are recorded as published; no characterization. |
| 103 | </p> |
| 104 | |
| 105 | {} |
| 106 | <div |
| 107 | style={{ |
| 108 | marginTop: "clamp(40px, 7vw, 72px)", |
| 109 | borderTop: "1px solid var(--dk-line)", |
| 110 | paddingTop: "clamp(24px, 4vw, 40px)", |
| 111 | }} |
| 112 | > |
| 113 | <p className="label mb-4" style={{ color: "var(--dk-ash)" }}>Cite this page</p> |
| 114 | <CiteThis |
| 115 | kind="page" |
| 116 | title="Federal Register - Executive actions" |
| 117 | permalink="https://usdocket.org/executive" |
| 118 | sourceUrl="https://www.federalregister.gov/" |
| 119 | /> |
| 120 | </div> |
| 121 | </div> |
| 122 | ); |
| 123 | } |
| 124 | |
| 125 | function TypeCard({ label, count }: { label: string; count: number }) { |
| 126 | return ( |
| 127 | <Card className="p-5"> |
| 128 | <p className="label mb-2">{label}</p> |
| 129 | <div className="flex items-baseline gap-2"> |
| 130 | <span className="display text-3xl text-paper">{count}</span> |
| 131 | <span className="label text-ash-2">on record</span> |
| 132 | </div> |
| 133 | </Card> |
| 134 | ); |
| 135 | } |