| 1 |
--- |
| 2 |
import config from 'virtual:starlight/user-config'; |
| 3 |
import Icon from '@astrojs/starlight/user-components/Icon.astro'; |
| 4 |
|
| 5 |
const links = config.social || []; |
| 6 |
--- |
| 7 |
{ |
| 8 |
links.length > 0 && ( |
| 9 |
<> |
| 10 |
{links.map(({ label, href, icon }) => ( |
| 11 |
<a {href} rel="me" class="sl-flex"> |
| 12 |
<span class="sr-only">{label}</span> |
| 13 |
<Icon name={icon} /> |
| 14 |
</a> |
| 15 |
))} |
| 16 |
</> |
| 17 |
) |
| 18 |
} |
| 19 |
|
| 20 |
<style> |
| 21 |
@layer starlight.core { |
| 22 |
a { |
| 23 |
color: var(--sl-color-text-accent); |
| 24 |
padding: 0.5em; |
| 25 |
margin: -0.5em; |
| 26 |
} |
| 27 |
a:hover { |
| 28 |
opacity: 0.66; |
| 29 |
} |
| 30 |
} |
| 31 |
</style> |