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"
|
||||
|
||||
if (!['lg', '2xl'].includes(size)) {
|
||||
if (!['inherit', 'lg', '2xl'].includes(size)) {
|
||||
throw new Error(`Invalid size: ${size}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if size === 'inherit'}
|
||||
<div {...$$props} class={cx($$props.class, className)}>
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if size === 'lg'}
|
||||
<div {...$$props} class={cx($$props.class, className, "p-2 py-16 max-w-lg")}>
|
||||
<slot />
|
||||
@ -17,7 +23,7 @@
|
||||
{/if}
|
||||
|
||||
{#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 />
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -46,19 +46,21 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if newNotes.length > 0}
|
||||
<div
|
||||
in:slide
|
||||
class="cursor-pointer text-center underline text-light"
|
||||
on:click={showNewNotes}>
|
||||
Load {quantify(newNotes.length, 'new note')}
|
||||
</div>
|
||||
{/if}
|
||||
<Content size="inherit" class="pt-6">
|
||||
{#if newNotes.length > 0}
|
||||
<div
|
||||
in:slide
|
||||
class="cursor-pointer text-center underline text-light"
|
||||
on:click={showNewNotes}>
|
||||
Load {quantify(newNotes.length, 'new note')}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
{#each notes as note (note.id)}
|
||||
<Note {note} {depth} />
|
||||
{/each}
|
||||
</div>
|
||||
<div>
|
||||
{#each notes as note (note.id)}
|
||||
<Note {note} {depth} />
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<Spinner />
|
||||
<Spinner />
|
||||
</Content>
|
||||
|
Loading…
Reference in New Issue
Block a user