1
1
---
2
+ import CodeIcon from ' @components/icons/code-icon.astro' ;
2
3
import ExternalIcon from ' @components/icons/external-icon.astro' ;
3
4
import GithubIcon from ' @components/icons/github-icon.astro' ;
4
5
import { getI18n } from ' @i18n/index' ;
@@ -10,15 +11,18 @@ const projects = i18n.PORTFOLIO_SECTION.PROJECTS;
10
11
---
11
12
12
13
<section id =" portfolio" >
13
- <span class =" title" >{ i18n .PORTFOLIO_SECTION .TITLE } 💼</span >
14
+ <span class =" title" >
15
+ <CodeIcon />
16
+ { i18n .PORTFOLIO_SECTION .TITLE }
17
+ </span >
14
18
15
19
<div class =" projects" >
16
20
{
17
21
projects .map ((project ) => (
18
22
<div class = " project" >
19
23
<a href = { project .urlProduction } target = " _blank" aria-label = " project-preview" >
20
- <picture >
21
- <img src = { project .image } alt = " project-preview" loading = " lazy" >
24
+ <picture class = " project-preview " >
25
+ <img src = { ` /${ project .image } ` } alt = " project-preview" loading = " lazy" >
22
26
</picture >
23
27
</a >
24
28
<div class = " description" >
@@ -27,10 +31,12 @@ const projects = i18n.PORTFOLIO_SECTION.PROJECTS;
27
31
<div class = " technologies" >
28
32
{
29
33
project .technologies .map ((technology ) => (
30
- <img
31
- src = { ` images/${technology .image } ` }
32
- alt = { ` ${technology .name } tool used in the project ` }
33
- loading = " lazy" >
34
+ <picture class = " technology" >
35
+ <img
36
+ src = { ` /images/${technology .image } ` }
37
+ alt = { ` ${technology .name } tool used in the project ` }
38
+ loading = " lazy" >
39
+ </picture >
34
40
))
35
41
}
36
42
</div >
@@ -72,11 +78,6 @@ const projects = i18n.PORTFOLIO_SECTION.PROJECTS;
72
78
</section >
73
79
74
80
<style >
75
- section#portfolio {
76
- position : relative ;
77
- width : 100 % ;
78
- }
79
-
80
81
.more {
81
82
display : flex ;
82
83
align - items : center ;
@@ -99,12 +100,18 @@ const projects = i18n.PORTFOLIO_SECTION.PROJECTS;
99
100
gap : 2rem ;
100
101
}
101
102
102
- .project picture {
103
+ .description .technologies img {
104
+ width : 100 % ;
105
+ height : 100 % ;
106
+ object - fit : cover ;
107
+ }
108
+
109
+ .project picture.project-preview {
103
110
border - radius : 1rem ;
104
111
overflow : hidden ;
105
112
}
106
113
107
- .project picture img {
114
+ .project picture.project-preview img {
108
115
min - height : inherit ;
109
116
width : 100 % ;
110
117
height : 100 % ;
@@ -113,10 +120,10 @@ const projects = i18n.PORTFOLIO_SECTION.PROJECTS;
113
120
transition : 0.3s ease ;
114
121
}
115
122
116
- .description .technologies img {
117
- width : 100 % ;
123
+ .description .technologies .technology {
118
124
height : 2.1rem ;
119
- object - fit : cover ;
125
+ border - radius : 0.5rem ;
126
+ overflow : hidden ;
120
127
}
121
128
122
129
.project picture img:hover {
@@ -187,14 +194,18 @@ const projects = i18n.PORTFOLIO_SECTION.PROJECTS;
187
194
gap : 1.8rem ;
188
195
}
189
196
190
- .project picture {
197
+ .description .technologies img {
198
+ height: 1.5rem ;
199
+ }
200
+
201
+ .project picture .project - preview {
191
202
width: 100 % ;
192
203
height : 100 % ;
193
204
margin - bottom : 1rem ;
194
205
border - radius : 0.8rem ;
195
206
}
196
207
197
- .project picture img {
208
+ .project picture . project - preview img {
198
209
transform: translate (0 , 0 );
199
210
}
200
211
@@ -217,10 +228,6 @@ const projects = i18n.PORTFOLIO_SECTION.PROJECTS;
217
228
gap : 0.5rem ;
218
229
}
219
230
220
- .description .technologies img {
221
- height: 1.5rem ;
222
- }
223
-
224
231
.description .links {
225
232
flex-direction: row ;
226
233
flex - wrap : wrap ;
0 commit comments