From bc95a052ae80597a140e66a3a29c562053ed86c6 Mon Sep 17 00:00:00 2001 From: Vitor Vasconcellos Date: Thu, 30 Apr 2026 13:14:42 -0300 Subject: [PATCH 01/37] temp: add new layout mockup (AI-generated) Signed-off-by: Vitor Vasconcellos --- ecosystem-explorer-v1-design-brief.md | 173 ++++ ecosystem-explorer-v1-mockups.html | 1191 +++++++++++++++++++++++++ ecosystem-explorer/DESIGN.md | 655 ++++++-------- 3 files changed, 1657 insertions(+), 362 deletions(-) create mode 100644 ecosystem-explorer-v1-design-brief.md create mode 100644 ecosystem-explorer-v1-mockups.html diff --git a/ecosystem-explorer-v1-design-brief.md b/ecosystem-explorer-v1-design-brief.md new file mode 100644 index 00000000..c8715364 --- /dev/null +++ b/ecosystem-explorer-v1-design-brief.md @@ -0,0 +1,173 @@ +# v1 design proposal — Ecosystem Explorer + +> Brainstorm for [#84 — \[Explorer\] UI/UX Design](https://github.com/open-telemetry/opentelemetry-ecosystem-explorer/issues/84). Builds on `DESIGN.md` and **aligns the explorer to the existing visual language of [opentelemetry.io](https://opentelemetry.io)**. Mockup HTML is included alongside this doc as `ecosystem-explorer-v1-mockups.html` — it's a static prototype with a tab switcher across all four page types and a working light/dark theme toggle. + +--- + +## TL;DR + +The placeholder design felt like a separate microsite rather than part of the OTel project. **The fix is alignment, not redesign.** This proposal standardizes the explorer on the same visual grammar as opentelemetry.io: same dark navbar, same light/dark theme toggle, same OTel purple `#4f62ad` and orange `#f5a800`, same Bootstrap-flavored chrome (Docsy `td-*` patterns), same footer, same CNCF callout, same canonical stats numbers ("12+ Languages · 200+ Collector Components · 1005+ Integrations · 102+ Vendors"). + +On top of that shared scaffold, the explorer adds the things opentelemetry.io can't: real faceted filtering with URL state, a three-pane component detail page with version timeline + diff, density toggles (Cards / Compact / Table), and pipeline-anatomy diagrams. + +A user clicking from `opentelemetry.io/ecosystem/` to the Explorer should not feel they have left the site. + +--- + +## Why alignment first + +The previous iteration of this brief proposed a strong direction ("The Catalog") with thoughtful IA. What it didn't do was **lock the visual language to what opentelemetry.io already publishes**. Once you put the two side by side, the gap is obvious: + +| Element | opentelemetry.io | v0 placeholder | v1 (this proposal) | +|---|---|---|---| +| Theme support | Light + Dark + Auto (toggle in navbar, persisted to `td-color-theme` in `localStorage`) | Dark-only | **Light + Dark + Auto** (same key, same toggle) | +| Brand purple | `#4f62ad` (theme-color, mask-icon, primary stats band) | Not used | **`#4f62ad` adopted as `--color-secondary`** | +| Brand orange | `#f5a800` (logo gradient, kapa accent) | `38 95% 52%` HSL ≈ `#f5a800` | Already aligned ✓ | +| Topnav | Always-dark `td-navbar`: Docs · Ecosystem · Status · Community · Training · Blog · search · lang · theme | Custom 2-link bar | **Mirror full structure**, add Explorer entry | +| Stats numbers | "12+ · 200+ · 1005+ · 102+" | Made up our own | **Match canonical numbers** | +| Signals | Traces · Metrics · Logs · **Baggage** | Had Profiles | **Switch to Baggage** | +| Footer | Two clusters of Font Awesome social icons + centered copyright | Custom | **Mirror Docsy footer** | +| Hero | `td-cover-block` with bg image + dark overlay + centered content + `btn-lg btn-primary/btn-secondary` | Generic gradient | **Use cover-block** | +| CNCF callout | On every page (`td-box--secondary`) | Missing | **Add to every page** | +| Component pattern | Bootstrap `.card` with `border-success` etc. + `text-bg-*` badges | Custom | **Adopt** + extend with type stripe | +| Theme tokens | `data-bs-theme` attribute | Tailwind v4 only | **`data-bs-theme` honored alongside Tailwind** | + +This is now reflected in the updated `DESIGN.md` ("Alignment with opentelemetry.io" section) and visible in the mockup. + +--- + +## What's working in v0 that we keep + +- The OTel orange (`#f5a800`) was already aligned — kept as `--color-primary` +- The card hover state (subtle scale + shadow) feels right and translates cleanly into Bootstrap card patterns +- The gradient text treatment for hero headlines is a nice signature element worth keeping (now using `purple → orange` to match the OTel logo) +- The grid-pattern background overlay for hero sections is a low-cost depth cue worth keeping + +## What changes from v0 + +- **Visual chrome** entirely re-platformed onto Bootstrap 5 + Docsy `td-*` patterns to match opentelemetry.io +- **Light theme** added as the default (with dark + auto as toggle options) +- **Brand purple** introduced as `--color-secondary` and used for stats band, brand accents, breadcrumb active state +- **Stats** sourced from opentelemetry.io's canonical numbers +- **Signals** corrected to use `Baggage` instead of `Profiles` +- **CNCF incubating project** callout added to every page +- **Footer** restructured to two-cluster Font Awesome layout matching opentelemetry.io +- **Status pill mapping** locked to Bootstrap `text-bg-*` (success/info/warning/danger) for portability + +--- + +## Direction: "The Catalog" — unchanged in spirit, re-skinned + +The recommended direction remains "The Catalog" (treat the explorer like the npm/crates.io of OpenTelemetry — searchable, comparable, version-aware). The improvements borrowed from "Atlas" (pipeline diagrams) and "Dashboard" (version timeline + diff) are still in play. What's new is that all of it now lives inside the visual frame of opentelemetry.io. + +--- + +## Page-by-page spec + +### 1. Explorer home page + +**Goal:** answer "what is this site, and what's in it?" in five seconds. Look unmistakably like a sub-page of opentelemetry.io. + +**Layout (top to bottom):** +1. **Always-dark Docsy navbar** — Docs · Ecosystem (active) · Status · Community · Training · Blog · search · lang · theme toggle. +2. **Sub-nav** for the explorer (breadcrumb-only on the home page). +3. **Cover-block hero** — radial gradient + grid pattern background, OTel logo mark, "OpenTelemetry Ecosystem Explorer" gradient headline, lead copy, two CTAs (`btn-lg` primary orange + outline-light), and a glass-effect ⌘K-able global search input with chips. +4. **Stats band** (`box-primary`, OTel purple) — "12+ Languages · 200+ Collector Components · 1005+ Integrations · 102+ Vendors". Numbers link out to relevant pages, matching opentelemetry.io's pattern exactly. +5. **Ecosystems grid** — Collector and Java Agent as primary cards (with stability pill, count, latest version, "updated this week"), plus dashed "coming soon" cards for Python, Go, JS, .NET. +6. **Browse by signal** — four signal cards (Traces / Metrics / Logs / Baggage) matching opentelemetry.io's homepage. +7. **Recent activity** rail — last-30-days feed with status pills and ecosystem labels. +8. **CNCF callout** + Docsy footer. + +**Why this beats the placeholder:** the visitor sees scale (canonical numbers) and recency above the fold, plus a global search. The page chrome is indistinguishable from opentelemetry.io. + +### 2. Individual ecosystem landing + +**Goal:** orient a user to *this* project, then send them to the list with sensible defaults. + +**Layout:** +1. **Sub-nav with breadcrumbs**: `Explorer › Ecosystems › Collector`. +2. **Cover-block hero** — eyebrow, gradient title, description, three CTAs (Browse, Read overview, GitHub), and a "Latest release" card on the right with `+4 added · 12 changed · 2 deprecated` deltas. +3. **Pipeline anatomy** — five clickable stage cards (Receivers 98 → Processors 42 → Exporters 76 → Connectors 14 + Extensions 35), each as a one-click filter into the list. Color stripes on the indicator dots match the type-stripe taxonomy. +4. **Quick entry** — three cards (Most-used components · Core vs. Contrib · Diff across versions). +5. **CNCF + footer.** + +### 3. List pages + +**Goal:** make 200+ components actually browseable. + +**Layout:** +- **Sub-nav with breadcrumbs.** +- **Page header**: gradient title, result count, view toggle (Cards / Compact / Table — Compact is default), sort dropdown. +- **Active filter chips** as Bootstrap `badge text-bg-secondary rounded-pill` with × dismiss. +- **Left-rail facets** (Bootstrap form): Search · Type (with color-stripe indicators) · Signal · Stability · Distribution (core/contrib) · Version. Each facet shows count alongside the label. +- **Compact result list** in a `.card` with grid rows: `[type-stripe | name + slug + description | type | signals | stability pill]`, alternating row backgrounds, sticky header, Bootstrap pagination footer. +- **URL-persisted filter state** (`?type=receiver&signal=traces&distribution=contrib`). + +**Status-pill mapping (locked):** `stable=text-bg-success`, `beta=text-bg-info`, `alpha=text-bg-warning`, `unmaintained|deprecated=text-bg-danger`. + +**Type stripe (4px left edge):** receiver=info-blue, processor=purple, exporter=orange, connector=pink, extension=teal. + +### 4. Component detail page + +**Goal:** be the canonical page for a component — overview, configuration, and what changed across versions. + +**Layout (three-pane):** +- **Sub-nav with full breadcrumbs**: `Explorer › Collector › Receivers › Kafka Receiver`. +- **Left rail (sticky):** sibling navigator (98 receivers, with current highlighted in OTel orange) + on-page anchor links. +- **Center column:** + - Header card with type stripe + eyebrow + title + slug + stability pill + version + signal badges + GitHub/Docs links. + - **"Where this fits"** mini-pipeline diagram showing the component placed inside a typical pipeline. + - Tabbed content area (Bootstrap `nav-tabs`): **Configuration** (Bootstrap striped table with Key/Type/Default/Description), **README**, **Emitted attributes**, **Examples**. +- **Right rail (sticky):** + - **Version history timeline** — vertical timeline with current version highlighted in green, per-version changes summarized, with a `Compare` selector and a "Diff →" link. + - **Compatibility card** — Min collector, Min Go, Distribution, License. + +**Empty/error states:** spec four — *not yet released for this version*, *deprecated/removed*, *missing data*, *no docs yet*. Each gets a designed empty state, not a stack trace. + +--- + +## Cross-cutting principles + +1. **Continuity with opentelemetry.io is the spine.** Every component should look at home if dropped into the parent site. +2. **Light + dark parity.** No dark-only components. No light-only components. The theme toggle (persisted to `td-color-theme` in `localStorage`) flips both. +3. **Density toggles, not redesigns.** Every list view remembers the user's last density choice. +4. **URL is the state.** Every filter, sort, and tab is reflected in the URL so links are shareable. +5. **Status legibility before everything else.** Stability and distribution should be perceivable in <300ms scanning. +6. **One small diagram beats one paragraph.** Pipeline diagrams on the ecosystem landing and detail pages do more than 200 words of intro copy. +7. **Empty states are first-class.** "Component missing in this version" is information, not an error. +8. **CNCF on every page.** Non-negotiable — opentelemetry.io shows it everywhere and we need to match. + +--- + +## Suggested sub-issues to break out of #84 + +If this lands well, the work splits naturally: + +- [ ] Theme system — port to `data-bs-theme` with light/dark/auto, persist to `td-color-theme`, write contrast tests for both themes +- [ ] Navbar component — match opentelemetry.io structurally and visually; add explorer-specific sub-nav +- [ ] Footer component — Docsy two-cluster pattern with Font Awesome icons +- [ ] CNCF callout — reusable component on every route +- [ ] Stats band — fed from a single source of truth synced with the canonical numbers on opentelemetry.io +- [ ] Home page — hero (cover-block) + global search + recent activity +- [ ] Ecosystem landing — pipeline anatomy diagram (reusable component) +- [ ] List page — facet rail + density toggle + URL state + chip system +- [ ] Detail page layout — three-pane shell + sibling navigator +- [ ] Detail page — embedded README/config-table renderer (Bootstrap striped tables) +- [ ] Detail page — version timeline + diff view +- [ ] Status-pill / type-stripe mapping spec → already added to `DESIGN.md` +- [ ] Empty/error state library (4 patterns) + +Each is small enough for one contributor to own. + +--- + +## Mockup + +A static, clickable HTML prototype with all four pages (Home / Ecosystem / List / Detail) and a top-bar switcher is included as `ecosystem-explorer-v1-mockups.html`. It uses Bootstrap 5 + Font Awesome (matching opentelemetry.io's stack) and supports the same theme toggle pattern. Open in a browser, click between the four tabs, and toggle the theme to see both modes. + +## Open questions + +- Should the explorer's home-page **search bar** actually search across ecosystems, or just be a launcher into per-ecosystem search? +- For the **detail page version diff**, do we have the underlying data (per-version config schemas, deprecation markers) in `ecosystem-registry`/`ecosystem-automation` already, or is that a data-pipeline prerequisite? +- Status terminology in the data is currently mixed (`alpha`/`beta`/`development`/`unmaintained`). Worth aligning to one taxonomy before locking pill colors. +- Will the explorer eventually live at `opentelemetry.io/ecosystem/explorer/` or as a separate domain? That decision affects how literally we mirror the navbar (sibling vs. linked-out). diff --git a/ecosystem-explorer-v1-mockups.html b/ecosystem-explorer-v1-mockups.html new file mode 100644 index 00000000..6474f012 --- /dev/null +++ b/ecosystem-explorer-v1-mockups.html @@ -0,0 +1,1191 @@ + + + + + + OTel Ecosystem Explorer — v1 Mockups (aligned with opentelemetry.io) + + + + + + +
+ v1 Mockups + aligned with opentelemetry.io · for issue #84 +
+ + + + +
+
+ + + + + +
+ +
+
+
+

