summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gómez-Sánchez2023-11-01 23:28:38 +0100
committerGitHub2023-11-01 23:28:38 +0100
commit977fe135a74661300589898abe98aec73cad9ed3 (patch)
tree677d3fcb9d16cba0441d4c0615e7a44daa20b5c9
parent92103b9cf448d190f06e4865167c65f085c4b86a (diff)
downloadIT.starlight-977fe135a74661300589898abe98aec73cad9ed3.tar.gz
IT.starlight-977fe135a74661300589898abe98aec73cad9ed3.tar.bz2
IT.starlight-977fe135a74661300589898abe98aec73cad9ed3.zip
Add social icons to mobile menu footer (#988)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r--.changeset/swift-geckos-remain.md5
-rw-r--r--packages/starlight/components/MobileMenuFooter.astro16
2 files changed, 20 insertions, 1 deletions
diff --git a/.changeset/swift-geckos-remain.md b/.changeset/swift-geckos-remain.md
new file mode 100644
index 00000000..6121935c
--- /dev/null
+++ b/.changeset/swift-geckos-remain.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/starlight': minor
+---
+
+Include social icon links in mobile menu
diff --git a/packages/starlight/components/MobileMenuFooter.astro b/packages/starlight/components/MobileMenuFooter.astro
index a5258da1..b1a3094c 100644
--- a/packages/starlight/components/MobileMenuFooter.astro
+++ b/packages/starlight/components/MobileMenuFooter.astro
@@ -1,17 +1,31 @@
---
-import { LanguageSelect, ThemeSelect } from 'virtual:starlight/components';
+import { LanguageSelect, ThemeSelect, SocialIcons } from 'virtual:starlight/components';
import type { Props } from '../props';
---
<div class="mobile-preferences sl-flex">
+ <div class="sl-flex social-icons">
+ <SocialIcons {...Astro.props} />
+ </div>
<ThemeSelect {...Astro.props} />
<LanguageSelect {...Astro.props} />
</div>
<style>
+ .social-icons {
+ margin-inline-end: auto;
+ gap: 1rem;
+ align-items: center;
+ padding-block: 1rem;
+ }
+ .social-icons:empty {
+ display: none;
+ }
.mobile-preferences {
justify-content: space-between;
+ flex-wrap: wrap;
border-top: 1px solid var(--sl-color-gray-6);
+ column-gap: 1rem;
padding: 0.5rem 0;
}
</style>