Skip to content

Commit 6508cf7

Browse files
authored
Merge branch 'ep2025' into ep2025-app
2 parents 62265e4 + d24d872 commit 6508cf7

File tree

3 files changed

+59
-3
lines changed

3 files changed

+59
-3
lines changed

src/components/schedule/break.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ export interface Props {
33
time: string;
44
title: string;
55
style?: any;
6+
className?: string;
67
}
78
8-
const { time, title, style }: Props = Astro.props;
9+
const { time, title, style, className }: Props = Astro.props;
910
---
1011

11-
<div class="break" style={style} aria-label=`${time} ${title}` >
12+
<div class={className? className: "break"} style={style} aria-label=`${time} ${title}` >
1213
{time}{" "}
1314
{title}
1415
<span class="sr-only">{time} {title}</span>

src/components/schedule/day.astro

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,19 @@ posters.forEach((poster) => {
322322

323323
const date = parseISO(dayName);
324324
const dateText = format(date, "eeee - do MMMM");
325+
326+
327+
328+
329+
const lastEndTime = Math.max(
330+
...slots.flatMap((slot) => slot.sessions.map((s) => timeToNumber(s.endTime)))
331+
);
332+
333+
const endStart = numberToTime(lastEndTime);
334+
const endStartDate = addMinutes(parseISO(dayName), lastEndTime);
335+
const endEndDate = addMinutes(endStartDate, 10);
336+
const endEnd = numberToTime(lastEndTime + 10);
337+
325338
---
326339

327340
<div class="day"
@@ -362,7 +375,7 @@ const dateText = format(date, "eeee - do MMMM");
362375
<h2>{format(slot.start, "HH:mm")}</h2>
363376
</div>
364377

365-
{sessionsByTime[slot.startTime]
378+
{(sessionsByTime[slot.startTime] ?? [])
366379
.sort(sortSessionByRooms)
367380
.map((session) => {
368381
const style = getSessionStyle(session);
@@ -407,7 +420,14 @@ const dateText = format(date, "eeee - do MMMM");
407420
</div>
408421
))
409422
}
423+
410424
</div>
425+
426+
<Break
427+
title="End of the Day"
428+
time={endStart}
429+
className="day-end"
430+
/>
411431
</div>
412432
<div class="h-12"></div>
413433
</div>
@@ -426,6 +446,19 @@ const dateText = format(date, "eeee - do MMMM");
426446
{
427447
width: 100%;
428448
}
449+
450+
451+
:global(.day-end) {
452+
display: flex;
453+
align-items: center;
454+
text-align: center;
455+
justify-items: center;
456+
background-color: #FCFBFA;
457+
border-radius: 10px;
458+
margin: 10px 1.5rem;
459+
padding:2px 8px;
460+
font-size: 0.8rem;
461+
}
429462
:global(body) {
430463
}
431464

@@ -548,6 +581,14 @@ const dateText = format(date, "eeee - do MMMM");
548581
grid-column: var(--col-start) / var(--col-end);
549582
}
550583

584+
585+
:global(.day-end){
586+
font-size: 1.2rem;
587+
margin: 2px;
588+
padding: 8px;
589+
}
590+
591+
551592
.time {
552593
padding: 8px;
553594
grid-column: 1 / 2;

src/pages/session/[slug].astro

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@ const nextSessionsOrdered = sameRoomNextSession
9898
</>
9999
)
100100
}
101+
{
102+
entry.data.end && (
103+
<>
104+
<dt class="font-bold">End:</dt>
105+
<dd>
106+
{formatInTimeZone(
107+
entry.data.end,
108+
"Europe/Prague",
109+
"HH:mm 'on' dd MMMM yyyy",
110+
)}
111+
</dd>
112+
</>
113+
)
114+
}
101115
<dt class="font-bold">Duration:</dt>
102116
<dd>{entry.data.duration} minutes</dd>
103117
</dl>

0 commit comments

Comments
 (0)