johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
<script lang="ts">
import type { RepoView } from '#lib/lexicons/dev/knotless/defs.ts';
import { repoHref } from '#lib/format.ts';
import Language from '#lib/atoms/Language.svelte';
import PrivateTag from '#lib/atoms/PrivateTag.svelte';
/**
* An account's repositories, a few, as cards by name, what each is and
* what it is mostly written in, at the card's foot; by owner and name
* too, unless they are all `owned` by one account.
*/
let {
repos,
owned = true
}: {
repos: Pick<RepoView, 'owner' | 'name' | 'description' | 'private' | 'language'>[];
owned?: boolean;
} = $props();
</script>
<ul class="cards">
{#each repos as r (`${r.owner.did}/${r.name}`)}
<li>
<div>
<a class="title" href={repoHref(r.owner.handle, r.name)}
>{#if !owned}<span class="mute">{r.owner.handle}/</span>{/if}{r.name}</a
>{#if r.private}{' '}<PrivateTag />{/if}
</div>
<p>{r.description ?? 'No description'}</p>
{#if r.language}<div class="meta"><Language language={r.language} /></div>{/if}
</li>
{/each}
</ul>