Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,12 @@ export default defineConfig({
// "https://vdo.ninja/?room=EuroPython_2025_Terrace_2B&hash=338a&do",
},
integrations: [
pagefind(),
pagefind({
indexConfig: {
// Skip media pages from search results
excludeSelectors: ["html[data-pagefind-ignore]"],
},
}),
mdx(),
svelte(),
...(fastBuild
Expand Down
34 changes: 34 additions & 0 deletions public/finaid-round1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions public/finaid-round2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions public/theme/dragon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 14 additions & 16 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,20 @@ const gitVersion = __GIT_VERSION__;

<div class="flex w-full lg:flex-row flex-col-reverse justify-between">
<div class="terms py-2 text-center ">
{
TERMS.map((item) => (
<a
href={item.url}
class="text-[var(--color-text-secondary)] hover:text-[var(--color-primary-hover)] transition-colors duration-200 mx-2"
>
{item.label}
{item.external && (
<span class="inline-block">342206227</span>
)}
</a>
))
}
{
TERMS.map((item) => (
<a
href={item.url}
class="text-[var(--color-text-secondary)] hover:text-[var(--color-primary-hover)] transition-colors duration-200 mx-2"
>
{item.label}
{item.external && (
<span class="inline-block">↗</span>
)}
</a>
))
}
</div>

{
SOCIALS && (
Expand All @@ -100,9 +101,6 @@ const gitVersion = __GIT_VERSION__;
class="opacity-60 pb-4"
/>
)
}
/>
)
}
</div>
</div>
Expand Down
61 changes: 56 additions & 5 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,56 @@ import Search from "@components/Search.astro";
import ThemeToggle from "@components/ThemeToggle.astro";

import { NAV_MENUS, type NavMenu } from "@data/nav";
import { getCollection } from "astro:content";
import { readFileSync } from "fs";

// Parse redirect paths from astro.config.mjs at build time
const configText = readFileSync("astro.config.mjs", "utf-8");
const redirectMatch = configText.match(/redirects:\s*{([^}]+)}/s);
const redirectPathsFromConfig: string[] = redirectMatch
? [...redirectMatch[1].matchAll(/"([^"]+)"\s*:/g)].map((m) => m[1].replace(/^\//, "").replace(/\/$/, ""))
: [];

// Build list of existing content page slugs to filter nav
const existingPages = await getCollection("pages");
const existingSlugs = new Set(existingPages.map((p) => p.id));

// Standalone .astro pages that always exist regardless of content collection
const alwaysExist = new Set([
"sessions", "speakers", "schedule", "posters", "talks", "tutorials",
"sprints", "jobs", "sponsors", "community-partners", "media-partners",
]);

