Skip to content

Commit 91a3cdd

Browse files
Merge pull request #134 from pyladies/add-youtube-button-to-session
2 parents cb748f0 + bbceaf7 commit 91a3cdd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/pages/[lang]/schedule.astro

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ const t = useTranslations(lang);
148148
// Enrich event with language from sessions data
149149
if (event.code && sessionsData[event.code]) {
150150
event.language = sessionsData[event.code].language;
151+
event.youtube_url = sessionsData[event.code].youtube_url;
151152
}
152153
allEvents.push(event);
153154
});
@@ -469,6 +470,16 @@ const t = useTranslations(lang);
469470
</div>
470471
` : ''}
471472
${speakersHTML}
473+
${event.youtube_url ? `
474+
<div class="mt-4">
475+
<a href="${event.youtube_url}" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-2 px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-lg font-semibold text-sm transition-colors duration-200">
476+
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
477+
<path d="M21.593 7.203a2.506 2.506 0 0 0-1.762-1.766C18.265 5.007 12 5 12 5s-6.264-.007-7.831.404a2.56 2.56 0 0 0-1.766 1.778c-.413 1.566-.417 4.814-.417 4.814s-.004 3.264.406 4.814c.23.857.905 1.534 1.763 1.765 1.582.43 7.83.437 7.83.437s6.265.007 7.831-.403a2.515 2.515 0 0 0 1.767-1.763c.414-1.565.417-4.812.417-4.812s.02-3.265-.407-4.831zM9.996 15.005l.005-6 5.207 3.005-5.212 2.995z"/>
478+
</svg>
479+
Watch on YouTube
480+
</a>
481+
</div>
482+
` : ''}
472483
</div>
473484
</div>
474485
`;

0 commit comments

Comments
 (0)