Monorepo for Tangled tangled.org
1

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / lib / components / profile / StringCard.svelte
1.1 kB 36 lines
1<script lang="ts"> 2 import { resolve } from "$app/paths"; 3 import { compactRelativeTime } from "$lib/format"; 4 import type { StringCardData } from "./types"; 5 6 let { entry }: { entry: StringCardData } = $props(); 7</script> 8 9<div 10 class="flex min-h-32 flex-col gap-1 rounded border border-border-default bg-background-default px-6 py-4 shadow-sm" 11> 12 <div class="flex items-center justify-between font-medium text-foreground-default"> 13 <div class="mr-2 flex min-w-0 flex-1 items-center"> 14 <a 15 href={resolve(`/${entry.ownerHandle}/strings/${entry.rkey}` as "/")} 16 class="min-w-0 truncate font-bold text-foreground-default no-underline hover:underline" 17 > 18 {entry.filename} 19 </a> 20 </div> 21 </div> 22 23 {#if entry.description} 24 <p class="line-clamp-2 text-sm text-foreground-muted">{entry.description}</p> 25 {/if} 26 27 <div 28 class="mt-auto flex flex-wrap items-center gap-4 pt-2 font-mono text-xs text-foreground-subtle" 29 > 30 <span class="shrink-0" 31 >{entry.lines} line{entry.lines === 1 ? "" : "s"} &middot; {compactRelativeTime( 32 entry.createdAt 33 )}</span 34 > 35 </div> 36</div>