{#if fetching}
{/if} {#if error && !fetching}

{error === 'Novel not found' ? 'Novel Not Found' : 'Error Loading Novel'}

{error}

{/if} {#if novel && !fetching}
{#if coverSrc}
{novel.name}
{:else}
{/if}

{novel.name}

{#if novel.author}

by {novel.author.name}

{/if}
{statusLabel} {#if isNsfw} NSFW {/if} {languageLabel} {#if $isAuthenticated} {#if !canRefresh()} {status === 'COMPLETED' ? 'Cannot refresh completed novels' : 'Updated less than 6 hours ago'} {/if} {/if} {#if refreshSuccess} Refresh queued {/if} {#if refreshError} {refreshError} {/if}
{#if novel.source} Source: {novel.source.name} {/if} {#if relativeTime && absoluteTime} Updated: {absoluteTime} {/if} {chapterCount} chapters
{#if displayTags.length > 0}
{#each displayTags as tag (tag.key)} {tag.displayName} {/each}
{/if}
{#if description}
{@html truncatedDescriptionHtml}
{#if isDescriptionLong} {/if}
{/if}
Chapters ({chapterCount}) Gallery ({imageCount}) Bookmarks {#if sortedChapters.length === 0}

No chapters available yet.

{:else}
{#each sortedChapters as chapter (chapter.id)} {@const chapterDate = chapter.lastUpdatedTime ? new Date(chapter.lastUpdatedTime) : null}
Ch. {chapter.order} {chapter.name}
{#if chapterDate} {formatRelativeTime(chapterDate)} {/if}
{/each}
{/if}
{#if galleryImages.length === 0}

No images available.

{:else if galleryLoaded}
{#each galleryImages as image, index (image.src)} {/each}
{:else}
{/if}

Bookmarks coming soon.

{/if}
{#if viewerOpen && currentImage} {/if}