Skip to content

Commit 34fb275

Browse files
feat: Optimize image processing and performance
- Implement WebP image format conversion - Reduce image file sizes through compression - Improve overall performance optimizations
1 parent c16db44 commit 34fb275

21 files changed

+245
-204
lines changed

output.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
11.5 KB
Loading
-384 KB
Binary file not shown.
11.3 KB
Loading
-368 KB
Binary file not shown.
8.43 KB
Loading
-313 KB
Binary file not shown.
6.55 KB
Binary file not shown.

src/images/github/desktop.png

-695 KB
Binary file not shown.

src/images/github/desktop.webp

127 KB
Binary file not shown.

src/images/github/mobile.png

-498 KB
Binary file not shown.

src/images/github/mobile.webp

79.7 KB
Binary file not shown.

src/images/github/profile.jpeg

-22.3 KB
Binary file not shown.

src/images/github/profile.jpg

10 KB
Loading

src/images/logos/meta-logo.png

-15.3 KB
Binary file not shown.

src/index.html

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,8 @@ <h1 class="title h-full min-h-[3.7em] sm:min-h-[2.5em] leading-tight">
573573
<div>510</div>
574574
</div>
575575
<pre
576-
class="code-content"
576+
class="code-content lazy"
577+
loading="lazy"
577578
id="code-content"
578579
><code class="html-code">&lt;<span class="tag">section</span> <span class="attr">id</span>=<span class="string">"home"</span> <span class="attr">class</span>=<span class="string">"flex flex-row flex-wrap w-full h-auto justify-center items-center mx-auto px-4 gap-8"</span>&gt;
579580
&lt;<span class="tag">div</span> <span class="attr">class</span>=<span class="string">"home-info flex flex-col w-full max-w-xl gap-6"</span>&gt;
@@ -778,7 +779,7 @@ <h2 class="title w-full text-left">My Github</h2>
778779
class="github-self__titles flex flex-row flex-wrap items-center justify-start gap-4"
779780
>
780781
<img
781-
src="images/github/profile.jpeg"
782+
src="images/github/profile.jpg"
782783
alt="Github Profile"
783784
class="max-w-12 max-h-12 rounded-full"
784785
/>
@@ -827,14 +828,14 @@ <h2 class="title w-full text-left">My Github</h2>
827828
<!-- Desktop -->
828829
<img
829830
class="github-desktop hidden lg:block max-w-xl"
830-
src="images/github/desktop.png"
831+
src="images/github/desktop.webp"
831832
alt="Github Section's Background"
832833
loading="lazy"
833834
/>
834835
<!-- Mobile -->
835836
<img
836837
class="github-mobile lg:hidden min-w-[175%]"
837-
src="images/github/mobile.png"
838+
src="images/github/mobile.webp"
838839
alt="Github Section's Background"
839840
loading="lazy"
840841
/>
@@ -852,21 +853,34 @@ <h2 class="title w-full text-left">My Github</h2>
852853
<div
853854
class="flex flex-row items-start justify-center flex-wrap lg:flex-nowrap gap-4"
854855
>
855-
<div class="touch-graphic min-w-64 max-w-md">
856-
<creattie-embed
857-
src="https://d1jj76g3lut4fe.cloudfront.net/saved_colors/100163/JClZL6y5QqPVOpgd.json"
858-
delay="1"
859-
speed="100"
860-
frame_rate="24"
861-
trigger="loop"
862-
loading="lazy"
863-
class="bg-transparent"
864-
>
865-
</creattie-embed>
866-
<script
867-
src="https://creattie.com/js/embed.js?id=3f6954fde297cd31b441"
868-
defer
869-
></script>
856+
<div
857+
class="touch-graphic animation-placeholder min-w-64 max-w-md"
858+
id="creattie-container2"
859+
>
860+
<script>
861+
window.addEventListener("load", function () {
862+
const script = document.createElement("script");
863+
script.src =
864+
"https://creattie.com/js/embed.js?id=3f6954fde297cd31b441";
865+
document.body.appendChild(script);
866+
867+
const animation = document.createElement("creattie-embed");
868+
animation.setAttribute(
869+
"src",
870+
"https://d1jj76g3lut4fe.cloudfront.net/saved_colors/100163/meEdlyNeNjLyCUVm.json"
871+
);
872+
animation.setAttribute("delay", "1");
873+
animation.setAttribute("speed", "100");
874+
animation.setAttribute("loading", "lazy");
875+
animation.setAttribute("frame_rate", "24");
876+
animation.setAttribute("trigger", "loop");
877+
animation.className = "bg-transparent";
878+
879+
document
880+
.getElementById("creattie-container2")
881+
.appendChild(animation);
882+
});
883+
</script>
870884
</div>
871885
<div
872886
class="touch-context w-full flex flex-col gap-6 md:gap-12 text-priBlue dark:text-primary"

