{#snippet sectionHeading(title: string, depth: number)} {@const headingLevel = Math.min(depth + 1, 6)} {@const className = $pharosInstance.isFloatingTitle(rootId) ? "discrete" : "h-leather"} {title} {/snippet} {#snippet coverImage(rootId: string, index: number, depth: number)} {#if hasCoverImage(rootId, index)}
{title}
{/if} {/snippet} {#snippet blogMetadata(rootId: string, index: number)}

by {byline(rootId, index)}

{publishedAt(rootId, index)}

{/snippet} {#snippet contentParagraph(content: string, publicationType: string)} {#if publicationType === "novel"}

{@html content}

{:else if publicationType === "blog"}

{@html content}

{:else}

{@html content}

{/if} {/snippet}
{#if orderedChildren.length === 0 || depth >= 4} {#key updateCount} {#if isEditing}
{:else} {@render contentParagraph(currentContent, publicationType)} {/if} {/key} {:else}
{#if isEditing} toggleEditing(rootId, false)} /> {:else if !(publicationType === "blog" && depth === 1)} {@render sectionHeading(title!, depth)} {/if} {#if publicationType === "blog" && depth === 1} {:else} {#key subtreeUpdateCount} {#each orderedChildren as id, index} {/each} {/key} {/if}
{/if} {#if allowEditing && depth > 0}
{#if hasPreviousSibling && parentId} {/if} {#if hasNextSibling && parentId} {/if} Edit
{/if}