From c8a10b3837f734e1af6077ed2cc6018e38cbdc3f Mon Sep 17 00:00:00 2001 From: Max Elkins Date: Wed, 25 Mar 2026 00:25:11 +0000 Subject: [PATCH 1/2] Split pages and refactor navigation styles --- site/demo.css | 299 ++++++++++++++++++++++++++++++ site/demo.html | 152 +++++++++++++++ site/global.css | 217 ++++++++++++++++++++++ site/index.html | 128 +++++-------- site/style.css | 478 ++---------------------------------------------- 5 files changed, 728 insertions(+), 546 deletions(-) create mode 100644 site/demo.css create mode 100644 site/demo.html create mode 100644 site/global.css diff --git a/site/demo.css b/site/demo.css new file mode 100644 index 0000000..c431203 --- /dev/null +++ b/site/demo.css @@ -0,0 +1,299 @@ +/* ── Demo view ──────────────────────────────────────────────────────── */ + +.demo-view { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; +} + +.demo-layout { + display: flex; + flex: 1; + min-height: 0; +} + +/* Sidebar */ +.sidebar { + width: 18.75rem; + flex-shrink: 0; + background: var(--mantle); + border-right: 0.0625rem solid var(--surface0); + padding: 0.75rem 0; + overflow-y: auto; +} + +.sidebar-heading { + padding: 0.375rem 1rem 0.625rem; + font-weight: 600; + color: var(--overlay0); +} + +.sidebar-item { + display: flex; + align-items: center; + gap: 0.625rem; + padding: 0.625rem 1rem; + cursor: pointer; + transition: background 0.12s; + border-left: 0.1875rem solid transparent; +} + +.sidebar-item:hover { + background: var(--surface0); +} + +.sidebar-item.active { + background: var(--surface0); + border-left-color: var(--cyan); +} + +.sidebar-badge { + width: 1.875rem; + height: 1.375rem; + border-radius: 0.25rem; + display: flex; + align-items: center; + justify-content: center; + font-weight: 700; + flex-shrink: 0; + color: var(--mantle); +} + +.sidebar-badge.lang-JS { + background: var(--yellow); +} +.sidebar-badge.lang-PY { + background: var(--blue); +} +.sidebar-badge.lang-RB { + background: var(--red); +} +.sidebar-badge.lang-TS { + background: var(--cyan); +} +.sidebar-badge.lang-GO { + background: var(--green); +} + +.sidebar-info { + min-width: 0; +} + +.sidebar-name { + font-weight: 600; + white-space: nowrap; + overflow: hidden; + padding-bottom: 0.25rem; + text-overflow: ellipsis; +} + +.sidebar-desc { + font-size: 0.75rem; + color: var(--overlay0); +} + +/* Terminal */ +.terminal-wrap { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + padding: 0; +} + +.terminal { + position: relative; + flex: 1; + padding: 1rem 1.25rem; + overflow-y: auto; + outline: none; + line-height: 1.6; + cursor: text; +} + +.terminal-hidden-input { + position: absolute; + left: -9999px; + top: 0; + width: 1px; + height: 1px; + opacity: 0; + border: none; + outline: none; + padding: 0; + margin: 0; + font-size: 16px; /* >= 16px prevents iOS auto-zoom on focus */ +} + +.terminal::-webkit-scrollbar { + width: 0.375rem; +} +.terminal::-webkit-scrollbar-track { + background: transparent; +} +.terminal::-webkit-scrollbar-thumb { + background: var(--surface1); + border-radius: 0.1875rem; +} + +/* Terminal line types */ +.t-line { + white-space: pre-wrap; + word-break: break-all; + min-height: 1.6em; +} + +.t-prompt { + color: var(--overlay0); +} + +.t-prompt .t-input { + color: var(--text); +} + +.t-cursor { + display: inline-block; + width: 0.5rem; + height: 1.1em; + background: var(--text); + vertical-align: text-bottom; + animation: blink 1s step-end infinite; +} + +@keyframes blink { + 50% { + opacity: 0; + } +} + +.t-header { + color: var(--cyan); + font-weight: 700; +} + +.t-subheader { + color: var(--magenta); + font-weight: 700; +} + +.t-command { + color: var(--green); +} + +.t-prose { + color: var(--overlay0); +} + +.t-dim { + color: var(--overlay0); +} + +.t-yellow { + color: var(--yellow); +} + +.t-green { + color: var(--green); +} + +.t-bold { + font-weight: 700; +} + +.t-title-line { + color: var(--text); + font-weight: 700; +} + +/* Picker */ +.picker-row { + white-space: pre; + min-height: 1.6em; +} + +.picker-row.selected { + background: var(--surface0); + border-radius: 0.1875rem; +} + +.picker-row .arrow { + color: var(--yellow); + font-weight: 700; +} + +.picker-footer { + color: var(--overlay0); + min-height: 1.6em; + white-space: pre; +} + +.flash-msg { + color: var(--green); + font-weight: 600; +} + +.flash-msg.flash-execute { + color: var(--yellow); + font-style: italic; +} + +/* Hints bar */ +.hints { + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + gap: 0.5rem; + padding: 0.75rem 1.25rem; + background: var(--mantle); + border-top: 0.0625rem solid var(--surface0); + color: var(--overlay0); + flex-shrink: 0; + line-height: 2; +} + +.hints code { + background: var(--surface0); + padding: 0.25rem 0.5rem; + border-radius: 0.25rem; + color: var(--text); +} + +/* ── Responsive ─────────────────────────────────────────────────────── */ + +@media (max-width: 43.75rem) { + /* Demo */ + .demo-layout { + flex-direction: column; + } + .sidebar { + width: 100%; + border-right: none; + border-bottom: 0.0625rem solid var(--surface0); + padding: 0.5rem 0; + display: flex; + overflow-x: auto; + overflow-y: hidden; + flex-shrink: 0; + } + .sidebar-item { + flex-shrink: 0; + padding: 0.375rem 0.875rem; + border-left: none; + border-bottom: 0.1875rem solid transparent; + } + .sidebar-item.active { + border-left-color: transparent; + border-bottom-color: var(--cyan); + } + .sidebar-heading { + flex-shrink: 0; + padding: 0.375rem 0.875rem; + display: flex; + align-items: center; + } + .sidebar-desc { + display: none; + } +} diff --git a/site/demo.html b/site/demo.html new file mode 100644 index 0000000..f97edcb --- /dev/null +++ b/site/demo.html @@ -0,0 +1,152 @@ + + + + + + hdi - Interactive demo + + + + + + + + +