src/js/data.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ const certificatesData = [
149149
earnedOn: "Jul 7, 2024",
150150
verifyLink: "https://www.coursera.org/account/accomplishments/verify/HF7Y6KJLLGK9",
151151
downloadPath: "images/certificates/pdf/cer-IFD.pdf",
152-
imagePath: "images/certificates/png/cer-IFD.png",
152+
imagePath: "images/certificates/png/cer-IFD.jpg",
153153
imageAlt: "Coursera Certificate - Introduction to Front-end Development",
154-
providerLogo: "images/logos/meta-logo.png"
154+
providerLogo: "images/certificates/provider/meta-logo.webp"
155155
},
156156
{
157157
title: "Programming with JavaScript",
@@ -160,9 +160,9 @@ const certificatesData = [
160160
earnedOn: "Jan 25, 2025",
161161
verifyLink: "https://www.coursera.org/account/accomplishments/verify/C8G31UOCMO46",
162162
downloadPath: "images/certificates/pdf/cer-JS.pdf",
163-
imagePath: "images/certificates/png/cer-js.png",
163+
imagePath: "images/certificates/png/cer-js.jpg",
164164
imageAlt: "Coursera Certificate - Programming with JavaScript",
165-
providerLogo: "images/logos/meta-logo.png"
165+
providerLogo: "images/certificates/provider/meta-logo.webp"
166166
},
167167
{
168168
title: "Version Control",
@@ -171,9 +171,9 @@ const certificatesData = [
171171
earnedOn: "Mar 3, 2025",
172172
verifyLink: "https://www.coursera.org/account/accomplishments/verify/0XEJ04PVV5ZW",
173173
downloadPath: "images/certificates/pdf/cer-VC.pdf",
174-
imagePath: "images/certificates/png/cer-VC.png",
174+
imagePath: "images/certificates/png/cer-VC.jpg",
175175
imageAlt: "Coursera Certificate - Version Control",
176-
providerLogo: "images/logos/meta-logo.png"
176+
providerLogo: "images/certificates/provider/meta-logo.webp"
177177
},
178178
];
179179

src/js/generator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function createMobileSkillCard(skill) {
5555
card.innerHTML = `
5656
<div class="px-4 py-3 border-b border-gray-200 dark:border-gray-700">
5757
<div class="flex items-center gap-3">
58-
<img src="${skill.icon}" alt="${skill.name}" title="${skill.name}" class="w-6 h-6" />
58+
<img src="${skill.icon}" loading="lazy" alt="${skill.name}" title="${skill.name}" class="w-6 h-6" />
5959
<h4 class="font-medium text-gray-900 dark:text-white">${skill.name}</h4>
6060
</div>
6161
<div class="mt-2">
@@ -108,7 +108,7 @@ function createDesktopSkillRow(skill) {
108108

109109
row.innerHTML = `
110110
<th scope="row" class="flex flex-row items-center gap-3 px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
111-
<img src="${skill.icon}" alt="${skill.name}" title="${skill.name}" class="w-6 h-6" />
111+
<img src="${skill.icon}" loading="lazy" alt="${skill.name}" title="${skill.name}" class="w-6 h-6" />
112112
${skill.fullName}
113113
</th>
114114
<td class="px-6 py-4">
@@ -174,7 +174,7 @@ function createCertificateCard(cert) {
174174
<div class="cer-context h-full w-full flex flex-col gap-2 justify-between">
175175
<div class="flex flex-col gap-2 flex-1">
176176
<p class="cer-earnDate text-sm">Earned on <b>${cert.earnedOn}</b></p>
177-
<div class="cer-logo bg-white px-2 py-1 w-[4.5rem] rounded-full">
177+
<div class="cer-logo w-20 py-1 px-2 bg-white rounded-full">
178178
<img src="${cert.providerLogo}" alt="${cert.provider} Logo" />
179179
</div>
180180
<a title="verify link" href="${cert.verifyLink}" class="cer-title font-mont-bold leading-5 hover:underline" target="_blank">

0 commit comments

Comments
 (0)