Skip to content

Commit

Permalink
feat: blog title & custom theme select
Browse files Browse the repository at this point in the history
  • Loading branch information
Eveeifyeve committed Jul 19, 2024
1 parent 8dc9d80 commit 8ab8654
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default defineConfig({
starlight({
title: "Minecraft-Essentials",
plugins: [starlightBlog({
title: "Minecraft-Essentials Blog",
authors: {
eveeifyeve: {
name: "Eveeifyeve",
Expand Down Expand Up @@ -112,6 +113,7 @@ export default defineConfig({
],
components: {
SiteTitle: "./src/components/starlight/SiteTitle.astro",
ThemeSelect: "./src/components/starlight/ThemeSelect.astro",
},
}),
],
Expand Down
28 changes: 28 additions & 0 deletions src/components/starlight/ThemeSelect.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
import StarlightThemeSelect from "@astrojs/starlight/components/ThemeSelect.astro";
import type { Props } from "@astrojs/starlight/props";
---

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

<style>
div {
border-inline-end: 1px solid var(--sl-color-gray-5);
display: none;
padding-inline-end: 1rem;
}

@media (min-width: 50rem) {
div {
display: flex;
}
}

a {
color: var(--sl-color-text-accent);
font-weight: 600;
text-decoration: none;
}
</style>

0 comments on commit 8ab8654

Please sign in to comment.