perf: fix major performance issue

This commit is contained in:
Xylight committed 2024-01-02 11:44:01 -08:00
1 parent eb187e61a2
commit 2a254a5a87
2 files changed
+2 -23

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "photon-lemmy", "name": "photon-lemmy",
"version": "1.25.1", "version": "1.25.2",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
@@ -33,31 +33,10 @@
<svelte:element <svelte:element
this={$userSettings.expandImages ? 'div' : 'a'} this={$userSettings.expandImages ? 'div' : 'a'}
href={postLink(post)} href={postLink(post)}
class="container mx-auto z-10 transition-colors rounded-xl max-h-[60vh] relative overflow-hidden" 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"
data-sveltekit-preload-data="off" data-sveltekit-preload-data="off"
aria-label={post.name} aria-label={post.name}
> >
<picture
class="absolute top-1/2 -translate-y-1/2 left-0 w-full
opacity-30 object-cover scale-[1.2] blur-3xl -z-10"
>
<source
srcset={bestImageURL(post, false, 512)}
media="(max-width: 256px)"
/>
<source
srcset={bestImageURL(post, false, 512)}
media="(max-width: 512px)"
/>
<!-- svelte-ignore a11y-missing-attribute -->
<img
src={bestImageURL(post, false, 1024)}
loading="lazy"
class="w-full h-full object-cover rounded-xl blur-3xl z-50"
width={512}
height={300}
/>
</picture>
<picture class="max-h-[inherit]"> <picture class="max-h-[inherit]">
<source <source
srcset={bestImageURL(post, false, 512)} srcset={bestImageURL(post, false, 512)}