Skip to content

Commit 3c3308e

Browse files
committed
Update sessions preview.
1 parent bdf31b7 commit 3c3308e

File tree

3 files changed

+35
-22
lines changed

3 files changed

+35
-22
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
1919
# Replace "/" and other non-alphanumeric characters with "-"
2020
SAFE_BRANCH := $(shell echo "$(BRANCH)" | sed 's/[^A-Za-z0-9-]/-/g')
2121
FORCE_DEPLOY ?= false
22+
SITE_URL ?= "https://$(SAFE_BRANCH).ep-preview.click"
2223

2324
.PHONY: build deploy dev clean install
2425

25-
2626
safe_branch:
2727
@echo $(SAFE_BRANCH)
2828

@@ -49,6 +49,7 @@ build:
4949
preview: RELEASES_DIR = $(VPS_PREVIEW_PATH)/$(SAFE_BRANCH)/releases
5050
preview: TARGET = $(RELEASES_DIR)/$(TIMESTAMP)
5151
preview:
52+
@echo "Preview site URL: $(SITE_URL)" # Output preview URL
5253
echo $(TARGET)
5354
@echo "\n\n**** Deploying preview of a branch '$(BRANCH)' (safe: $(SAFE_BRANCH)) to $(TARGET)...\n\n"
5455
$(REMOTE_CMD) "mkdir -p $(TARGET)"

src/pages/session/[slug].astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ const nextSessionsOrdered = sameRoomNextSession
102102

103103
<Prose>
104104
<h2>Abstract</h2>
105+
<Markdown content={entry.data.abstract || ""} />
105106
</Prose>
106107

107108
{

src/pages/sessions.astro

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,64 +8,74 @@ import { Separator } from "../components/separator/separator";
88
const sessionsCollection = await getCollection("sessions");
99
1010
// Define the type for the groups object
11-
type Session= {
11+
type Session = {
1212
id: string;
1313
data: {
14-
title : string;
14+
title: string;
15+
session_type: string;
1516
};
1617
};
1718
1819
type Groups = {
1920
[key: string]: Session[];
2021
};
2122
22-
// Group speakers by the first letter of their name
2323
const groups: Groups = sessionsCollection
24-
.filter((session: Session) => !!session.data.title)
24+
.filter((session: Session) => !!session.data.session_type)
2525
.reduce((acc: Groups, session: Session) => {
26-
const letter = session.data.title[0].toUpperCase();
27-
if (!acc[letter]) {
28-
acc[letter] = [];
26+
const sessionType = session.data.session_type;
27+
if (!acc[sessionType]) {
28+
acc[sessionType] = [];
2929
}
30-
acc[letter].push(session);
30+
acc[sessionType].push(session);
3131
return acc;
3232
}, {} as Groups);
3333
34-
const letters = Object.keys(groups).sort((a, b) => a.localeCompare(b));
34+
// Sort session types alphabetically
35+
const sessionTypes = Object.keys(groups).sort((a, b) => a.localeCompare(b));
3536
3637
const title = "Sessions";
3738
3839
const description =
39-
"Alphabetical list of all confirmed sessions for the conference";
40+
"List of all confirmed sessions for the conference, sorted by session type.";
4041
---
4142

4243
<Layout title={title} description={description}>
4344
<div class="px-6">
4445
<Prose>
4546
<h1>Sessions</h1>
46-
</Prose>
47+
<p>
48+
The following sessions are a preliminary list of the confirmed
49+
proposals that will be part of the conference. The list will keep
50+
growing in the following days, and some sessions might be replaced in
51+
case of them being withdrawn by the authors.
52+
</p>
53+
4754

48-
<div class="flex text-3xl font-bold flex-wrap mb-6">
55+
<h2 class="text-4xl">Go to session type:</h2>
56+
<div class="text-2xl mb-6">
57+
<ul>
4958
{
50-
letters.map((letter) => (
51-
<h3 class="mr-2">
52-
<a href={`#letter-${letter}`}>{letter}</a>
53-
</h3>
59+
sessionTypes.map((sessionType) => (
60+
<li class="mr-2">
61+
<a href={`#session-type-${sessionType}`}>{sessionType}</a>
62+
</li>
5463
))
5564
}
65+
</ul>
5666
</div>
5767

5868
<ol class="sessions">
5969
{
60-
letters.map((letter, index) => (
70+
sessionTypes.map((sessionType, index) => (
6171
<>
62-
<div id={`letter-${letter}`}>
72+
<div id={`session-type-${sessionType}`}>
6373
<h2 class="relative font-title text-primary font-bold mb-[0.6em] [&>a]:border-0 [&>a]:text-inherit text-4xl">
64-
{letter}
74+
{sessionType}
6575
</h2>
6676

6777
<ul class="pl-4">
68-
{groups[letter]
78+
{groups[sessionType]
6979
.sort((a, b) => a.data.title.localeCompare(b.data.title))
7080
.map((session) => (
7181
<li {...{ key: session.id }} class="mb-1">
@@ -80,7 +90,7 @@ const description =
8090
</ul>
8191
</div>
8292

83-
{index !== letters.length - 1 ? (
93+
{index !== sessionTypes.length - 1 ? (
8494
<Separator />
8595
) : (
8696
<div class="mb-20" />
@@ -89,5 +99,6 @@ const description =
8999
))
90100
}
91101
</ol>
102+
</Prose>
92103
</div>
93104
</Layout>

0 commit comments

Comments
 (0)