-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To support adding a persistent link to the sidebar, we need to maintain our own component. This commit takes the original component from the Starlight codebase and appends our link.
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
import type { Props } from '@astrojs/starlight/props'; | ||
import MobileMenuFooter from '@astrojs/starlight/components/MobileMenuFooter.astro'; | ||
import SidebarSublist from '@astrojs/starlight/components/SidebarSublist.astro'; | ||
const { sidebar } = Astro.props; | ||
--- | ||
|
||
<> | ||
<SidebarSublist sublist={sidebar} /> | ||
<div class="md:sl-hidden"> | ||
<MobileMenuFooter {...Astro.props} /> | ||
</div> | ||
<div class="bottom-links"> | ||
<a class="netlify-link" href="https://netlify.com"> | ||
<span>This site is powered by Netlify</span> | ||
</a> | ||
</div> | ||
</> | ||
|
||
<style> | ||
|
||
.netlify-link { | ||
font-size: var(--sl-text-lg); | ||
font-weight: 600; | ||
color: var(--sl-color-white); | ||
text-decoration: none; | ||
} | ||
|
||
.bottom-links { | ||
bottom: 2rem; | ||
text-align: center; | ||
margin: auto; | ||
width: 100%; | ||
@media (min-width: 50rem) { | ||
text-align: unset; | ||
position: absolute; | ||
} | ||
} | ||
|
||
</style> |