Skip to content

Commit cf56b5d

Browse files
committed
Update event.md
1 parent 462c085 commit cf56b5d

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

_pages/event.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,16 @@ body {
367367
<p class="schedule-time">{{ session.time }}</p>
368368
<h6>{{ session.title }}</h6>
369369
{% for item in session.items %}
370-
<p>{{ item }}</p>
370+
<p>
371+
{% assign processed_item = item %}
372+
{% for speaker in site.data.winter_school_speakers %}
373+
{% assign speaker_name = speaker.name | remove: "Prof. Dr. " %}
374+
{% if item contains speaker_name %}
375+
{% assign processed_item = item | replace: speaker_name, '<a href="#" class="speaker-link" data-speaker-id="' | append: forloop.index | append: '">' | append: speaker_name | append: '</a>' %}
376+
{% endif %}
377+
{% endfor %}
378+
{{ processed_item }}
379+
</p>
371380
{% endfor %}
372381
</div>
373382
{% endfor %}
@@ -420,4 +429,34 @@ document.addEventListener('DOMContentLoaded', function() {
420429
});
421430
});
422431
});
432+
document.addEventListener('DOMContentLoaded', function() {
433+
const speakerLinks = document.querySelectorAll('.speaker-link');
434+
435+
speakerLinks.forEach(link => {
436+
link.addEventListener('click', function(e) {
437+
e.preventDefault();
438+
const speakerId = this.dataset.speakerId;
439+
440+
// Remove active state from all cards
441+
document.querySelectorAll('.custom-card').forEach(card => {
442+
card.classList.remove('active');
443+
});
444+
445+
// Hide all speaker details
446+
document.querySelectorAll('.speaker-details').forEach(detail => {
447+
detail.classList.remove('show');
448+
});
449+
450+
// Show selected speaker details
451+
const speakerCard = document.querySelector(`.custom-card[data-speaker-id="${speakerId}"]`);
452+
const speakerDetails = document.getElementById(`speaker-details-${speakerId}`);
453+
454+
if (speakerCard && speakerDetails) {
455+
speakerCard.classList.add('active');
456+
speakerDetails.classList.add('show');
457+
speakerDetails.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
458+
}
459+
});
460+
});
461+
});
423462
</script>

0 commit comments

Comments
 (0)