fix: spend 4 hours and accomplish nothing

This commit is contained in:
Xylight committed 2024-03-04 18:46:52 -08:00
1 parent b80d6bd930
commit cfac8997d5
4 files changed
+24 -8

No files matched your search

+21 -5
View File
@@ -34,7 +34,7 @@
<Material
color={view != 'card' ? 'none' : 'distinct'}
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'
? 'py-4'
: view == 'list'
@@ -63,11 +63,11 @@
<slot name="badges" slot="badges" />
</PostMeta>
<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'}
<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 actions}
<PostActions
@@ -78,6 +78,22 @@
type: 'success',
})
}}
style="grid-area: actions; grid-column: span 2 / span 2;"
/>
{/if}
</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>
{/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
post={post.post}
bind:vote={post.my_vote}
@@ -19,7 +19,7 @@
</script>
<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
? `text-sm overflow-hidden
bg-gradient-to-b text-transparent from-slate-600 via-slate-600
@@ -10,7 +10,7 @@
</script>
{#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))}
<a href={postLink(post)}>
<!-- svelte-ignore a11y-missing-attribute -->