diff --git a/site/src/components/Icon.astro b/site/src/components/Icon.astro index 73e8e9d..83e0137 100644 --- a/site/src/components/Icon.astro +++ b/site/src/components/Icon.astro @@ -1,5 +1,5 @@ --- -import { Activity, AlertCircle, AlertTriangle, Calendar, ChevronLeft, ChevronRight, Clock, Download, Eye, FileText, Gauge, Gavel, Grid3x3, Layers, Link, List, PanelLeft, Timer, XCircle } from 'lucide-react'; +import { Activity, AlertCircle, AlertTriangle, Calendar, ChevronLeft, ChevronRight, Clock, Download, Eye, FileText, Gauge, Gavel, Grid3x3, Layers, LayoutDashboard, Link, List, PanelLeft, Timer, XCircle } from 'lucide-react'; interface Props { name: string; @@ -27,6 +27,7 @@ const icons: Record = { Gavel, Grid3x3, Layers, + LayoutDashboard, Link, List, PanelLeft, diff --git a/site/src/components/OverviewContent.astro b/site/src/components/OverviewContent.astro new file mode 100644 index 0000000..28df922 --- /dev/null +++ b/site/src/components/OverviewContent.astro @@ -0,0 +1,436 @@ +--- +// src/components/OverviewContent.astro +// Shared by /latest/overview and /[year]/[month]/[day]/overview +import type { NotebookConfig } from '@/lib/data'; +import { getLatestDate } from '@/lib/data'; + +interface Props { + date: string; // YYYY-MM-DD + notebooks: NotebookConfig[]; +} + +const { date, notebooks } = Astro.props; +const latestDate = getLatestDate(); +const isLatest = date === latestDate; + +function notebookUrl(id: string): string { + if (isLatest) return `/latest/${id}`; + const [y, m, d] = date.split('-'); + return `/${y}/${m}/${d}/${id}`; +} + +const groups = [ + { + icon: '📦', + label: 'Blob / Data Availability', + ids: ['blob-inclusion', 'blob-flow', 'block-column-timing'], + }, + { + icon: '📡', + label: 'Propagation', + ids: ['block-propagation-size', 'column-propagation', 'propagation-anomalies'], + }, + { + icon: '⚡', + label: 'MEV & Mempool', + ids: ['mev-pipeline', 'mempool-visibility'], + }, + { + icon: '🏥', + label: 'Network Health', + ids: ['missed-slots'], + }, +]; + +const displayDate = new Date(date + 'T12:00:00Z').toLocaleDateString('en-US', { + weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC', +}); +--- + +
+ + +
+
+

Network Overview

+

{displayDate} · Mainnet

+
+ {isLatest && ( + + + Latest + + )} +
+ + +
+ +
+
Avg Blobs / Slot
+
——
+
loading…
+ blob-inclusion → +
+ +
+
Missed Slots
+
——
+
loading…
+ missed-slots → +
+ +
+
Mempool Coverage
+
——
+
loading…
+ mempool-visibility → +
+ +
+
Total Slots
+
——
+
loading…
+ blob-inclusion → +
+ +
+ + + +
+ {groups.map(group => { + const members = group.ids + .map(id => notebooks.find((nb: NotebookConfig) => nb.id === id)) + .filter((nb): nb is NotebookConfig => nb !== undefined); + if (!members.length) return null; + return ( +
+
+ {group.icon} + {group.label} +
+ +
+ ); + })} +
+ +
+ + + + + diff --git a/site/src/components/Sidebar.astro b/site/src/components/Sidebar.astro index bc7ec2c..3f33ed3 100644 --- a/site/src/components/Sidebar.astro +++ b/site/src/components/Sidebar.astro @@ -28,6 +28,24 @@ const base = import.meta.env.BASE_URL;