hdi interactive demo

+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ Try: hdi hdi install hdi run + hdi test hdi all hdi check + hdi --full hdi --raw +
+
+ + + + + + + diff --git a/site/global.css b/site/global.css new file mode 100644 index 0000000..68194c5 --- /dev/null +++ b/site/global.css @@ -0,0 +1,217 @@ +@import url("https://fonts.cdnfonts.com/css/jetbrains-mono"); + +/* ── Reset ─────────────────────────────────────────────────────────── */ + +:root { + /* Catppuccin Mocha palette */ + --base: #1e1e2e; + --mantle: #181825; + --surface0: #313244; + --surface1: #45475a; + --overlay0: #6c7086; + --text: #cdd6f4; + --subtext0: #a6adc8; + --green: #a6e3a1; + --cyan: #89dceb; + --yellow: #f9e2af; + --magenta: #cba6f7; + --red: #f38ba8; + --blue: #89b4fa; + --font-mono: + "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace; +} + +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +html { + font-size: 16px; +} + +body { + min-height: 100vh; + background: var(--base); + color: var(--text); + font-family: var(--font-mono); + display: flex; + flex-direction: column; +} + +.hidden { + display: none !important; +} + +h1, +h2, +h3, +h4 { + text-wrap: balance; +} + +p { + text-wrap: pretty; +} + +a { + color: var(--text); +} + +a:focus-visible, +button:focus-visible { + outline-offset: 3px; + outline: 2px solid currentColor; +} + +a:hover { + color: var(--subtext0); +} + +/* ── Utilities ─────────────────────────────────────────────────────────── */ + +.visually-hidden { + border: 0; + clip: rect(0 0 0 0); + height: auto; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + white-space: nowrap; +} + +.stack { + display: flex; + flex-direction: column; + justify-content: flex-start; +} + +.stack > * { + margin-block: 0; +} + +.stack > * + * { + margin-block-start: var(--space, 1.5rem); +} + +/* ── Button ─────────────────────────────────────────────────────────── */ + +button, +.button { + border: none; + font: inherit; + text-decoration: none; + background-color: var(--text); + color: var(--base); + + display: flex; + align-items: center; + justify-content: center; + padding: 0.5rem 1rem; + font-weight: 800; + line-height: 1.5; + /* min-block-size: 40px; */ + cursor: pointer; + + transition: background-color 0.1s linear; + + &:hover { + color: var(--base); + background-color: var(--subtext0); + } + + &:focus-visible { + outline-offset: 3px; + outline: 2px solid var(--text); + } +} + +/* ── Header ─────────────────────────────────────────────────────────── */ + +.nav-back { + text-decoration: none; + display: flex; + align-items: center; + min-block-size: 44px; +} + +.header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0.75rem 1.25rem; + background: var(--mantle); + border-bottom: 0.0625rem solid var(--surface0); + flex-shrink: 0; +} + +.header-left { + display: flex; + align-items: center; + gap: 1rem; +} + +.logo { + font-weight: 700; + font-size: 1.125rem; + color: var(--yellow); +} + +.logo a { + color: inherit; + text-decoration: none; +} + +.tabs { + display: flex; + gap: 0.25rem; +} + +.tab { + background: none; + border: none; + color: var(--overlay0); + font-family: var(--font-mono); + font-size: 0.9375rem; + padding: 0.375rem 0.75rem; + border-radius: 0.25rem; + cursor: pointer; + transition: + background 0.12s, + color 0.12s; +} + +.tab:hover { + background: var(--surface0); + color: var(--text); +} + +.tab.active { + background: var(--surface0); + color: var(--text); +} + +.header-right { + display: flex; + align-items: center; + gap: 0.875rem; +} + +/* ── Github link ─────────────────────────────────────────────────────────── */ + +.gh-logo { + width: 24px; + height: auto; +} + +.gh-link { + transition: color 0.15s; + display: flex; + align-items: center; + gap: 0.5rem; +} diff --git a/site/index.html b/site/index.html index cdc559e..4cb5139 100644 --- a/site/index.html +++ b/site/index.html @@ -9,6 +9,7 @@ content="CLI tool that scans a project's README and extracts the commands you need to get it running. No dependencies, just Bash." /> + - -