📦 Added height and width properties for img tags containing svgs

This commit is contained in:
ivanosquis10
2024-01-23 17:38:10 -04:00
parent 41e5a618de
commit 8ee5c62b72
+12
View File
@@ -132,6 +132,10 @@
// Icon Stroke & Size: // Icon Stroke & Size:
let iconStroke = 1.8; let iconStroke = 1.8;
let iconSize = 16; let iconSize = 16;
// Width & Height of <img>:
const width = 40;
const height = 40;
</script> </script>
<CardSpotlight> <CardSpotlight>
@@ -146,6 +150,8 @@
alt={svgInfo.title} alt={svgInfo.title}
title={svgInfo.title} title={svgInfo.title}
loading="lazy" loading="lazy"
{width}
{height}
/> />
<img <img
class="block dark:hidden mb-4 mt-2 h-10" class="block dark:hidden mb-4 mt-2 h-10"
@@ -155,6 +161,8 @@
alt={svgInfo.title} alt={svgInfo.title}
title={svgInfo.title} title={svgInfo.title}
loading="lazy" loading="lazy"
{width}
{height}
/> />
{:else} {:else}
<img <img
@@ -163,6 +171,8 @@
alt={svgInfo.title} alt={svgInfo.title}
title={svgInfo.title} title={svgInfo.title}
loading="lazy" loading="lazy"
{width}
{height}
/> />
<img <img
class="block dark:hidden mb-4 mt-2 h-10" class="block dark:hidden mb-4 mt-2 h-10"
@@ -170,6 +180,8 @@
alt={svgInfo.title} alt={svgInfo.title}
title={svgInfo.title} title={svgInfo.title}
loading="lazy" loading="lazy"
{width}
{height}
/> />
{/if} {/if}
<!-- Title --> <!-- Title -->