Fix mobile: hide chapter dates on small screens, fix summary word-break when expanded
Some checks failed
Deploy / Deploy Production (push) Has been skipped
Deploy / Cleanup Preview (push) Has been skipped
Deploy / Deploy Preview (push) Failing after 1s
CI / Scraper / Test (pull_request) Successful in 11s
CI / Scraper / Lint (pull_request) Successful in 17s
CI / UI / Build (pull_request) Successful in 21s
CI / Scraper / Build (pull_request) Successful in 10s
Some checks failed
Deploy / Deploy Production (push) Has been skipped
Deploy / Cleanup Preview (push) Has been skipped
Deploy / Deploy Preview (push) Failing after 1s
CI / Scraper / Test (pull_request) Successful in 11s
CI / Scraper / Lint (pull_request) Successful in 17s
CI / UI / Build (pull_request) Successful in 21s
CI / Scraper / Build (pull_request) Successful in 10s
This commit is contained in:
@@ -215,7 +215,7 @@
|
|||||||
<!-- Summary with expand toggle -->
|
<!-- Summary with expand toggle -->
|
||||||
{#if data.book.summary}
|
{#if data.book.summary}
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<p class="text-zinc-400 text-sm leading-relaxed {summaryExpanded ? '' : 'line-clamp-3'}">
|
<p class="text-zinc-400 text-sm leading-relaxed break-words {summaryExpanded ? '' : 'line-clamp-3'}">
|
||||||
{data.book.summary}
|
{data.book.summary}
|
||||||
</p>
|
</p>
|
||||||
{#if data.book.summary.length > 220}
|
{#if data.book.summary.length > 220}
|
||||||
@@ -344,18 +344,18 @@
|
|||||||
? `/books/${data.book.slug}/chapters/${chapter.number}`
|
? `/books/${data.book.slug}/chapters/${chapter.number}`
|
||||||
: `/books/${data.book.slug}/chapters/${chapter.number}?preview=1&chapter_url=${encodeURIComponent((chapter as { url?: string }).url ?? '')}&title=${encodeURIComponent(chapter.title ?? '')}`}
|
: `/books/${data.book.slug}/chapters/${chapter.number}?preview=1&chapter_url=${encodeURIComponent((chapter as { url?: string }).url ?? '')}&title=${encodeURIComponent(chapter.title ?? '')}`}
|
||||||
<div class="flex items-center gap-2 px-3 py-2 rounded hover:bg-zinc-800/70 transition-colors group {isCurrent ? 'bg-zinc-800' : ''}">
|
<div class="flex items-center gap-2 px-3 py-2 rounded hover:bg-zinc-800/70 transition-colors group {isCurrent ? 'bg-zinc-800' : ''}">
|
||||||
<a href={chapterUrl} class="flex items-baseline gap-2 flex-1 min-w-0">
|
<a href={chapterUrl} class="flex items-center gap-2 flex-1 min-w-0">
|
||||||
<!-- Chapter number -->
|
<!-- Chapter number -->
|
||||||
<span class="text-xs font-mono w-9 text-right flex-shrink-0 {isCurrent ? 'text-amber-400' : 'text-zinc-600'}">
|
<span class="text-xs font-mono w-9 text-right flex-shrink-0 {isCurrent ? 'text-amber-400' : 'text-zinc-600'}">
|
||||||
{chapter.number}
|
{chapter.number}
|
||||||
</span>
|
</span>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<span class="text-sm {isCurrent ? 'text-amber-300' : 'text-zinc-300 group-hover:text-zinc-100'} truncate flex-1 transition-colors">
|
<span class="text-sm {isCurrent ? 'text-amber-300' : 'text-zinc-300 group-hover:text-zinc-100'} truncate min-w-0 flex-1 transition-colors">
|
||||||
{chapter.title || `Chapter ${chapter.number}`}
|
{chapter.title || `Chapter ${chapter.number}`}
|
||||||
</span>
|
</span>
|
||||||
<!-- Date label, separated visually -->
|
<!-- Date label — desktop only -->
|
||||||
{#if (chapter as { date_label?: string }).date_label}
|
{#if (chapter as { date_label?: string }).date_label}
|
||||||
<span class="text-xs text-zinc-600 flex-shrink-0 hidden sm:block">· {(chapter as { date_label?: string }).date_label}</span>
|
<span class="text-xs text-zinc-600 flex-shrink-0 hidden sm:inline">· {(chapter as { date_label?: string }).date_label}</span>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- "reading" badge -->
|
<!-- "reading" badge -->
|
||||||
{#if isCurrent}
|
{#if isCurrent}
|
||||||
|
|||||||
Reference in New Issue
Block a user