+ OpenTelemetry Ecosystem Explorer +

+

+ Navigate every receiver, processor, exporter, and instrumentation across the OpenTelemetry project — searchable, comparable, version-aware. +

+ + + +
+
+ + +
+
+

The OpenTelemetry Ecosystem

+
+
+ +
Languages
+
+
+ +
Collector Components
+
+
+ +
Integrations
+
+
+ +
Vendors
+
+
+
+
+ + +
+ +
+ + +
+ +
+
+ + +
+ + + + +
+
+
+
+ Infrastructure · Vendor-agnostic agent +

+ OpenTelemetry Collector +

+

+ Receive, process, and export telemetry data without locking into a single vendor. Compose pipelines from receivers, processors, exporters, connectors, and extensions. +

+ +
+
+
+
+ Latest release +
+ v0.150.0 + 2 days ago +
+
+
+4
added
+
12
changed
+
2
deprecated
+
+
+
+
+
+
+
+ + +
+ +
+ + +
+ +
+
+ + +
+ + +
+
+
+

Collector Components

+

Showing 42 of 200+ components

+
+
+ View: +
+ + + +
+ Sort: + +
+
+ + +
+ Active filters: + Type: receiver + Signal: traces + Distribution: contrib + +
+ + +
+
+ + +
+ + +
+
+ + + + +
+ +
+
+ +
+
+ Receiver · contrib +
+ beta + v0.150.0 +
+
+

