This repository has no description
0

Configure Feed

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

core / web / src / lib / components / profile / StringCardContent.svelte
1.0 kB 34 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 class="flex min-h-24 flex-col gap-1"> 10 <div class="flex items-center justify-between font-medium text-foreground-default"> 11 <div class="mr-2 flex min-w-0 flex-1 items-center"> 12 <a 13 href={resolve(`/${entry.ownerHandle}/strings/${entry.rkey}` as "/")} 14 class="min-w-0 truncate font-bold text-foreground-default no-underline hover:underline" 15 > 16 {entry.filename} 17 </a> 18 </div> 19 </div> 20 21 {#if entry.description} 22 <p class="line-clamp-2 text-sm text-foreground-muted">{entry.description}</p> 23 {/if} 24 25 <div 26 class="mt-auto flex flex-wrap items-center gap-4 pt-2 font-mono typography-monospace-small text-foreground-subtle" 27 > 28 <span class="shrink-0" 29 >{entry.lines} line{entry.lines === 1 ? "" : "s"} &middot; {compactRelativeTime( 30 entry.createdAt 31 )}</span 32 > 33 </div> 34</div>