johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
<script lang="ts">
import { plural, repoHref } from '#lib/format.ts';
import Icon from '#lib/atoms/Icon.svelte';
/** How many branches and tags the repository `authority` owns as `name` has, each linked to its page; on a phone, the numbers alone. */
let {
authority,
name,
branches,
tags
}: { authority: string; name: string; branches: number; tags: number } = $props();
</script>
<nav class="ref-counts">
<a
href={repoHref(authority, name, '/branches')}
aria-label={plural(branches, 'branch', 'branches')}
><Icon name="branch" /><b>{branches}</b><span class="word"
>{branches === 1 ? 'branch' : 'branches'}</span
></a
>
<a href={repoHref(authority, name, '/tags')} aria-label={plural(tags, 'tag', 'tags')}
><Icon name="tag" /><b>{tags}</b><span class="word">{tags === 1 ? 'tag' : 'tags'}</span></a
>
</nav>