Skip to content

Commit 4f4d431

Browse files
RW25 - Third phase - Agenda page (#519)
* create agenda page * add agenda markdown data * add time to session card * fix responsiveness * add missing sessions and re-organise order * only session with show pages have clickable cards * fix day 0 * fix responsiveness and order * fix order to show track 1 first * clean code session card * don't show speakers with no headshot in index * add day and location to session cards * use white for session details * Update agenda_header.html --------- Co-authored-by: Amanda Perino <[email protected]>
1 parent 8da2686 commit 4f4d431

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+610
-96
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="agenda-header">
2+
<div class="content">
3+
<h1>Rails World 2025</h1>
4+
<h2>Official Agenda</h2>
5+
<p class="larger">
6+
Here are the talks coming to the two Rails World stages. Registered attendees will be sent a link to the Rails World 2025 app with more detailed times and locations.
7+
</p>
8+
</div>
9+
10+
<div class="illustration-container">
11+
<img src="/assets/world/2025/images/shape.png" alt="attendees at rails world" class="illustration" width="500" />
12+
</div>
13+
</div>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<div class="agenda-tabs" id="agenda-tabs">
2+
<div class="tab zero {% if page.day == 'day-0' %}active{% endif %}"
3+
role="button"
4+
tabindex="0"
5+
title="Wednesday"
6+
aria-label="View pre-registration agenda">
7+
<p>Wednesday</p>
8+
</div>
9+
10+
<div class="tab one {% if page.day == 'day-1' %}active{% endif %}"
11+
role="button"
12+
tabindex="1"
13+
title="Thursday"
14+
aria-label="View day one agenda">
15+
<p>Thursday</p>
16+
</div>
17+
18+
<div class="tab two {% if page.day == 'day-2' %}active{% endif %}"
19+
role="button"
20+
tabindex="2"
21+
title="Friday"
22+
aria-label="View day two agenda">
23+
<p>Friday</p>
24+
</div>
25+
</div>
26+
27+
<script>
28+
document.addEventListener("DOMContentLoaded", function () {
29+
const tabs = document.querySelectorAll(".agenda-tabs .tab");
30+
const agendaContent = document.getElementById("agenda-content");
31+
32+
tabs.forEach((tab, index) => {
33+
tab.addEventListener("click", () => {
34+
const day = index;
35+
loadAgendaDay(day);
36+
setActiveTab(tab);
37+
});
38+
39+
tab.addEventListener("keydown", (e) => {
40+
if (e.key === "Enter" || e.key === " " || e.key === "Spacebar") {
41+
e.preventDefault();
42+
tab.click();
43+
}
44+
});
45+
});
46+
47+
const loadAgendaDay = ((day) => {
48+
fetch(`/world/2025/agenda/day-${day}`)
49+
.then(response => response.text())
50+
.then(html => {
51+
// Create a DOM parser to extract only the agenda content
52+
const parser = new DOMParser();
53+
const doc = parser.parseFromString(html, 'text/html');
54+
const newAgendaContent = doc.querySelector('#agenda-content');
55+
agendaContent.innerHTML = newAgendaContent.innerHTML;
56+
})
57+
.catch(() => {
58+
agendaContent.innerHTML = "<p>Error loading agenda.</p>";
59+
});
60+
})
61+
62+
const setActiveTab = ((activeTab) => {
63+
tabs.forEach(tab => tab.classList.remove("active"));
64+
activeTab.classList.add("active");
65+
})
66+
});
67+
</script>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<a href="/world/2025/speakers" class="nav-link">Speakers</a>
2+
<a href="/world/2025/agenda/day-1" class="nav-link">Agenda</a>
23
<a href="/world/2025/faq/general" class="nav-link">FAQs</a>
34
<a href="/world/2025/rails_at_scale" class="nav-link">Rails at Scale Summit</a>
Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,57 @@
11
{% assign speaker_url = include.speaker.path | split: '/' | last | remove_first: '.md' %}
22
{% assign session = include.session %}
3-
43
{% assign clean_path = session.path | replace: '_world_sessions/2025', '' | replace: '.md', '' %}
54

6-
<div class="session-card"
5+
{% if session.location == "Effectenbeurs" %}
6+
{% assign track = "Track 1" %}
7+
{% else %}
8+
{% assign track = "Track 2" %}
9+
{% endif %}
10+
11+
{% if session.path contains 'day-1/' %}
12+
{% assign day = 'Thursday Sept 4' %}
13+
{% elsif session.path contains 'day-2/' %}
14+
{% assign day = 'Friday Sept 5' %}
15+
{% endif %}
16+
17+
<div class="session-card {% unless session.show_page == false %}pointer{% endunless %}"
718
title="{{ session.title }}"
8-
aria-label="Go to {{ session.title }} session page"
9-
onclick="openWindow( '/world/2025{{ clean_path }}')"
10-
onkeydown="handleEnterOrSpaceWindowOpen(event, '/world/2025{{ clean_path }}')">
11-
<h3>{{ session.title }}</h3>
12-
<p>{{ include.speaker.first_name }} {{ include.speaker.last_name }} - {{ include.speaker.tagline }}{% if include.speaker.company %}, {{ include.speaker.company }} {% endif %}</p>
19+
aria-label="{% unless session.show_page == false %}Go to {{ session.title }} session page{% else %}{{ session.title }}{% endunless %}"
20+
{% unless session.show_page == false %}
21+
onclick="openWindow('/world/2025{{ clean_path }}')"
22+
onkeydown="handleEnterOrSpaceWindowOpen(event, '/world/2025{{ clean_path }}')"
23+
role="button"
24+
tabindex="0"
25+
{% endunless %} >
26+
27+
{% if page.path contains 'speakers/' %}
28+
<div class="details">
29+
<p class="italic">{{ day }}</p>
30+
<p class="bold">{{ session.time }}</p>
31+
<p>{{ track }}</p>
32+
</div>
33+
{% else %}
34+
<p class="details">{{ session.time }}</p>
35+
{% endif %}
36+
37+
<div class="content">
38+
<h3>{{ session.title }}</h3>
39+
{% if session.multiple_speakers %}
40+
<p>{{session.multiple_speakers}}</p>
41+
{% elsif include.speaker %}
42+
<p>{{ include.speaker.first_name }} {{ include.speaker.last_name }} {% if include.speaker.tagline %} - {{ include.speaker.tagline }} {% endif %} {% if include.speaker.company %}, {{ include.speaker.company }} {% endif %}</p>
43+
{% endif %}
44+
</div>
1345
</div>
1446

1547
<script>
16-
openWindow = (url, openTab = false) =>{
17-
const openType = openTab ? '_blank' : '_self';
18-
window.open(url, openType);
48+
openWindow = (url) =>{
49+
window.open(url);
1950
}
2051

2152
handleEnterOrSpaceWindowOpen = (e, url) => {
2253
if (e.key === " " || e.key === "Enter" || e.key === "Spacebar") {
23-
openWindow(url);
54+
openWindow(url);
2455
}
2556
}
2657
</script>

_layouts/world/2025/session.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,27 @@
55
{% assign filteredSpeakers = site.world_speakers | where_exp:"speaker", "speaker.path contains page.speaker" | where_exp: 'item', 'item.path contains "2025"' %}
66
{% assign speaker = filteredSpeakers | first %}
77

8+
{% if page.location == "Effectenbeurs" %}
9+
{% assign track = "Track 1" %}
10+
{% else %}
11+
{% assign track = "Track 2" %}
12+
{% endif %}
13+
14+
{% if page.path contains 'day-1/' %}
15+
{% assign day = 'Thursday September 4' %}
16+
{% elsif page.path contains 'day-2/' %}
17+
{% assign day = 'Friday September 5' %}
18+
{% endif %}
19+
820
<div class="session-page">
921
<div class="session-content">
1022
<h1>{{ page.title }}</h1>
1123
<p>{{ content }}</p>
24+
25+
<div class="session-details">
26+
<img class="" width="40" src="/assets/world/2025/icons/clock.svg" alt="clock icon">
27+
<p> {{ day }} / {{ page.time }} / {{ track }}</p>
28+
</div>
1229
</div>
1330

1431
<div>

_sass/world/2025/base/_colors.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ $speaker-card-gradient-hover: linear-gradient(180deg, rgba(59, 29, 98, 0%) 0%, r
1515

1616
$session-card-gradient: linear-gradient(-90deg, rgba(59, 29, 98, 0%) 20%, $red 100%);
1717
$session-card-gradient-hover: linear-gradient(-90deg, rgba(59, 29, 98, 0%) 0%, $red 61%);
18+
19+
$agenda-tag-gradient: linear-gradient(0deg, rgba(59, 29, 98, 0%) 0%, $red 140%);

_sass/world/2025/base/_layout.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,14 @@ body {
5454
padding: 0 5%;
5555
}
5656
}
57+
58+
.sessions-container {
59+
margin-top: 80px;
60+
display: flex;
61+
flex-direction: column;
62+
gap: 25px;
63+
64+
@include media(MobileAndTabletScreens) {
65+
margin-top: 50px;
66+
}
67+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
.agenda-page {
2+
padding-left: 80px;
3+
4+
@include media(MobileScreens) {
5+
padding: 0 20px;
6+
margin-bottom: 50px;
7+
}
8+
9+
@include media(TabletScreens) {
10+
padding: 0 40px;
11+
}
12+
}
13+
14+
.agenda-page {
15+
.session-card {
16+
@include media(MobileAndTabletScreens) {
17+
width: 90%;
18+
}
19+
}
20+
}
21+
22+
.agenda-header {
23+
margin-top: 50px;
24+
display: flex;
25+
align-items: center;
26+
justify-content: space-between;
27+
28+
@include media(MobileAndTabletScreens) {
29+
flex-direction: column-reverse;
30+
text-align: center;
31+
}
32+
33+
@include media(MobileScreens) {
34+
margin-top: 25px;
35+
}
36+
37+
@include media(TabletScreens) {
38+
margin-top: 50px;
39+
}
40+
41+
h1 {
42+
margin-bottom: 10px;
43+
44+
@include media(MobileScreens) {
45+
font-size: $xx-large;
46+
}
47+
48+
@include media(TabletScreens) {
49+
font-size: 50px;
50+
}
51+
}
52+
53+
h2 {
54+
font-size: 60px;
55+
56+
@include media(MobileScreens) {
57+
font-size: 25px;
58+
}
59+
60+
@include media(TabletScreens) {
61+
font-size: 40px;
62+
}
63+
}
64+
65+
p {
66+
@include media(MobileScreens) {
67+
font-size: 18px;
68+
}
69+
70+
@include media(TabletScreens) {
71+
font-size: 28px;
72+
}
73+
}
74+
}
75+
76+
.agenda-header .content {
77+
width: 50%;
78+
align-self: flex-start;
79+
margin-top: 100px;
80+
81+
@include media(MobileAndTabletScreens) {
82+
width: 100%;
83+
margin-top: 25px;
84+
}
85+
}
86+
87+
.agenda-header .illustration-container {
88+
@include media(MobileAndTabletScreens) {
89+
display: none;
90+
}
91+
92+
img {
93+
width: 500px;
94+
rotate: 180deg;
95+
}
96+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.agenda-tabs {
2+
display: flex;
3+
gap: 25px;
4+
5+
@include media(MobileAndTabletScreens) {
6+
margin-top: 50px;
7+
}
8+
9+
@include media(MobileScreens) {
10+
gap: 10px;
11+
}
12+
13+
.tab {
14+
cursor: pointer;
15+
padding: 10px 50px;
16+
border-top: 1px solid white;
17+
border-right: 1px solid white;
18+
border-left: 1px solid white;
19+
20+
&:hover, &.active {
21+
background-image: $agenda-tag-gradient;
22+
}
23+
24+
@include media(MobileScreens) {
25+
padding: 10px;
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)