Skip to content

Commit

Permalink
feat: attempt image optimisation
Browse files Browse the repository at this point in the history
Signed-off-by: Thaddeus Kuah <[email protected]>
  • Loading branch information
thaddeuskkr committed Feb 24, 2025
1 parent fe45e59 commit 409e2a8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Binary file modified src/assets/portrait.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { Image } from "astro:assets";
import { Picture } from "astro:assets";
import noelGiftsLogo from "../assets/noel-logo.png";
import portraitImage from "../assets/portrait.jpg";
import Navigation from "../components/Navigation.astro";
Expand All @@ -12,11 +12,12 @@ const path = Astro.url.pathname.replace(/\//g, "");
<Navigation active={path} />
<div class="mx-auto mb-16 max-w-5xl px-6">
<div class="flex flex-col items-center justify-center md:flex-row">
<Image
<Picture
src={portraitImage}
alt="Portrait"
class="mb-6 aspect-square max-w-80 rounded-xl md:mr-6 md:mb-0"
loading="eager"
width="500"
densities={[1, 1.5, 2, 2.5, 3]}
/>
<div class="text-center md:text-left">
Expand Down Expand Up @@ -112,7 +113,13 @@ const path = Astro.url.pathname.replace(/\//g, "");
<div class="mb-4 flex flex-col gap-4">
<h2 class="text-xl font-bold">Work Experience</h2>
<div class="flex flex-row items-center gap-4">
<Image src={noelGiftsLogo} alt="Noel Gifts Logo" class="aspect-square size-18" loading="eager" />
<Picture
src={noelGiftsLogo}
alt="Noel Gifts Logo"
class="aspect-square size-18"
width="72"
loading="eager"
/>
<div class="flex flex-col justify-center">
<span class="font-semibold text-zinc-100">Operations Assistant</span>
<span class="text-zinc-200">Noel Gifts International Ltd</span>
Expand Down
1 change: 1 addition & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "../styles/global.css";
alt="Profile"
class="mb-5 aspect-square w-full max-w-full rounded-xl transition-transform"
loading="eager"
width="1000"
densities={[1, 1.5, 2, 2.5, 3]}
/>
<h1 class="mb-2 text-4xl font-semibold whitespace-nowrap text-purple-300">thaddeus kuah</h1>
Expand Down

0 comments on commit 409e2a8

Please sign in to comment.