feat: add b lurred backgrounds for images
This commit is contained in:
1 parent
9f6af2a2fb
commit
9f7b03ce97
2 files changed
+12
-5
No files matched your search
@@ -26,16 +26,23 @@
|
||||
<svelte:element
|
||||
this={$userSettings.expandImages ? 'button' : 'a'}
|
||||
href={postLink(post)}
|
||||
class="container mx-auto z-10 rounded-xl max-h-[60vh] relative overflow-hidden bg-slate-100 dark:bg-zinc-900 bg-gradient-to-br from-blue-500/5 to-pink-500/5"
|
||||
class="container mx-auto z-10 rounded-xl max-h-[60vh] relative overflow-hidden bg-slate-100 dark:bg-zinc-900
|
||||
"
|
||||
data-sveltekit-preload-data="off"
|
||||
aria-label={post.name}
|
||||
on:click={() => showImage(bestImageURL(post, false, 2048))}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<img
|
||||
src={bestImageURL(post, false, 256)}
|
||||
loading="lazy"
|
||||
class="-z-10 absolute top-0 left-0 w-full h-full object-cover blur-xl opacity-50"
|
||||
alt="the background blur"
|
||||
/>
|
||||
<picture class="max-h-[inherit]">
|
||||
<source
|
||||
srcset={bestImageURL(post, false, 512)}
|
||||
srcset={bestImageURL(post, false, 256)}
|
||||
media="(max-width: 256px)"
|
||||
/>
|
||||
<source
|
||||
|
||||
Reference in new issue
Block a user