function linkExists(url: string): boolean {
if (url.startsWith("http")) return true;
const slug = url.replace(/^\//, "").replace(/\/$/, "");
if (!slug) return true;
if (alwaysExist.has(slug)) return true;
const redirectPaths = [...new Set(redirectPathsFromConfig)];
if (redirectPaths.includes(slug)) return true;
// Check exact match in content pages
if (existingSlugs.has(slug)) return true;
// Check if slug is the short form of a nested page (e.g. "mentorship" from "programme/mentorship")
for (const existing of existingSlugs) {
if (existing.endsWith("/" + slug) || existing === slug) return true;
}
return false;
}

function sectionHasItems(section: { items: { url: string }[] }): boolean {
return section.items.some((item) => linkExists(item.url));
}

// Filter nav menus to only show links that point to existing pages
const activeMenus = NAV_MENUS.map((menu) => ({
...menu,
sections: menu.sections
?.map((section) => ({
...section,
items: section.items.filter((item) => linkExists(item.url)),
}))
.filter((section) => section.items.length > 0),
})).filter((menu) => !menu.sections || menu.sections.length > 0);
---

<nav aria-label="Main navigation" id="navbar">
Expand All @@ -20,7 +70,7 @@ import { NAV_MENUS, type NavMenu } from "@data/nav";
Search
</button>
</li>
{NAV_MENUS.map((menu: NavMenu) => (
{activeMenus.map((menu: NavMenu) => (
menu.sections ? (
<li class="nav-item has-dropdown">
<a href={menu.url || "#"} aria-haspopup="true" aria-expanded="false">
Expand Down Expand Up @@ -130,16 +180,17 @@ nav {
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--color-text-primary);
text-decoration: none;
text-decoration: underline;
text-decoration-color: transparent;
border-radius: 2px;
transition: color 0.15s, background 0.15s;
transition: color 0.15s, text-decoration-color 0.15s;
}

.nav-item > a:hover,
.nav-item:hover > a,
.nav-item > a:focus {
color: var(--color-text);
background: var(--color-border);
color: var(--color-accent-themed);
text-decoration-color: var(--color-accent-themed);
}

.nav-arrow {
Expand Down
7 changes: 7 additions & 0 deletions src/components/Search.astro
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ import SearchComponent from "astro-pagefind/components/Search";
display: block;
padding: 0.8rem 1.4rem;
border-bottom: 1px solid var(--color-surface-faint);
position: relative;
text-decoration: none;
cursor: pointer;
transition: background 0.12s;
Expand All @@ -115,6 +116,12 @@ import SearchComponent from "astro-pagefind/components/Search";
border-bottom: none;
}

.search-modal-content :global(.pagefind-ui__result-link::after) {
content: "";
position: absolute;
inset: 0;
}

.search-modal-content :global(.pagefind-ui__result:hover),
.search-modal-content :global(.pagefind-ui__result[data-selected]) {
background: oklch(0.708 0.153 259.2 / 0.1); /* #64a0ff */
Expand Down
23 changes: 18 additions & 5 deletions src/components/schedule/day.astro
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ type ScheduleSession = {
endTime: string;
duration: number;
sessionType?: string | undefined;
type: string;
tyee: string;
rooms: string[];
snug?: string;
};

// hack for posters :)
Expand All @@ -90,6 +91,7 @@ const sessions = day.data.events
endTime,
sessionType: event.session_type?.toLowerCase(),
type: event.event_type,
slug: event.slug ? event.slug : "#",
};

if (session.sessionType === "poster") {
Expand Down Expand Up @@ -404,6 +406,7 @@ const dateText = format(date, "eeee d MMMM");

{(sessionsByTime[slot.startTime] ?? [])
.sort(sortSessionByRooms)
.filter((session) => session.sessionType !== "poster")
.map((session) => {
const style = getSessionStyle(session);

Expand All @@ -428,7 +431,7 @@ const dateText = format(date, "eeee d MMMM");
);
}

return <div id={`session-${session.slug}`}><Session session={session} style={style} /></div>;
return <Session session={session} style={style} />;
})}

{postersByTime[slot.startTime] && (
Expand All @@ -443,11 +446,11 @@ const dateText = format(date, "eeee d MMMM");
>
<h2>Posters ({posters[0].rooms.join(", ")})</h2>

<div>
<div class="poster-cards">
{posters.map((session) => {
const style = {};

return <div id={`session-${session.slug}`}><Session session={session} style={style} /></div>;
return <div><Session session={session} style={style} sessionType="poster" /></div>;
})}
</div>
</div>
Expand Down Expand Up @@ -656,6 +659,7 @@ const dateText = format(date, "eeee d MMMM");
:global(.break) {
grid-row: var(--start) / var(--end);
grid-column: var(--col-start) / var(--col-end);
display: block;
}

:global(.ep-break.day-end) {
Expand Down Expand Up @@ -689,6 +693,11 @@ const dateText = format(date, "eeee d MMMM");
display: none;
}

.posters:hover,
.posters:focus-within {
z-index: 15;
}

.posters {
grid-column: 3 / 6;
position: relative;
Expand All @@ -699,7 +708,10 @@ const dateText = format(date, "eeee d MMMM");
z-index: 5;
}

.posters h2 {
.poster-cards {
}

.posters h2 {
font-family: 'Inter Tight', system-ui, sans-serif;
font-weight: 700;
font-size: 0.8rem;
Expand All @@ -720,6 +732,7 @@ const dateText = format(date, "eeee d MMMM");
.posters :global(.session.poster),
.posters :global(.ep-session.poster) {
display: flex;
height: 100%;
}
}
</style>
Expand Down
30 changes: 28 additions & 2 deletions src/components/schedule/session.astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const sessionUrl = session.slug ? `/session/${session.slug}` : "#";
<div
class:list={["ep-session", session.level, slugify(session.sessionType)]}
style={style}
id={`session-${session.slug}`}
>
<CodeHeart
client:load
Expand All @@ -50,7 +51,10 @@ const sessionUrl = session.slug ? `/session/${session.slug}` : "#";
{hasRoom && <span class="ep-session-room">{session.rooms[0]}</span>}
{durationLabel && <span class="ep-session-duration">{durationLabel}</span>}
</div>
{levelLabel && <div class={`ep-session-level--${session.level}`}>{levelLabel}</div>}
<div class="ep-session-badges">
{session.sessionType === "poster" && <div class="ep-session-poster-badge">Poster</div>}
{levelLabel && <div class={`ep-session-level--${session.level}`}>{levelLabel}</div>}
</div>
</div>

<style>
Expand Down Expand Up @@ -108,6 +112,29 @@ const sessionUrl = session.slug ? `/session/${session.slug}` : "#";
margin-top: auto;
}

.ep-session-badges {
display: flex;
flex-wrap: wrap;
gap: 0.3em;
margin-top: 0.15em;
}

.ep-session-poster-badge {
padding: 0.1em 0.5em;
border-radius: 3px;
font-size: 1rem;
font-weight: 600;
letter-spacing: 0.03em;
background: var(--ep-level-intermediate-bg);
color: var(--ep-level-intermediate-text);
}

@media (min-width: 800px) {
.ep-session-poster-badge {
display: none;
}
}

.ep-session-room,
.ep-session-duration {
display: inline;
Expand All @@ -122,7 +149,6 @@ const sessionUrl = session.slug ? `/session/${session.slug}` : "#";
[class^="ep-session-level--"] {
display: inline-block;
width: fit-content;
margin-top: 0.25em;
padding: 0.1em 0.5em;
border-radius: 3px;
font-size: 1rem;
Expand Down
Loading
Loading