johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
<script lang="ts">
import SiteLink from './SiteLink.svelte';
/** The links a repository's pages show, `links`: the first, its website, and with more, a quiet count of the rest that opens the list of them all. */
let { links }: { links: { url: string; title?: string }[] } = $props();
const more = $derived(links.length - 1);
</script>
<span class="repo-links">
<SiteLink link={links[0]} />
{#if more > 0}
<details class="popover links-menu">
<summary class="bare" aria-label="All {links.length} links" title="All {links.length} links"
>+{more}</summary
>
<ul class="menu">
{#each links as link, i (i)}<li><SiteLink {link} /></li>{/each}
</ul>
</details>
{/if}
</span>