misc: remove externuous elements (#495)

This commit is contained in:
Xylight authored and GitHub committed 2025-02-23 15:04:46 -08:00
1 parent e401d76495
commit 5e18fbb0bd
5 files changed
+13 -52

No files matched your search

-15
View File
@@ -176,21 +176,6 @@
{/if} {/if}
{#if actions} {#if actions}
<PostActions {onhide} bind:post style="grid-area: actions;" {view} /> <PostActions {onhide} bind:post style="grid-area: actions;" {view} />
{:else if view == 'compact'}
<div class="flex flex-row items-center gap-2 text-sm">
<Badge>
{#snippet icon()}
<Icon src={ArrowUp} size="14" micro />
{/snippet}
{post.counts.score}
</Badge>
<Badge>
{#snippet icon()}
<Icon src={ChatBubbleOvalLeft} size="14" micro />
{/snippet}
{post.counts.comments}
</Badge>
</div>
{/if} {/if}
<div <div
class="absolute overflow-hidden inset-0 class="absolute overflow-hidden inset-0
@@ -46,7 +46,7 @@
class="{!expanded class="{!expanded
? ` overflow-hidden ? ` 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
dark:from-zinc-400 dark:via-zinc-400 bg-clip-text z-0 max-h-48` dark:from-zinc-400 dark:via-zinc-400 bg-clip-text z-0 max-h-36`
: 'text-slate-600 dark:text-zinc-400 max-h-full'} text-base {clazz}" : 'text-slate-600 dark:text-zinc-400 max-h-full'} text-base {clazz}"
class:pointer-events-none={!clickThrough} class:pointer-events-none={!clickThrough}
bind:this={element} bind:this={element}
@@ -177,9 +177,7 @@
}) })
</script> </script>
<ul <ul class="flex flex-col list-none">
class="flex flex-col list-none divide-y divide-slate-200 dark:divide-zinc-800"
>
{#key posts} {#key posts}
{#if posts?.length == 0} {#if posts?.length == 0}
<div class="h-full grid place-items-center"> <div class="h-full grid place-items-center">
@@ -207,7 +205,7 @@
style="position: absolute; top: 0; left: 0; width: 100%; transform: translateY({items?.[0] style="position: absolute; top: 0; left: 0; width: 100%; transform: translateY({items?.[0]
? items?.[0]?.start - $virtualizer.options.scrollMargin ? items?.[0]?.start - $virtualizer.options.scrollMargin
: 0}px);" : 0}px);"
class="divide-y divide-slate-200 dark:divide-zinc-900" class="divide-y divide-slate-200 dark:divide-zinc-800"
id="feed" id="feed"
> >
{#each items as row, index (posts[row.index]?.post.id)} {#each items as row, index (posts[row.index]?.post.id)}
@@ -37,12 +37,13 @@
For embed-type posts. Displays embed card or a compact link. For embed-type posts. Displays embed card or a compact link.
--> -->
{#if embed_title && view != 'compact'} {#if embed_title && view != 'compact'}
<a href={url} class="group/link">
<Material <Material
color="distinct" color="distinct"
class="flex flex-col-reverse sm:flex-row class="flex flex-col-reverse sm:flex-row
overflow-hidden gap-4 embed-card z-0 relative overflow-hidden gap-4 embed-card z-0 relative
dark:border-t-zinc-800 border-opacity-80 max-w-full shadow-sm shadow-black/5 dark:border-t-zinc-800 border-opacity-80 max-w-full shadow-sm shadow-black/5
dark:bg-zinc-950" dark:bg-zinc-950 group-hover/link:bg-slate-100 group-hover/link:dark:bg-zinc-900 transition-colors"
rounding="2xl" rounding="2xl"
element="article" element="article"
> >
@@ -51,8 +52,7 @@
src={optimizeImageURL(thumbnail_url, 64)} src={optimizeImageURL(thumbnail_url, 64)}
alt="" alt=""
class="-z-10 absolute w-full object-cover h-full opacity-10 brightness-150 class="-z-10 absolute w-full object-cover h-full opacity-10 brightness-150
dark:brightness-90 dark:opacity-20 blur-2xl dark:brightness-90 dark:opacity-20 blur-2xl -inset-px"
-inset-px"
/> />
{/if} {/if}
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
@@ -62,37 +62,15 @@
target="_blank" target="_blank"
class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium" class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium"
> >
<Icon
src={LinkIcon}
size="16"
micro
class="text-slate-400 dark:text-zinc-600"
/>
{richURL.hostname} {richURL.hostname}
</Link> </Link>
{/if} {/if}
<a <p class="font-medium text-base">{embed_title}</p>
href={url}
target="_blank"
class="font-medium text-base hover:underline"
>
{embed_title}
</a>
{#if embed_description}
<p class="text-sm max-w-2xl">
{embed_description.slice(0, 300)}{embed_description.length > 300
? '...'
: ''}
</p>
{/if}
</div> </div>
{#if thumbnail_url} {#if thumbnail_url}
<a <picture
href={url} class="-m-4 mb-auto sm:-mb-4 sm:ml-auto flex-shrink-0 sm:w-1/3 sm:max-w-60"
target="_blank"
class="-m-4 mb-auto sm:-mb-4 sm:ml-auto flex-shrink-0 sm:w-1/3 sm:min-h-40 sm:max-w-60"
> >
<picture>
<source <source
srcset={optimizeImageURL(thumbnail_url, 256)} srcset={optimizeImageURL(thumbnail_url, 256)}
media="(max-width: 256px)" media="(max-width: 256px)"
@@ -107,16 +85,16 @@
/> />
<img <img
src={optimizeImageURL(thumbnail_url, -1)} src={optimizeImageURL(thumbnail_url, -1)}
class="object-cover w-full sm:max-w-96 h-48 sm:min-h-40 sm:h-full bg-slate-200 dark:bg-zinc-800" class="object-cover w-full sm:max-w-96 h-32 sm:min-h-16 bg-slate-200 dark:bg-zinc-800"
width={600} width={600}
height={400} height={400}
alt={embed_title} alt=" "
class:blur-3xl={nsfw} class:blur-3xl={nsfw}
/> />
</picture> </picture>
</a>
{/if} {/if}
</Material> </Material>
</a>
{:else} {:else}
<Button <Button
href={url} href={url}
@@ -283,7 +283,7 @@
{/snippet} {/snippet}
</Button> </Button>
</div> </div>
<h1 class="font-bold text-xl font-display leading-5"> <h1 class="font-medium text-xl leading-5">
<Markdown <Markdown
source={parseTags(data.post.value.post_view.post.name).title ?? source={parseTags(data.post.value.post_view.post.name).title ??
data.post.value.post_view.post.name} data.post.value.post_view.post.name}