Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions docs-next/src/components/SocialIcons.astro
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
---
// Override of Starlight's SocialIcons component. Renders a "Docs"
// quick-access pill on the left, then defers to Starlight's default
// rendering (the GitHub icon, etc.) for the rest. Wraps rather than
// re-implements so future Starlight versions that change the social-
// icon pipeline still work — we only own the `.bd-docs-link` extra.
// Override of Starlight's SocialIcons component. Renders two
// quick-access pills on the left — a "← packetThrower" back-link
// to the parent landing page, then a "Docs" pill to /install/ —
// then defers to Starlight's default rendering (the GitHub icon,
// etc.) for the rest. Wraps rather than re-implements so future
// Starlight versions that change the social-icon pipeline still
// work — we only own the `.bd-nav-pill` extras.
//
// The back-link is an absolute URL on purpose: Astro's configured
// `base` is `/Baudrun/`, so a relative `/` would resolve to
// `/Baudrun/` (this site's own root). The absolute form skips the
// base prefix and reaches the actual parent at
// https://packetthrower.github.io/.
import Default from '@astrojs/starlight/components/SocialIcons.astro';
---

<a class="bd-docs-link sl-flex" href="/Baudrun/install/">
<a class="bd-nav-pill sl-flex" href="https://packetthrower.github.io/">
<span aria-hidden="true">←</span> packetThrower
</a>

<a class="bd-nav-pill sl-flex" href="/Baudrun/install/">
Docs
</a>

<Default {...Astro.props}><slot /></Default>

<style>
.bd-docs-link {
.bd-nav-pill {
align-items: center;
gap: 0.4em;
padding: 0.35em 0.85em;
Expand All @@ -28,7 +40,7 @@ import Default from '@astrojs/starlight/components/SocialIcons.astro';
color 140ms ease,
box-shadow 140ms ease;
}
.bd-docs-link:hover {
.bd-nav-pill:hover {
color: var(--sl-color-text-accent);
box-shadow: inset 0 0 0 1px var(--sl-color-text-accent);
}
Expand Down