Kafka Receiver

+ kafkareceiver +

Reads telemetry data from Kafka topics. Supports OTLP, Jaeger, and Zipkin payloads. Configurable consumer groups, encoding, and TLS.

+
+ traces + metrics + logs + · + GitHub + Docs +
+
+
+
+ + +
+
+

Where this fits — in a typical pipeline

+
+ Kafka Receiver + + batch + + resource + + otlp exporter +
+
+
+ + +
+ +
+

All configuration keys for kafkareceiver in v0.150.0.

+
+ + + + + + + + + + + +
KeyTypeDefaultDescription
brokers[]string["localhost:9092"]Kafka broker addresses.
topicstring"otlp_spans"Topic to subscribe to.
encodingenum"otlp_proto"Encoding of incoming records.
group_idstring"otel-collector"Consumer group identifier.
client_idstring"otel-collector"Sets the client ID for kafka.
+
+
+
+
+ + + +
+
+
+ + +
+
+

+ OpenTelemetry is a CNCF incubating project.
+ Formed through a merger of the OpenTracing and OpenCensus projects. +

+
+ [CNCF logo placeholder] +
+
+
+ + +
+
+
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+ © 2019–present OpenTelemetry Authors
+ Docs CC BY 4.0 · All Rights Reserved +
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+
+
+ + + + diff --git a/ecosystem-explorer/DESIGN.md b/ecosystem-explorer/DESIGN.md index cee1da78..02428e7a 100644 --- a/ecosystem-explorer/DESIGN.md +++ b/ecosystem-explorer/DESIGN.md @@ -1,298 +1,341 @@ # Design System -This document outlines the design principles, patterns, and tokens used in the OpenTelemetry Ecosystem Explorer. It -serves as a guide for AI agents and developers working on UI elements to ensure visual consistency and quality. +This document outlines the design principles, patterns, and tokens used in the OpenTelemetry Ecosystem Explorer. It serves as a guide for AI agents and developers working on UI elements to ensure visual consistency and quality. + +> **v1 update (2026-04):** the explorer is being aligned with [opentelemetry.io](https://opentelemetry.io). The site should feel like a sub-product of the OTel project, not a separate microsite. This guide reflects that alignment — see "Alignment with opentelemetry.io" at the bottom for the source-of-truth references. ## Overview -The Ecosystem Explorer uses a **dark-first design system** optimized for readability and visual hierarchy. The design -emphasizes: +The Ecosystem Explorer mirrors the visual language of opentelemetry.io: a Bootstrap-5-flavored layout with light + dark theming, an always-dark navbar, OTel brand purple/orange/yellow accents, and the Docsy-derived chrome (`td-*` patterns) translated into our Tailwind v4 stack. + +The design emphasizes: -- **Depth through subtlety** - Layered backgrounds, soft shadows, and ambient glows -- **Clarity first** - Clear information hierarchy through color, spacing, and typography -- **Consistent motion** - Unified animation timing and easing -- **Accessibility** - WCAG AA compliance with proper contrast and semantic markup +- **Continuity with opentelemetry.io** — same nav, footer, hero, type, and brand colors so visitors feel they're inside the same project +- **Light and dark parity** — every component must work in both themes; the theme toggle is part of the navbar +- **Clarity first** — clear information hierarchy through color, spacing, and typography +- **Consistent motion** — unified animation timing and easing +- **Accessibility** — WCAG AA compliance with proper contrast and semantic markup --- ## Design Principles -### 1. Depth Through Subtlety +### 1. Stay Visually Continuous With opentelemetry.io + +A user clicking from `opentelemetry.io/ecosystem/` to the Explorer should not feel they have left the site. That means: same logo lockup, same dark navbar, same primary buttons, same footer layout, same purple `#4f62ad` accent. Diverge only where the explorer needs richer interactivity (filters, three-pane detail) than the static Hugo site supports. -Create visual depth without overwhelming the interface: +### 2. Light + Dark Parity -- Use layered backgrounds (base -> pattern -> content -> overlay) -- Apply soft shadows and glows to establish elevation -- Employ subtle gradients for ambient lighting effects -- Keep depth cues understated - they should guide the eye, not dominate +Every page must render correctly in both light and dark themes. The navbar is always dark (matching opentelemetry.io). The body switches between a light surface (`#ffffff` / `#f8f9fa`) and a dark surface (`#0b0d12` / `#11141b`) based on `data-bs-theme`. Pick tokens, not hardcoded colors. -### 2. Clarity First +### 3. Clarity First Information hierarchy guides users naturally: -- Primary actions use the vibrant orange (`--color-primary`) -- Secondary information uses the blue accent (`--color-secondary`) +- Primary actions use OTel orange/yellow (`--color-primary`) +- Secondary or branding accents use OTel purple (`--color-secondary`) - Background elements recede through lower contrast - Whitespace provides visual breathing room -### 3. Consistent Motion +### 4. Consistent Motion All animations follow a unified timing system: -- Default transition: `300ms ease-in-out` -- Micro-interactions: `200ms ease-out` -- Complex animations: `400ms ease-in-out` +- Default transition: `200ms ease-in-out` (matches Bootstrap defaults) +- Micro-interactions: `150ms ease-out` +- Complex animations: `300ms ease-in-out` - Use `transform` and `opacity` for performant animations +- Honor `prefers-reduced-motion` -### 4. Dark-First Design +--- -Optimized for extended viewing in low-light environments: +## Color System -- Deep navy base (`--color-background`) -- Bright, high-contrast text (`--color-foreground`) -- Reduced blue light through warm accent colors -- Subtle glows instead of harsh borders +### Brand Tokens (aligned with opentelemetry.io) ---- +opentelemetry.io exposes these colors via meta tags and stylesheets: -## Color System +| Token | Source | Hex | +|---|---|---| +| OTel Purple (brand) | ``, `mask-icon`, `msapplication-TileColor` | `#4f62ad` | +| OTel Orange/Yellow (accent) | Logo gradient end stop, kapa `data-project-color` | `#f5a800` | +| Light surface | Default page bg | `#ffffff` | +| Dark surface | `prefers-color-scheme: dark` page bg | `#0b0d12` | +| Light text | Default | near-black | +| Dark text | dark mode | `#e6e6e6` | -### HSL Token Reference +### CSS Custom Properties -All colors are defined using HSL values in `src/themes.ts`. They are applied via CSS custom properties: +All colors are defined in `src/themes.ts` and applied as CSS custom properties. **HSL is preferred** so we can derive variants with opacity: ```css ---color-primary: 38 95% 52%; /* Vibrant orange */ ---color-secondary: 228 60% 55%; /* Brighter blue */ ---color-background: 232 38% 15%; /* Deep navy */ ---color-foreground: 210 45% 99%; /* Bright white with blue hint */ ---color-card: 232 35% 19%; /* Card background */ ---color-card-secondary: 232 32% 23%; /* Card hover state */ ---color-muted: 232 30% 17%; /* Darker background for code/badges */ ---color-muted-foreground: 220 22% 65%; /* Muted text */ ---color-border: 232 28% 26%; /* Borders */ +/* Brand */ +--color-primary: 38 95% 52%; /* OTel orange/yellow #f5a800 */ +--color-primary-foreground: 0 0% 0%; +--color-secondary: 230 38% 49%; /* OTel purple #4f62ad */ +--color-secondary-foreground: 0 0% 100%; + +/* Light theme (default) */ +--color-background: 0 0% 100%; /* #ffffff */ +--color-foreground: 220 13% 15%; /* near-black */ +--color-card: 210 17% 98%; /* #f8f9fa surface */ +--color-card-secondary: 210 14% 95%; +--color-muted: 210 14% 92%; +--color-muted-foreground: 220 9% 40%; +--color-border: 210 14% 88%; + +/* Dark theme — applied via [data-bs-theme="dark"] */ +[data-bs-theme="dark"] { + --color-background: 222 25% 6%; /* #0b0d12 */ + --color-foreground: 0 0% 90%; /* #e6e6e6 */ + --color-card: 222 23% 9%; /* #11141b */ + --color-card-secondary: 222 22% 13%; + --color-muted: 222 22% 11%; + --color-muted-foreground: 220 14% 65%; + --color-border: 222 18% 22%; +} + +/* Always-dark navbar — matches opentelemetry.io */ +.navbar-otel { + --color-background: 222 25% 6%; + --color-foreground: 0 0% 95%; +} +``` + +### Semantic Tokens + +```css +--color-success: 145 63% 42%; /* stable */ +--color-info: 200 85% 45%; /* beta / informational */ +--color-warning: 38 95% 52%; /* alpha — uses brand orange */ +--color-error: 0 70% 50%; /* deprecated / unmaintained */ ``` ### Usage Guidelines -#### Primary (Orange) +#### Primary (OTel Orange/Yellow `#f5a800`) -- Primary CTAs and important actions -- Links and interactive elements -- Accent highlights and focus states -- Sparingly used to draw attention +- Primary CTAs (matches `btn btn-primary` in opentelemetry.io) +- The "alpha" stability pill +- Highlight accents in stats and gradient text -#### Secondary (Blue) +#### Secondary (OTel Purple `#4f62ad`) -- Secondary actions and information -- Decorative accents and gradients -- Category indicators -- Complements primary without competing +- Branded surfaces (the `td-box--primary` stats band on opentelemetry.io is purple — we should match) +- Hero background tint and gradient stops +- Secondary buttons in dark mode (`btn btn-secondary`) +- Iconography for ecosystem cards #### Background Layers -- `background` - Page base -- `card` - Elevated surfaces (cards, panels) -- `card-secondary` - Hover states and nested cards -- `muted` - Darker backgrounds for inline code, type badges, and subtle UI elements -- `border` - Dividers and outlines +- `background` — page base (light or dark depending on theme) +- `card` — elevated surfaces +- `card-secondary` — hover states and nested cards +- `muted` — table-row striping, code chips, type badges +- `border` — dividers and outlines #### Text Hierarchy -- `foreground` - Primary text (headings, body) -- `muted-foreground` - Secondary text (captions, labels) -- Lower opacity variants - Tertiary text +- `foreground` — primary text (headings, body) +- `muted-foreground` — secondary text (captions, labels) +- Lower opacity variants — tertiary text --- -## Depth and Elevation +## Typography -### Shadow Scale +### Font Stack -Shadows establish elevation and focus: +Match opentelemetry.io: a sans serif for UI, mono for code. The site uses the Bootstrap/Docsy default (system stack), so we use the same: ```css ---shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.05); ---shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.1); ---shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.1); +font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; +font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; /* code */ ``` -### Glow Effects +### Size Scale -Glows create ambient lighting and highlight interactive elements: +Use the Bootstrap display scale for hero text, then a tighter Tailwind scale for body. Don't invent new sizes. -```css ---glow-primary: 0 0 40px hsl(var(--primary-hsl) / 0.15); ---glow-secondary: 0 0 40px hsl(var(--secondary-hsl) / 0.15); -``` +| Use | Size | Weight | +|---|---|---| +| Hero headline (matches `display-4` / `display-6`) | 3rem–3.75rem | 600 | +| Page title (matches `h1`) | 2.25rem | 700 | +| Section heading (`h2`) | 1.75rem | 700 | +| Subsection (`h3`) | 1.25rem | 600 | +| Body | 1rem | 400 | +| Small / muted (`small`) | 0.875rem | 400 | +| Eyebrow / pill | 0.75rem uppercase tracking-widest | 600 | -**Usage patterns:** +### Weight Conventions -- Primary glow: Hero elements, important features -- Secondary glow: Decorative accents, section transitions -- Hover states: Increase opacity to 0.25 for prominence +- `font-normal` (400): Body text +- `font-medium` (500): Emphasized text, labels +- `font-semibold` (600): Subheadings, buttons +- `font-bold` (700): Primary headings -### Layering Strategy +--- -Visual layers from back to front: +## Layout Primitives (mirroring Docsy) -1. **Background** - Solid color or subtle gradient -2. **Pattern** - Grid or texture overlay (low opacity) -3. **Content** - Cards, text, images -4. **Overlay** - Glows, shadows, focus rings +The Hugo Docsy theme on opentelemetry.io uses these structural classes. We re-implement them in Tailwind so that templates feel familiar to anyone moving between codebases. ---- +| Docsy class | Our equivalent | Purpose | +|---|---|---| +| `td-navbar` | `