-
-
Notifications
You must be signed in to change notification settings - Fork 27
Add RocketSim branding and custom styling to Starlight docs #912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9d22601
6453367
e3365a1
3302e70
b13a782
5201d3c
823ce26
a39533d
85b7ea6
f9861fe
1bede73
c73b578
d2bf3f4
95c65db
10b04f7
6b5f3f4
281f834
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| /** | ||
| * Custom Footer component for RocketSim docs | ||
| * Includes the default Starlight footer plus custom footer links | ||
| */ | ||
| import Default from "@astrojs/starlight/components/Footer.astro"; | ||
| import { Icon } from "@astrojs/starlight/components"; | ||
| --- | ||
|
|
||
| <Default {...Astro.props}><slot /></Default> | ||
|
|
||
| <div class="footer-links"> | ||
| <a href="/"><Icon name="rocket" /> Home</a> | ||
| <a href="/team-licenses"><Icon name="star" /> For teams</a> | ||
| <a | ||
| href="https://apps.apple.com/app/apple-store/id1504940162?pt=117264678&ct=doc-footer&mt=8" | ||
| ><Icon name="apple" /> Mac App Store</a | ||
| > | ||
| <a href="mailto:[email protected]"><Icon name="email" /> Contact us</a> | ||
| </div> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| /** | ||
| * Custom Head component for RocketSim docs | ||
| * Includes proper favicon and meta tags matching the main site | ||
| */ | ||
| import Default from "@astrojs/starlight/components/Head.astro"; | ||
| --- | ||
|
|
||
| <Default {...Astro.props}><slot /></Default> | ||
|
|
||
| <!-- Favicon --> | ||
| <link rel="icon" href="/favicon.svg" type="image/svg+xml" /> | ||
| <link rel="icon" href="/favicon.ico" sizes="32x32" /> | ||
| <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" /> | ||
| <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> | ||
|
|
||
| <!-- Theme color matching RocketSim dark theme --> | ||
| <meta name="theme-color" content="#000000" /> | ||
| <meta name="color-scheme" content="dark light" /> | ||
|
|
||
| <!-- Additional meta for better SEO --> | ||
| <meta name="author" content="RocketSim" /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,30 +57,40 @@ const isHomepage = id === "docs"; | |
| .action-button { | ||
| display: inline-block; | ||
| padding: 0.75rem 1.25rem; | ||
| border-radius: 0.375rem; | ||
| border-radius: 9999px; | ||
| text-decoration: none; | ||
| font-weight: 600; | ||
| font-size: var(--sl-text-base); | ||
| transition: all 0.2s ease; | ||
| } | ||
|
|
||
| .action-button.primary { | ||
| background: #0093ff; | ||
| background: var(--sl-color-accent); | ||
| color: white; | ||
| } | ||
|
|
||
| .action-button.primary:hover { | ||
| background: #0062cc; | ||
| background: #0069d9; | ||
| } | ||
|
|
||
| .action-button.primary:active { | ||
| background: #005cbf; | ||
| } | ||
|
|
||
| .action-button.primary:focus-visible { | ||
| outline: 0.25rem solid #0069d9; | ||
| } | ||
|
|
||
| .action-button.secondary { | ||
| background: transparent; | ||
| color: var(--sl-color-white); | ||
| border: 1px solid var(--sl-color-gray-5); | ||
| background: #373739; | ||
| color: white; | ||
| border: 1px solid #373739; | ||
| transition: all 0.3s ease; | ||
| } | ||
|
|
||
| .action-button.secondary:hover { | ||
| border-color: var(--sl-color-text-accent); | ||
| background: var(--sl-color-gray-6); | ||
| :global([data-theme="light"]) .action-button.secondary { | ||
| background: #e9ecef; | ||
| color: #373739; | ||
| border-color: #e9ecef; | ||
| } | ||
|
Comment on lines
84
to
95
|
||
| </style> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| --- | ||
| /** | ||
| * Custom SiteTitle component for RocketSim docs | ||
| * Shows the RocketSim logo linking to main site and a "DOCS" badge linking to /docs | ||
| */ | ||
| // Import logo images | ||
| import logoDark from "../../assets/rocketsim-logo.svg"; | ||
| import logoLight from "../../assets/rocketsim-logo-dark.svg"; | ||
| --- | ||
|
|
||
| <a href="/" class="site-title sl-flex" aria-label="RocketSim"> | ||
| <img class="logo-dark" src={logoDark.src} alt="RocketSim" /> | ||
| <img class="logo-light" src={logoLight.src} alt="RocketSim" /> | ||
| </a> | ||
| <a href="/docs" class="docs-badge">DOCS</a> | ||
|
|
||
| <style> | ||
| .site-title { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 0.5rem; | ||
| text-decoration: none; | ||
| color: var(--sl-color-white); | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .site-title img { | ||
| height: 24px; | ||
| width: auto; | ||
| } | ||
|
|
||
| /* Dark mode: show dark logo, hide light logo */ | ||
| .logo-dark { | ||
| display: block; | ||
| } | ||
| .logo-light { | ||
| display: none; | ||
| } | ||
|
|
||
| /* Light mode: show light logo, hide dark logo */ | ||
| :global([data-theme="light"]) .logo-dark { | ||
| display: none; | ||
| } | ||
| :global([data-theme="light"]) .logo-light { | ||
| display: block; | ||
| } | ||
|
|
||
| .docs-badge { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| margin-left: 0.5rem; | ||
| padding: 0.125rem 0.5rem; | ||
| font-size: 0.75rem; | ||
| font-weight: 700; | ||
| letter-spacing: 0.05em; | ||
| text-transform: uppercase; | ||
| text-decoration: none; | ||
| color: var(--sl-color-accent); | ||
| border: 1px solid var(--sl-color-accent); | ||
| border-radius: 4px; | ||
| transition: | ||
| background-color 0.2s ease, | ||
| color 0.2s ease; | ||
| } | ||
|
|
||
| .docs-badge:hover { | ||
| background-color: var(--sl-color-accent); | ||
| color: white; | ||
| } | ||
| </style> |
Uh oh!
There was an error while loading. Please reload this page.