Repository navigation
Expand file tree
/
Copy pathBento.astro
More file actions
246 lines (232 loc) · 5.1 KB
/
Copy pathBento.astro
File metadata and controls
246 lines (232 loc) · 5.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
---
import Card from '@components/ui/Card.astro'
import jscDia2Acreditacion from '@images/assets/jsconf-chile-2023-dia-2-acreditacion.png'
import jscDia2Evento from '@images/assets/jsconf-chile-2024-dia-2-evento.png'
import { Picture } from 'astro:assets'
const bento1 = [
{
id: 1,
title: '¿Qué es JSConf Chile?',
description:
'JSConf Chile no es solo una conferencia, es un punto de encuentro donde la pasión por JavaScript se convierte en innovación, donde las ideas encuentran su propósito y donde una comunidad unida marca la diferencia.'
},
{
id: 2,
title: 'Sé parte de algo grande',
description:
'JSConf Chile 2025 es más que un evento. Es el lugar donde todo comienza. ¿Estás listo para ser parte del cambio?'
}
]
const bento2 = [
{
id: 1,
title: 'Charlas que inspiran',
description:
'Escucha a quienes están reimaginando el futuro del desarrollo web a nivel mundial.'
},
{
id: 2,
title: 'Conexiones que trascienden',
description:
'Rodéate de personas que comparten tu visión y tu pasión por el código.'
},
{
id: 3,
title: 'Talleres que transforman',
description:
'Aprende practicando, desde los fundamentos hasta las ideas más avanzadas.'
},
{
id: 4,
title: 'Un entorno para crecer',
description:
' Siente la energía de un espacio diseñado para colaborar, crear y soñar en grande.'
}
];
---
<section class="bento-1">
{
bento1.map(({ id, title, description }) => (
<article class={`bento1-card${id}`}>
<Card body={description} title={title} />
</article>
))
}
<div class="bento1-image">
<Picture
alt="JSConf Chile 2024 Día 2 - Evento"
fetchpriority="low"
formats={['avif', 'webp']}
height={446}
src={jscDia2Evento}
width={609}
/>
</div>
</section>
<section class="bento-2">
<div class="bento2-image">
<Picture
alt="JSConf Chile 2023 Día 2 - Acreditación del Evento"
fetchpriority="low"
formats={['avif', 'webp']}
height={508}
src={jscDia2Acreditacion}
width={408}
/>
</div>
{
bento2.map(({ id, title, description }) => (
<article class={`bento2-card${id}`}>
<Card body={description} title={title} />
</article>
))
}
</section>
<style>
.bento-1 {
display: grid;
justify-items: center;
align-items: center;
grid-template-columns: repeat(12, 1fr);
grid-template-rows: 8;
gap: 3rem;
padding-inline: 68px;
}
article {
display: flex;
width: 100%;
height: 100%;
}
.bento1-card1 {
grid-area: 1 / 1 / 5 / 6;
}
.bento1-card2 {
grid-area: 5 / 1 / 8 / 6;
}
.bento1-image {
grid-area: 1 / 6 / 8 / 13;
width: 100%;
height: 100%;
margin: 0;
& img {
width: 100%;
height: 100%;
border-radius: var(--rounded-lg);
aspect-ratio: 609/446;
object-fit: cover;
}
}
figcaption {
display: none;
}
.bento-2 {
display: grid;
justify-items: center;
align-items: center;
grid-template-columns: repeat(17, 1fr);
grid-template-rows: 8;
margin-top: 100px;
gap: 3rem;
padding-inline: 68px;
}
.bento2-image {
grid-area: 1 / 1 / 8 / 8;
width: 100%;
height: 100%;
margin: 0;
& img {
width: 100%;
height: 100%;
border-radius: var(--rounded-lg);
aspect-ratio: 484/508;
object-fit: cover;
}
}
.bento2-card1 {
grid-area: 1 / 8 / 4 / 13;
}
.bento2-card2 {
grid-area: 1 / 13 / 4 / 18;
}
.bento2-card3 {
grid-area: 4 / 8 / 8 / 13;
}
.bento2-card4 {
grid-area: 4 / 13 / 8 / 18;
}
@media (width <= 1024px) {
.bento-1 {
grid-template-columns: 1fr;
grid-template-rows: repeat(3, auto);
padding-inline: 48px;
}
.bento1-card1 {
grid-area: 1 / 1 / 2 / 2;
}
.bento1-card2 {
grid-area: 2 / 1 / 3 / 2;
}
.bento1-image {
grid-area: 3 / 1 / 4 / 2;
& img {
aspect-ratio: 738/345;
}
}
.bento-2 {
grid-template-columns: repeat(2, auto);
grid-template-rows: repeat(3, auto);
padding-inline: 48px;
}
.bento2-card1 {
grid-area: 1 / 1 / 2 / 2;
}
.bento2-card2 {
grid-area: 2 / 1 / 3 / 2;
}
.bento2-card3 {
grid-area: 1 / 2 / 2 / 3;
}
.bento2-card4 {
grid-area: 2 / 2 / 3 / 3;
}
.bento2-image {
grid-area: 3 / 1 / 4 / 3;
& img {
aspect-ratio: 738/362;
}
}
}
@media (width <= 768px) {
.bento-1 {
padding-inline: 24px;
}
.bento1-image {
& img {
aspect-ratio: 1/1;
}
}
.bento-2 {
grid-template-columns: 1fr;
grid-template-rows: repeat(5, auto);
padding-inline: 24px;
}
.bento2-card1 {
grid-area: 1 / 1 / 2 / 2;
}
.bento2-card2 {
grid-area: 2 / 1 / 3 / 2;
}
.bento2-card3 {
grid-area: 3 / 1 / 4 / 2;
}
.bento2-card4 {
grid-area: 4 / 1 / 5 / 2;
}
.bento2-image {
grid-area: 5 / 1 / 6 / 2;
& img {
aspect-ratio: 738/362;
}
}
}
</style>