diff --git a/src/lib/feature/post/PostLink.svelte b/src/lib/feature/post/PostLink.svelte index 5c5c80f4..317f4026 100644 --- a/src/lib/feature/post/PostLink.svelte +++ b/src/lib/feature/post/PostLink.svelte @@ -2,7 +2,7 @@ import type { View } from '$lib/app/settings.svelte' import { parseURL } from '$lib/ui/form/Link.svelte' import { Material } from 'mono-svelte' - import { ArrowTopRightOnSquare, Icon, Link } from 'svelte-hero-icons/dist' + import { Icon, Link } from 'svelte-hero-icons/dist' import { optimizeImageURL } from './helpers' interface Props { @@ -10,6 +10,7 @@ thumbnail_url?: string nsfw?: boolean embed_title?: string + embed_body?: string view?: View } @@ -18,6 +19,7 @@ thumbnail_url, nsfw = false, embed_title, + embed_body, view = 'cozy', }: Props = $props() @@ -34,7 +36,7 @@ class={[ 'post-link group/link hover:bg-slate-50 hover:dark:bg-zinc-800 transition-colors', ]} - rounding="xl" + rounding="2xl" element="a" padding="none" href={url} @@ -48,6 +50,11 @@ {/if}

{embed_title}

+ {#if embed_body} +

+ {embed_body?.slice(0, 200)}{#if embed_body.length >= 200}...{/if} +

+ {/if} {#if thumbnail_url}
@@ -76,19 +83,6 @@ class:blur-3xl={nsfw} /> - - -
{/if} @@ -154,6 +148,15 @@ max-width: calc(var(--spacing) * 108); } + .post-link-body { + color: var(--color-slate-500); + overflow: hidden; + max-height: 100%; + @variant dark { + color: var(--color-zinc-500); + } + } + .post-link-image { flex-shrink: 0; margin-bottom: auto; diff --git a/src/lib/feature/post/PostVote.svelte b/src/lib/feature/post/PostVote.svelte index 226930c0..1062483f 100644 --- a/src/lib/feature/post/PostVote.svelte +++ b/src/lib/feature/post/PostVote.svelte @@ -94,7 +94,6 @@ onclick={() => castVote(vote == targetNum ? 0 : targetNum)} class={[ 'flex items-center gap-0.5 transition-colors relative cursor-pointer h-full p-2', - 'first:rounded-l-[inherit] last:rounded-r-[inherit]', 'last:flex-row-reverse', vote == targetNum ? shouldShowVoteColor( @@ -138,7 +137,7 @@
diff --git a/src/lib/feature/post/media/PostMedia.svelte b/src/lib/feature/post/media/PostMedia.svelte index 3cc9f84d..4d113f6c 100644 --- a/src/lib/feature/post/media/PostMedia.svelte +++ b/src/lib/feature/post/media/PostMedia.svelte @@ -25,7 +25,7 @@ }: Props = $props() - @@ -61,12 +61,12 @@
{#if post.thumbnail_url || type == 'image'} {@const thumbnail = post.thumbnail_url != undefined && type != 'image'} - + {#each ['webp'] as format} {#if type != 'image'} -
+
{/if} @@ -150,6 +146,7 @@
diff --git a/src/lib/ui/form/FreeTextInput.svelte b/src/lib/ui/form/FreeTextInput.svelte index 2018d5bf..f4230c27 100644 --- a/src/lib/ui/form/FreeTextInput.svelte +++ b/src/lib/ui/form/FreeTextInput.svelte @@ -1,8 +1,8 @@ @@ -17,14 +19,13 @@
{/if}
- {#if editingName} -
{ - e.preventDefault() - editingName = false - }} - > - -
- {:else} - - {/if} + + {theme.name} + {#if theme.id > 0}