jjj 0.2.1

A modal interface for Jujutsu.
---
import config from 'virtual:starlight/user-config';
import Icon from '../user-components/Icon.astro';

type Platform = keyof NonNullable<typeof config.social>;
type SocialConfig = NonNullable<NonNullable<typeof config.social>[Platform]>;
const links = Object.entries(config.social || {}) as [Platform, SocialConfig][];
---

{
	links.length > 0 && (
		<>
			{links.map(([platform, { label, url }]) => (
				<a href={url} rel="me" class="sl-flex">
					<span class="sr-only">{label}</span>
					<Icon name={platform} />
				</a>
			))}
		</>
	)
}

<style>
	a {
		color: var(--sl-color-text-accent);
		padding: 0.5em;
		margin: -0.5em;
	}
	a:hover {
		opacity: 0.66;
	}
</style>