mirror of
https://github.com/coracle-social/coracle.git
synced 2024-10-01 17:31:24 +00:00
Fix partials/notes content layout
This commit is contained in:
parent
c5ce8cf0d5
commit
9ceb3e3e74
@ -5,11 +5,17 @@
|
|||||||
|
|
||||||
const className = "flex flex-col m-auto text-white gap-6"
|
const className = "flex flex-col m-auto text-white gap-6"
|
||||||
|
|
||||||
if (!['lg', '2xl'].includes(size)) {
|
if (!['inherit', 'lg', '2xl'].includes(size)) {
|
||||||
throw new Error(`Invalid size: ${size}`)
|
throw new Error(`Invalid size: ${size}`)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#if size === 'inherit'}
|
||||||
|
<div {...$$props} class={cx($$props.class, className)}>
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if size === 'lg'}
|
{#if size === 'lg'}
|
||||||
<div {...$$props} class={cx($$props.class, className, "p-2 py-16 max-w-lg")}>
|
<div {...$$props} class={cx($$props.class, className, "p-2 py-16 max-w-lg")}>
|
||||||
<slot />
|
<slot />
|
||||||
@ -17,7 +23,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if size === '2xl'}
|
{#if size === '2xl'}
|
||||||
<div {...$$props} class={cx($$props.class, className, "p-4 lg:py-8 max-w-2xl")}>
|
<div {...$$props} class={cx($$props.class, className, "p-4 max-w-2xl")}>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -46,19 +46,21 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if newNotes.length > 0}
|
<Content size="inherit" class="pt-6">
|
||||||
<div
|
{#if newNotes.length > 0}
|
||||||
|
<div
|
||||||
in:slide
|
in:slide
|
||||||
class="cursor-pointer text-center underline text-light"
|
class="cursor-pointer text-center underline text-light"
|
||||||
on:click={showNewNotes}>
|
on:click={showNewNotes}>
|
||||||
Load {quantify(newNotes.length, 'new note')}
|
Load {quantify(newNotes.length, 'new note')}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{#each notes as note (note.id)}
|
{#each notes as note (note.id)}
|
||||||
<Note {note} {depth} />
|
<Note {note} {depth} />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Spinner />
|
<Spinner />
|
||||||
|
</Content>
|
||||||
|
Loading…
Reference in New Issue
Block a user