Skip to content

Commit

Permalink
- added lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Hetarth02 committed Sep 15, 2024
1 parent a259e4d commit 3f41f0e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
14 changes: 12 additions & 2 deletions source/src/routes/home-partials/HomeFeatures.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@
{#each skills[category] as feature}
<div class="block sm:hidden">
<span class="btn-icon" title={feature.title}>
<img src={feature.icon} class="w-full h-full" alt="Skills" />
<img
src={feature.icon}
class="w-full h-full"
alt="Skills"
loading="lazy"
/>
</span>
</div>

Expand All @@ -195,7 +200,12 @@
title="feature"
>
<span class="btn-icon">
<img src={feature.icon} class="w-full h-full" alt="Skills" />
<img
src={feature.icon}
class="w-full h-full"
alt="Skills"
loading="lazy"
/>
</span>
<span class="text-sm">{feature.title}</span>
</div>
Expand Down
1 change: 1 addition & 0 deletions source/src/routes/home-partials/HomeSvelteKit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
src={bookImg}
class="bg-black/50 object-contain sm:object-cover w-full h-[350px]"
alt="Post"
loading="lazy"
/>
</header>
<div class="p-4 space-y-4 sm:w-[70%]">
Expand Down
3 changes: 3 additions & 0 deletions source/src/routes/home-partials/HomeTailwind.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
src={githubImg}
class="bg-black/50 w-full h-1/2 aspect-[21/9] object-cover"
alt="Svelsa"
loading="lazy"
/>
</header>
<div class="p-4 space-y-4">
Expand Down Expand Up @@ -66,6 +67,7 @@
src={snipImg}
class="bg-black/50 w-full h-1/2 aspect-[21/9] object-cover"
alt="Snippet Sauce"
loading="lazy"
/>
</header>
<div class="p-4 space-y-4">
Expand Down Expand Up @@ -109,6 +111,7 @@
src={knnImg}
class="bg-black/50 w-full h-1/2 aspect-[21/9] object-cover"
alt="Post"
loading="lazy"
/>
</header>
<div class="p-4 space-y-4">
Expand Down
7 changes: 6 additions & 1 deletion source/src/routes/home-partials/HomeTheming.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@
.base}"
>
<header class={themeStyles[theme].header}>
<img src={themeStyles[theme].src} class={themeStyles[theme].img} alt="Companies" />
<img
src={themeStyles[theme].src}
class={themeStyles[theme].img}
alt="Companies"
loading="lazy"
/>
<div class="col-span-2 space-y-2">
<div class={themeStyles[theme].text2}>
{themeStyles[theme].text2_content}
Expand Down

0 comments on commit 3f41f0e

Please sign in to comment.