{#if masonry && masonryConfig()} {@const config = masonryConfig()} {#snippet children({ item })}
{#if showCaptions}

{item.caption || ''}

{/if}
{/snippet}
{:else if (columns === 1 || columns === 2 || columns === 3) && !masonry} {#each columnPhotos as column, colIndex}
{#each column as photo}
{#if showCaptions}

{photo.caption || ''}

{/if}
{/each}
{/each} {:else}
{#each photos as photo}
{#if showCaptions}

{photo.caption || ''}

{/if}
{/each}
{/if}