misc: remove externuous elements (#495)
This commit is contained in:
1 parent
e401d76495
commit
5e18fbb0bd
5 files changed
+40
-79
No files matched your search
@@ -176,21 +176,6 @@
|
||||
{/if}
|
||||
{#if actions}
|
||||
<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}
|
||||
<div
|
||||
class="absolute overflow-hidden inset-0
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
class="{!expanded
|
||||
? ` overflow-hidden
|
||||
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}"
|
||||
class:pointer-events-none={!clickThrough}
|
||||
bind:this={element}
|
||||
|
||||
@@ -177,9 +177,7 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<ul
|
||||
class="flex flex-col list-none divide-y divide-slate-200 dark:divide-zinc-800"
|
||||
>
|
||||
<ul class="flex flex-col list-none">
|
||||
{#key posts}
|
||||
{#if posts?.length == 0}
|
||||
<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]
|
||||
? items?.[0]?.start - $virtualizer.options.scrollMargin
|
||||
: 0}px);"
|
||||
class="divide-y divide-slate-200 dark:divide-zinc-900"
|
||||
class="divide-y divide-slate-200 dark:divide-zinc-800"
|
||||
id="feed"
|
||||
>
|
||||
{#each items as row, index (posts[row.index]?.post.id)}
|
||||
|
||||
@@ -37,62 +37,40 @@
|
||||
For embed-type posts. Displays embed card or a compact link.
|
||||
-->
|
||||
{#if embed_title && view != 'compact'}
|
||||
<Material
|
||||
color="distinct"
|
||||
class="flex flex-col-reverse sm:flex-row
|
||||
<a href={url} class="group/link">
|
||||
<Material
|
||||
color="distinct"
|
||||
class="flex flex-col-reverse sm:flex-row
|
||||
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:bg-zinc-950"
|
||||
rounding="2xl"
|
||||
element="article"
|
||||
>
|
||||
{#if thumbnail_url}
|
||||
<img
|
||||
src={optimizeImageURL(thumbnail_url, 64)}
|
||||
alt=""
|
||||
class="-z-10 absolute w-full object-cover h-full opacity-10 brightness-150
|
||||
dark:brightness-90 dark:opacity-20 blur-2xl
|
||||
-inset-px"
|
||||
/>
|
||||
{/if}
|
||||
<div class="flex flex-col gap-2">
|
||||
{#if richURL}
|
||||
<Link
|
||||
href={url}
|
||||
target="_blank"
|
||||
class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium"
|
||||
dark:bg-zinc-950 group-hover/link:bg-slate-100 group-hover/link:dark:bg-zinc-900 transition-colors"
|
||||
rounding="2xl"
|
||||
element="article"
|
||||
>
|
||||
{#if thumbnail_url}
|
||||
<img
|
||||
src={optimizeImageURL(thumbnail_url, 64)}
|
||||
alt=""
|
||||
class="-z-10 absolute w-full object-cover h-full opacity-10 brightness-150
|
||||
dark:brightness-90 dark:opacity-20 blur-2xl -inset-px"
|
||||
/>
|
||||
{/if}
|
||||
<div class="flex flex-col gap-2">
|
||||
{#if richURL}
|
||||
<Link
|
||||
href={url}
|
||||
target="_blank"
|
||||
class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium"
|
||||
>
|
||||
{richURL.hostname}
|
||||
</Link>
|
||||
{/if}
|
||||
<p class="font-medium text-base">{embed_title}</p>
|
||||
</div>
|
||||
{#if thumbnail_url}
|
||||
<picture
|
||||
class="-m-4 mb-auto sm:-mb-4 sm:ml-auto flex-shrink-0 sm:w-1/3 sm:max-w-60"
|
||||
>
|
||||
<Icon
|
||||
src={LinkIcon}
|
||||
size="16"
|
||||
micro
|
||||
class="text-slate-400 dark:text-zinc-600"
|
||||
/>
|
||||
{richURL.hostname}
|
||||
</Link>
|
||||
{/if}
|
||||
<a
|
||||
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>
|
||||
{#if thumbnail_url}
|
||||
<a
|
||||
href={url}
|
||||
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
|
||||
srcset={optimizeImageURL(thumbnail_url, 256)}
|
||||
media="(max-width: 256px)"
|
||||
@@ -107,16 +85,16 @@
|
||||
/>
|
||||
<img
|
||||
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}
|
||||
height={400}
|
||||
alt={embed_title}
|
||||
alt=" "
|
||||
class:blur-3xl={nsfw}
|
||||
/>
|
||||
</picture>
|
||||
</a>
|
||||
{/if}
|
||||
</Material>
|
||||
{/if}
|
||||
</Material>
|
||||
</a>
|
||||
{:else}
|
||||
<Button
|
||||
href={url}
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
{/snippet}
|
||||
</Button>
|
||||
</div>
|
||||
<h1 class="font-bold text-xl font-display leading-5">
|
||||
<h1 class="font-medium text-xl leading-5">
|
||||
<Markdown
|
||||
source={parseTags(data.post.value.post_view.post.name).title ??
|
||||
data.post.value.post_view.post.name}
|
||||
|
||||
Reference in new issue
Block a user