design: improve MdImage.svelte consistency

This commit is contained in:
Xylight committed 2025-09-23 17:52:26 -07:00
1 parent 17d259de9c
commit 0cd0f3544f
1 file changed
+7 -5
@@ -27,8 +27,7 @@
</script> </script>
<div <div
class="w-auto h-auto max-h-96 rounded-2xl p-2 border border-slate-200 dark:border-zinc-800 class="w-auto h-auto max-h-96 rounded-xl border border-slate-200 dark:border-zinc-800 inline-block group"
inline-block"
> >
{#if loaded} {#if loaded}
{#if type == 'video' || type == 'embed' || type == 'iframe'} {#if type == 'video' || type == 'embed' || type == 'iframe'}
@@ -37,11 +36,11 @@
url={href} url={href}
opened={true} opened={true}
autoplay={false} autoplay={false}
class="w-auto h-auto max-h-80 inline-block rounded-lg cursor-pointer" class="w-auto h-auto max-h-80 inline-block rounded-[inherit] cursor-pointer"
/> />
{:else} {:else}
<button <button
class="inline cursor-pointer" class="inline cursor-pointer bg-slate-200 dark:bg-zinc-800 rounded-[inherit]"
onclick={() => showImage(optimizeImageURL(href, -1))} onclick={() => showImage(optimizeImageURL(href, -1))}
> >
<img <img
@@ -50,7 +49,10 @@
alt={text} alt={text}
width={300} width={300}
height={300} height={300}
class="object-contain w-auto h-auto max-h-80 inline rounded-lg" class={[
'object-contain w-auto h-auto max-h-80 inline rounded-[inherit] group-hover:scale-98 group-active:scale-95',
'transition-transform ease-cubic',
]}
/> />
</button> </button>
{/if} {/if}