Skip to content

Commit b2692c9

Browse files
committed
chore/image optimizations
chore/gerardo ancer portfolio chore/css cleanup
1 parent 16a9bca commit b2692c9

9 files changed

Lines changed: 17 additions & 7 deletions

File tree

1.41 MB
Loading

src/components/HeaderProfile.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import "../styles/HeaderProfile.scss";
2+
import { getImage } from "astro:assets";
23
import Box from "./Box";
4+
import profileImg from "@/assets/images/profile.png";
5+
6+
const profileImage = await getImage({src: profileImg, format: 'avif'});
37

48
function HeaderProfile() {
59
return (
610
<Box className="header-profile !backdrop-blur-none p-5 !bg-secondary/0">
711
<Box className="aspect-square !rounded-full max-w-xs self-center profile-container">
8-
<div className="profile aspect-square w-full rounded-full" />
12+
<div style={{backgroundImage: `url('${profileImage.src}')`}} className="profile aspect-square w-full rounded-full" />
913
</Box>
1014
</Box>
1115
);

src/components/MainBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function MainBody({ projects }: { projects: Project[] }) {
9292
>
9393
<span>{project.name}</span>
9494
<img
95-
className="w-full rounded-sm object-contain transition-transform duration-200 delay-150 my-2"
95+
className="w-full rounded-[4px] object-contain transition-transform duration-200 delay-150 my-2"
9696
src={project.image.src}
9797
alt={project.name}
9898
/>

src/pages/index.astro

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
22
import Layout from "@/layouts/Layout.astro"
33
import MainBody from "@/components/MainBody"
4-
import sorteosClickImage from "@/images/sorteos.click.png"
5-
import autosolutionsImage from "@/images/autosolutions.app.png"
6-
import enerlinqImage from "@/images/enerlinq.com.png"
4+
import sorteosClickImage from "@/assets/images/sorteos.click.png"
5+
import autosolutionsImage from "@/assets/images/autosolutions.app.png"
6+
import enerlinqImage from "@/assets/images/enerlinq.com.png"
7+
import gerardoAncerImage from "@/assets/images/gerardoancer.com.png"
78
import { getImage } from "astro:assets"
89
910
const projects = [
1011
{
1112
name: 'Enerlinq',
1213
url: 'https://enerlinq.com',
13-
description: 'Technology and innovation lab. Startup company.',
14+
description: 'Technology and innovation startup company.',
1415
image: await getImage({src: enerlinqImage, format: 'avif'}),
1516
},
1617
{
@@ -25,6 +26,12 @@ const projects = [
2526
description: 'Create and manage your own raffles for FREE.',
2627
image: await getImage({src: sorteosClickImage, format: 'avif'}),
2728
},
29+
{
30+
name: 'Gerardo Ancer portfolio',
31+
url: 'https://gerardoancer.com',
32+
description: 'Portfolio website for Gerardo Ancer.',
33+
image: await getImage({src: gerardoAncerImage, format: 'avif'}),
34+
}
2835
]
2936
---
3037

src/styles/HeaderProfile.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
direction: ltr;
1414

1515
& .profile {
16-
background-image: url("/images/profile.png");
1716
background-size: 125%;
1817
background-position: top center;
1918
opacity: 90%;

0 commit comments

Comments
 (0)