fix: spend 4 hours and accomplish nothing
This commit is contained in:
1 parent
b80d6bd930
commit
cfac8997d5
4 files changed
+24
-8
No files matched your search
@@ -34,7 +34,7 @@
|
|||||||
<Material
|
<Material
|
||||||
color={view != 'card' ? 'none' : 'distinct'}
|
color={view != 'card' ? 'none' : 'distinct'}
|
||||||
padding="none"
|
padding="none"
|
||||||
class="relative max-w-full min-w-0 w-full group flex flex-col gap-2
|
class="relative max-w-full min-w-0 w-full group gap-2 flex flex-col
|
||||||
{view != 'card' ? 'bg-transparent !border-0' : 'p-5'} {view == 'compact'
|
{view != 'card' ? 'bg-transparent !border-0' : 'p-5'} {view == 'compact'
|
||||||
? 'py-4'
|
? 'py-4'
|
||||||
: view == 'list'
|
: view == 'list'
|
||||||
@@ -63,11 +63,11 @@
|
|||||||
<slot name="badges" slot="badges" />
|
<slot name="badges" slot="badges" />
|
||||||
</PostMeta>
|
</PostMeta>
|
||||||
<PostMedia bind:post={post.post} {view} {type} />
|
<PostMedia bind:post={post.post} {view} {type} />
|
||||||
{#if post.post.body && !post.post.nsfw && view != 'compact'}
|
|
||||||
<PostBody body={post.post.body} {view} />
|
|
||||||
{/if}
|
|
||||||
{#if view == 'list' || view == 'compact'}
|
{#if view == 'list' || view == 'compact'}
|
||||||
<PostMediaCompact {view} bind:post={post.post} />
|
<PostMediaCompact {view} bind:post={post.post} style="grid-area: media; grid-column: span 2 / span 2;" />
|
||||||
|
{/if}
|
||||||
|
{#if post.post.body && !post.post.nsfw && view != 'compact'}
|
||||||
|
<PostBody body={post.post.body} {view} style="grid-area: body; grid-column: span 1 / span 1;" />
|
||||||
{/if}
|
{/if}
|
||||||
{#if actions}
|
{#if actions}
|
||||||
<PostActions
|
<PostActions
|
||||||
@@ -78,6 +78,22 @@
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
style="grid-area: actions; grid-column: span 2 / span 2;"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</Material>
|
</Material>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
:global(.list-type) {
|
||||||
|
display: grid;
|
||||||
|
gap: 0;
|
||||||
|
grid-template-areas:
|
||||||
|
'meta' 'media'
|
||||||
|
'body' 'media'
|
||||||
|
'actions' 'actions';
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
grid-template-rows: 3;
|
||||||
|
grid-template-columns: 2;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
</Modal>
|
</Modal>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex flex-row gap-2 items-center h-8">
|
<div class="flex flex-row gap-2 items-center h-8" style={$$props.style ?? ""}>
|
||||||
<PostVote
|
<PostVote
|
||||||
post={post.post}
|
post={post.post}
|
||||||
bind:vote={post.my_vote}
|
bind:vote={post.my_vote}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style="transition: max-height 300ms cubic-bezier(0.075, 0.82, 0.165, 1)"
|
style="transition: max-height 300ms cubic-bezier(0.075, 0.82, 0.165, 1); {$$props.style ?? ''}"
|
||||||
class={!expanded
|
class={!expanded
|
||||||
? `text-sm overflow-hidden
|
? `text-sm overflow-hidden
|
||||||
bg-gradient-to-b text-transparent from-slate-600 via-slate-600
|
bg-gradient-to-b text-transparent from-slate-600 via-slate-600
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if (view == 'list' || view == 'compact') && !post.embed_title && (post.thumbnail_url || isImage(post.url))}
|
{#if (view == 'list' || view == 'compact') && !post.embed_title && (post.thumbnail_url || isImage(post.url))}
|
||||||
<div class="flex-shrink-0 w-24 h-24">
|
<div class="flex-shrink-0 w-24 h-24" style={$$props.style ?? ''}>
|
||||||
{#if !$userSettings.expandImages || (post.thumbnail_url && !isImage(post.url))}
|
{#if !$userSettings.expandImages || (post.thumbnail_url && !isImage(post.url))}
|
||||||
<a href={postLink(post)}>
|
<a href={postLink(post)}>
|
||||||
<!-- svelte-ignore a11y-missing-attribute -->
|
<!-- svelte-ignore a11y-missing-attribute -->
|
||||||
|
|||||||
Reference in new issue
Block a user