diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-09-01 14:48:45 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-09-01 14:48:45 +0300 |
| commit | 8a6d697308162874a236c84aac0b0f8c7ac01f83 (patch) | |
| tree | ed7dc7e8c6f50d66bde721fae78576aede929f66 /website/src/components/SiteTitle.astro | |
| parent | b54a78aa510b87d1e3b56c619b72eaeb59e4a2a1 (diff) | |
refactor: separate website presentation from runtime
Diffstat (limited to 'website/src/components/SiteTitle.astro')
| -rw-r--r-- | website/src/components/SiteTitle.astro | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/website/src/components/SiteTitle.astro b/website/src/components/SiteTitle.astro deleted file mode 100644 index 3e5af0a3..00000000 --- a/website/src/components/SiteTitle.astro +++ /dev/null @@ -1,95 +0,0 @@ ---- -import { docsRoute } from '../docs-path'; - -const { siteTitle, siteTitleHref, locale } = Astro.locals.starlightRoute; -const route = docsRoute(Astro.url.pathname); -const localePrefix = locale ? `/${locale}` : ''; -const targetSegment = route.target === 'stable' ? '' : `/${route.target}`; -const docsHref = `${localePrefix}/docs${targetSegment}/`; ---- - -<div class="title-row sl-flex"> - <a href={siteTitleHref} class="site-title sl-flex"> - <span class="docs-brand-logo" aria-hidden="true"></span> - <span translate="no">{siteTitle}</span> - </a> - <nav class="title-nav" aria-label="Primary"> - <a href={docsHref}>Docs</a> - <a href="/plugins/">Plugins</a> - <a href="/blog/">Blog</a> - </nav> -</div> - -<style> - @layer starlight.core { - .title-row { - align-items: center; - gap: 1rem; - min-width: 0; - } - - .site-title { - align-items: center; - gap: 0.55rem; - font-family: var(--sl-font-mono); - font-size: var(--sl-text-h4); - font-weight: 700; - letter-spacing: -0.04em; - color: var(--sl-color-white); - text-decoration: none; - white-space: nowrap; - min-width: 0; - transition: color 120ms ease; - } - - .docs-brand-logo { - position: relative; - display: inline-block; - width: 32px; - height: 32px; - flex: 0 0 auto; - border: 1px solid var(--sl-color-hairline); - border-radius: 4px; - background: var(--sl-color-bg-nav); - } - - .docs-brand-logo::before { - content: ""; - position: absolute; - inset: 2px; - background: var(--sl-color-white); - -webkit-mask: url("/assets/agent-icons/herdr-mask.svg") center / contain no-repeat; - mask: url("/assets/agent-icons/herdr-mask.svg") center / contain no-repeat; - } - - span:not(.docs-brand-logo) { - overflow: hidden; - } - - .title-nav { - display: flex; - align-items: baseline; - gap: 0.75rem; - font-size: var(--sl-text-sm); - font-weight: 600; - line-height: 1; - } - - .title-nav a { - color: var(--sl-color-white); - text-decoration: none; - transition: color 120ms ease; - } - - .site-title:hover, - .title-nav a:hover { - color: var(--sl-color-accent-high); - } - - @media (max-width: 35rem) { - .title-nav { - display: none; - } - } - } -</style> |
