{#each pages as p} {#each ['header', 'footer'] as const as zone} {#if !(hfActive === zone && editingPage === p)} {@const html = zone === 'header' ? headerHtml : footerHtml}
startEdit(zone, p)} role="button" tabindex="-1" use:patchFields={[p, numPages, html]} > {@html html}
{/if} {/each} {/each} {#if hfActive} {@const box = zoneBox(hfActive, editingPage)}
Insert
{/if}