[FA-misc] Should be good
Some checks failed
CI / build-backend (pull_request) Successful in 1m49s
CI / build-frontend (pull_request) Failing after 16s

This commit is contained in:
gamer147
2025-12-01 07:26:38 -05:00
parent b2f4548807
commit c60aaf2bdb
5 changed files with 1598 additions and 8 deletions

View File

@@ -34,6 +34,7 @@
TooltipProvider
} from '$lib/components/ui/tooltip';
import { formatRelativeTime, formatAbsoluteTime } from '$lib/utils/time';
import { sanitizeHtml } from '$lib/utils/sanitize';
let { novel }: NovelCardProps = $props();
@@ -44,7 +45,8 @@
}
const title = $derived(pickText(novel.name));
const description = $derived(pickText(novel.description));
const descriptionRaw = $derived(pickText(novel.description));
const descriptionHtml = $derived(sanitizeHtml(descriptionRaw));
const coverSrc = $derived(novel.coverImage?.newPath ?? novel.coverImage?.originalPath);
const latestChapter = $derived(
@@ -87,9 +89,9 @@
</CardTitle>
</CardHeader>
<CardContent class="pt-0 pb-4 space-y-3">
<p class="line-clamp-3 text-sm text-muted-foreground" title={description}>
{description}
</p>
<div class="line-clamp-3 text-sm text-muted-foreground" title={descriptionRaw}>
{@html descriptionHtml}
</div>
{#if chapterDisplay || relativeTime}
<div class="flex items-center gap-1 text-xs text-muted-foreground/80">
{#if chapterDisplay}