Skip to content

Commit 00d9bd2

Browse files
committed
Add links to workshop videos
1 parent dc6f356 commit 00d9bd2

File tree

2 files changed

+63
-49
lines changed

2 files changed

+63
-49
lines changed

src/components/WorkshopDetail.astro

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
import { Image } from "astro:assets"
3+
4+
const { time, title, img, speaker, position } = Astro.props
5+
---
6+
7+
<div class="flex flex-col space-y-1 md:flex-row md:space-x-4">
8+
<div class="w-full md:w-28 bg-blue-500 flex items-center p-1">
9+
<p class="font-medium md:text-xl mx-auto text-center">{time}</p>
10+
</div>
11+
12+
<div class="space-y-0">
13+
<h3 class="text-lg md:text-2xl font-bold leading-tight mb-2">{title}</h3>
14+
<div class="flex space-x-4 items-start">
15+
<Image src={img} alt={speaker} class="aspect-square object-cover" width="60" height="60" />
16+
<div class="leading-tight">
17+
<p class="font-medium md:text-lg">{speaker}</p>
18+
<p class="md:text-lg">{position}</p>
19+
</div>
20+
</div>
21+
</div>
22+
</div>

src/components/Workshops.astro

Lines changed: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
---
2+
import WorkshopDetail from "./WorkshopDetail.astro"
3+
24
import angel from "../assets/images/workshops/Angel-Bulnes.jpg"
35
import julio from "../assets/images/workshops/Julio-Colque.jpg"
46
57
import aaron from "../assets/images/workshops/Aaron-Guerrero.jpeg"
6-
import mauro from "../assets/images/workshops/Mauro-Gomez.jpeg"
78
import vanesa from "../assets/images/workshops/Vanesa-Velasquez.png"
89
import julioCesar from "../assets/images/workshops/Julio-Cesar-Ruiz.jpg"
910
1011
const workshops = [
1112
{
1213
date: "Vie. 19 abril 2024",
14+
links: [
15+
"https://www.facebook.com/gdgsucre/videos/1605607886943684/",
16+
"https://www.facebook.com/GDGCochabamba/videos/1111880593455642/",
17+
"https://www.facebook.com/GDGSantaCruz/videos/434220749257476/",
18+
],
1319
details: [
1420
{
1521
time: "20:00 (GMT-4)",
@@ -29,6 +35,11 @@ const workshops = [
2935
},
3036
{
3137
date: "Mar. 23 abril 2024",
38+
links: [
39+
"https://www.facebook.com/GDGSantaCruz/videos/980815600258593/",
40+
"https://www.facebook.com/gdgsucre/videos/1661837077980123/",
41+
"https://www.facebook.com/GDGCochabamba/videos/956867209435782/",
42+
],
3243
details: [
3344
{
3445
time: "20:00 (GMT-4)",
@@ -38,73 +49,54 @@ const workshops = [
3849
position: "Cloud Developer",
3950
},
4051
{
41-
time: "20:30 (GMT-4)",
42-
title: "Google Gemini y Gemma: El inicio de una nueva era en IA",
43-
img: mauro,
44-
speaker: "Mauro Gómez Herrera 🇨🇱",
45-
position: "CEO de PyxJam",
52+
time: "20:45 (GMT-4)",
53+
title: "Desarrollando producto en Tecnología con IA",
54+
img: julioCesar,
55+
speaker: "Julio César Ruiz Tejada 🇵🇦",
56+
position: "Ingeniero en Sistema y Computación",
4657
},
4758
{
48-
time: "21:00 (GMT-4)",
59+
time: "21:30 (GMT-4)",
4960
title: "ChatBot WhatsApp con IA Gemini ✨ de Google",
5061
img: vanesa,
5162
speaker: "Vanesa Velasquez 🇧🇴",
5263
position: "Ingeniera de sistemas",
5364
},
54-
{
55-
time: "21:30 (GMT-4)",
56-
title: "Desarrollando producto en Tecnología con IA",
57-
img: julioCesar,
58-
speaker: "Julio César Ruiz Tejada 🇵🇦",
59-
position: "Ingeniero en Sistema y Computación",
60-
},
6165
],
6266
},
6367
]
64-
65-
import { Image } from "astro:assets"
6668
---
6769

6870
<div id="talleres" class="bg-black text-white">
6971
<div class="max-w-screen-xl mx-auto px-4 py-8 space-y-4">
7072
<h2 class="text-2xl sm:text-3xl font-bold mx-auto">Talleres previos</h2>
7173

7274
{
73-
workshops.map(({ date, details }) => (
74-
<div class="space-y-4">
75-
<div class="flex items-center space-x-4">
76-
<span class="w-60 md:w-fit text-nowrap font-bold mt-2 text-lg md:text-2xl md:text">
77-
{date}
78-
</span>
79-
<hr class="w-full border-blue-400" />
80-
</div>
81-
82-
{details?.map(({ time, title, img, speaker, position }) => (
83-
<div class="flex flex-col space-y-1 md:flex-row md:space-x-4">
84-
<div class="w-full md:w-28 bg-blue-500 flex items-center p-1">
85-
<p class="font-medium md:text-xl mx-auto text-center">{time}</p>
86-
</div>
75+
workshops.map(({ date, links, details }) => {
76+
// choose a random link to avoid favoring any particular chapter
77+
const videoLink = links[Math.floor(Math.random() * links.length)]
8778

88-
<div class="space-y-2 pb-2">
89-
<h3 class="text-lg md:text-2xl font-bold leading-tight">{title}</h3>
90-
<div class="flex space-x-4 items-start">
91-
<Image
92-
src={img}
93-
alt={speaker}
94-
class="aspect-square object-cover"
95-
width="60"
96-
height="60"
97-
/>
98-
<div class="leading-tight">
99-
<p class="font-medium md:text-lg">{speaker}</p>
100-
<p class="md:text-lg">{position}</p>
101-
</div>
102-
</div>
103-
</div>
79+
return (
80+
<div class="space-y-4">
81+
<div class="flex items-center space-x-4 mt-6">
82+
<span class="w-60 md:w-fit text-nowrap font-bold text-lg md:text-2xl">{date}</span>
83+
<hr class="w-full border-blue-500" />
84+
<a
85+
target="_blank"
86+
rel="noopener noreferrer"
87+
href={videoLink}
88+
class="text-nowrap text-red-500 hover:bg-red-500 hover:text-black font-semibold border px-1 md:text-lg md:px-2"
89+
>
90+
Ver en Facebook
91+
</a>
10492
</div>
105-
))}
106-
</div>
107-
))
93+
94+
{details?.map(detail => (
95+
<WorkshopDetail {...detail} />
96+
))}
97+
</div>
98+
)
99+
})
108100
}
109101
</div>
110102
</div>

0 commit comments

Comments
 (0)