diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-07 19:55:44 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-07 19:55:44 +0300 |
| commit | 970c07ea3110f114f6cb348ccbef5a6f763373ce (patch) | |
| tree | 071cc22b4e26be964e51dda280d3dcb4f74b5fc9 /website | |
| parent | c01b947d0bde1663980a15727938ac666ce31f61 (diff) | |
docs: document windows preview installs
Diffstat (limited to 'website')
| -rw-r--r-- | website/css/style.css | 48 | ||||
| -rw-r--r-- | website/index.html | 48 | ||||
| -rw-r--r-- | website/src/components/Sidebar.astro | 29 | ||||
| -rw-r--r-- | website/src/content/docs/install.mdx | 2 |
4 files changed, 110 insertions, 17 deletions
diff --git a/website/css/style.css b/website/css/style.css index 1754a180..6a562aa1 100644 --- a/website/css/style.css +++ b/website/css/style.css @@ -1120,6 +1120,54 @@ samp { color: var(--accent); } +.windows-install { + margin-top: 0.85rem; + padding-top: 0.85rem; + border-top: 1px solid var(--line); +} + +.windows-install-heading { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.75rem; + color: var(--muted); + font-family: var(--mono); + font-size: 0.72rem; + font-weight: 600; +} + +.windows-install-heading span { + color: var(--ink-soft); +} + +.windows-install-heading a { + color: var(--accent); + text-decoration: none; +} + +.windows-install-heading a:hover { + text-decoration: underline; +} + +.install-card-secondary { + margin-top: 0.45rem; + background: color-mix(in srgb, var(--term-bg) 82%, transparent); +} + +.install-card-secondary .prompt { + font-size: 0.72rem; +} + +.install-card-secondary code { + font-size: 0.68rem; +} + +.install-card-secondary button { + padding: 0.24rem 0.55rem; + font-size: 0.68rem; +} + .hero-note { margin: 0.75rem 0 0; color: var(--muted-2); diff --git a/website/index.html b/website/index.html index cbcefb00..1a06efc0 100644 --- a/website/index.html +++ b/website/index.html @@ -137,7 +137,7 @@ </div> <div class="install-panel" aria-label="Install options"> <div class="install-methods" role="group" aria-label="Install method"> - <span class="install-label">Install with</span> + <span class="install-label">Stable install</span> <button class="install-method is-active" type="button" @@ -165,10 +165,23 @@ <code id="install-cmd" class="is-compact" >curl -fsSL https://herdr.dev/install.sh | sh</code > - <button id="copy-btn" type="button">Copy</button> + <button id="copy-btn" type="button" data-copy-target="install-cmd">Copy</button> + </div> + <div class="windows-install" aria-label="Windows beta preview install"> + <div class="windows-install-heading"> + <span>Windows beta · preview only</span> + <a href="/docs/preview/windows-beta/">Preview docs</a> + </div> + <div class="install-card install-card-secondary" aria-label="Windows beta install command"> + <span class="prompt">PS></span> + <code id="windows-install-cmd" class="is-compact" + >$env:HERDR_CHANNEL="preview"; irm https://herdr.dev/install.ps1 | iex</code + > + <button type="button" data-copy-target="windows-install-cmd">Copy</button> + </div> </div> </div> - <p class="hero-note">Single Rust binary · no Electron</p> + <p class="hero-note">Stable Linux/macOS · Windows preview beta · no Electron</p> </div> </div> @@ -1048,18 +1061,23 @@ $ herdr</code></pre> }); }); - copyButton.addEventListener("click", async function () { - try { - await navigator.clipboard.writeText( - command.textContent.trim(), - ); - copyButton.textContent = "Copied"; - setTimeout(function () { - copyButton.textContent = "Copy"; - }, 1500); - } catch (error) { - copyButton.textContent = "Select"; - } + document.querySelectorAll("[data-copy-target]").forEach(function (button) { + button.addEventListener("click", async function () { + var target = document.getElementById(button.dataset.copyTarget); + if (!target) return; + + try { + await navigator.clipboard.writeText( + target.textContent.trim(), + ); + button.textContent = "Copied"; + setTimeout(function () { + button.textContent = "Copy"; + }, 1500); + } catch (error) { + button.textContent = "Select"; + } + }); }); })(); diff --git a/website/src/components/Sidebar.astro b/website/src/components/Sidebar.astro index c875a390..8ded83bb 100644 --- a/website/src/components/Sidebar.astro +++ b/website/src/components/Sidebar.astro @@ -6,7 +6,34 @@ import SidebarSublist from '@astrojs/starlight/components/SidebarSublist.astro'; const { sidebar } = Astro.locals.starlightRoute; const pathname = Astro.url.pathname; const isPreview = pathname === '/docs/preview/' || pathname.startsWith('/docs/preview/'); -const channelSidebar = isPreview ? rewriteSidebar(sidebar) : sidebar; +const channelSidebar = isPreview ? addPreviewOnlyItems(rewriteSidebar(sidebar)) : sidebar; + +function addPreviewOnlyItems(entries) { + return entries.map((entry) => { + if (entry.type !== 'group' || entry.label !== 'Start here') return entry; + + const windowsBeta = { + type: 'link', + label: 'Windows beta', + href: '/docs/preview/windows-beta/', + badge: undefined, + isCurrent: samePath('/docs/preview/windows-beta/', pathname), + attrs: {}, + }; + const nextEntries = []; + for (const child of entry.entries) { + nextEntries.push(child); + if (child.type === 'link' && child.label === 'Install') { + nextEntries.push(windowsBeta); + } + } + + return { + ...entry, + entries: nextEntries, + }; + }); +} function rewriteSidebar(entries) { return entries.map((entry) => { diff --git a/website/src/content/docs/install.mdx b/website/src/content/docs/install.mdx index 6322c8e0..66203310 100644 --- a/website/src/content/docs/install.mdx +++ b/website/src/content/docs/install.mdx @@ -130,4 +130,4 @@ mv herdr-linux-x86_64 ~/.local/bin/herdr ## Requirements -Herdr supports Linux and macOS. Native Windows support is not available yet; use Herdr inside WSL for now. +Stable Herdr releases support Linux and macOS. Native Windows builds are preview-only beta releases; stable users on Windows should use Herdr inside WSL for now. |
