design: add indicator to post link to improve mind connection
This commit is contained in:
3 files changed
+20
-4
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
import type { View } from '$lib/app/settings.svelte'
|
import type { View } from '$lib/app/settings.svelte'
|
||||||
import { parseURL } from '$lib/ui/form/Link.svelte'
|
import { parseURL } from '$lib/ui/form/Link.svelte'
|
||||||
import { Material } from 'mono-svelte'
|
import { Material } from 'mono-svelte'
|
||||||
import { Icon, Link } from 'svelte-hero-icons/dist'
|
import { ArrowTopRightOnSquare, Icon, Link } from 'svelte-hero-icons/dist'
|
||||||
import { optimizeImageURL } from './helpers'
|
import { optimizeImageURL } from './helpers'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -50,7 +50,8 @@
|
|||||||
<p class="post-link-title">{embed_title}</p>
|
<p class="post-link-title">{embed_title}</p>
|
||||||
</div>
|
</div>
|
||||||
{#if thumbnail_url}
|
{#if thumbnail_url}
|
||||||
<picture class="post-link-image">
|
<div class="post-link-image">
|
||||||
|
<picture class="contents">
|
||||||
{#each ['webp'] as format}
|
{#each ['webp'] as format}
|
||||||
<source
|
<source
|
||||||
srcset="{optimizeImageURL(
|
srcset="{optimizeImageURL(
|
||||||
@@ -75,6 +76,20 @@
|
|||||||
class:blur-3xl={nsfw}
|
class:blur-3xl={nsfw}
|
||||||
/>
|
/>
|
||||||
</picture>
|
</picture>
|
||||||
|
<Material
|
||||||
|
padding="xs"
|
||||||
|
color="uniform"
|
||||||
|
class="absolute top-0 right-0 m-2 z-50"
|
||||||
|
role="presentation"
|
||||||
|
>
|
||||||
|
<Icon
|
||||||
|
src={ArrowTopRightOnSquare}
|
||||||
|
size="16"
|
||||||
|
micro
|
||||||
|
class="text-slate-500 dark:text-zinc-300"
|
||||||
|
/>
|
||||||
|
</Material>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</Material>
|
</Material>
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -54,8 +54,8 @@
|
|||||||
ul {
|
ul {
|
||||||
:global {
|
:global {
|
||||||
:where(& > :not(:last-child)) {
|
:where(& > :not(:last-child)) {
|
||||||
margin-block-start: calc(calc(var(--spacing) * 0.75));
|
margin-block-start: calc(calc(var(--spacing) * 1));
|
||||||
margin-block-end: calc(calc(var(--spacing) * 0.75));
|
margin-block-end: calc(calc(var(--spacing) * 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
const paddingClass = {
|
const paddingClass = {
|
||||||
none: '',
|
none: '',
|
||||||
|
xs: 'p-1.5',
|
||||||
sm: 'p-2',
|
sm: 'p-2',
|
||||||
md: 'p-4',
|
md: 'p-4',
|
||||||
lg: 'p-5',
|
lg: 'p-5',
|
||||||
|
|||||||
Reference in new issue
Block a user