Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1f527b1
chore:move metadata fields for project maturity and featured status i…
TheVessen Dec 10, 2024
e3f85b8
refactor: migrate utility functions to mdxParser and update imports a…
TheVessen Dec 12, 2024
27f67f6
refactor: update imports and remove unused utility functions + document
TheVessen Dec 12, 2024
d349d3b
refactor: update mdxParser imports and enhance event loading function…
TheVessen Dec 12, 2024
51543c1
refactor: enhance content loading and validation for new page type in…
TheVessen Dec 13, 2024
c955923
Adding zod to the project for mdx validation
TheVessen Dec 13, 2024
9a2647c
refactor: update mdxParser- simplify & refactor
TheVessen Dec 13, 2024
1357c49
refactor: replace processPosts with getPosts in FAQPartial component
TheVessen Dec 13, 2024
82646cd
refactor: remove zod dependency from package.json
TheVessen Dec 13, 2024
0fe5b1b
refactor: implement dynamic page rendering and enhance cluster suppor…
TheVessen Dec 13, 2024
e9e1375
refactor: update import paths to use new lib structure
TheVessen Dec 13, 2024
30645cb
refactor: testing approach with zod validation
TheVessen Dec 15, 2024
9cdc9ba
refactor: add vite configuration and update package.json dependencies
TheVessen Dec 15, 2024
2290aa8
updated lock file
TheVessen Dec 15, 2024
8ac3820
refactor: update project validation logic and clean up test cases
TheVessen Dec 16, 2024
62ce342
refactor: total restructure typing iteration 2: simplify and infer
TheVessen Dec 16, 2024
1264917
fix: update lock file
TheVessen Dec 16, 2024
bad557a
refactor: improve event metadata handling and remove unused parser fu…
TheVessen Dec 16, 2024
1c2e332
refactor: standardize mdxParser imports and update related components
TheVessen Dec 16, 2024
c0049b9
fix merge conflict aec hackathon
TheVessen Dec 17, 2024
00ae9e2
Merge branch 'main' into chore/mdx-and-project-setup
TheVessen Jan 12, 2025
7907064
Display less events on the index and create separate event page
TheVessen Jan 24, 2025
a08766f
remove redundant code
TheVessen Feb 3, 2025
3b97dd1
Fix pull issue with project map
TheVessen Feb 7, 2025
eac39d5
Merge branch 'main' of https://github.com/opensource-construction/web…
TheVessen Feb 7, 2025
d5bf154
merging from main
TheVessen Feb 7, 2025
4cfb472
Merge branch 'chore/mdx-and-project-setup' of https://github.com/open…
TheVessen Feb 7, 2025
d48886a
Remove outdated network partners from JSON file
TheVessen Feb 7, 2025
30fe477
Add duration calculation for events
TheVessen Feb 7, 2025
1cc22a5
Add URL validation for button component links
TheVessen Feb 7, 2025
d6ecdc3
Merge branch 'chore/mdx-and-project-setup' of https://github.com/open…
TheVessen Feb 7, 2025
725e053
Refactor events components to improve structure and readability
TheVessen Feb 7, 2025
43dc3b4
Refactor cluster mapping for improved readability
TheVessen Feb 28, 2025
361f195
Add Xeokit project to project map
TheVessen Feb 28, 2025
efb4c75
Merge branch 'main' into chore/mdx-and-project-setup
TheVessen Feb 28, 2025
5a820d5
Remove project map and update metadata for BetterCorrectFast and xeok…
TheVessen Feb 28, 2025
995d280
Merge branch 'chore/mdx-and-project-setup' into chore/event-page
TheVessen Feb 28, 2025
19486bb
Merge remote-tracking branch 'origin' into chore/event-page
TheVessen Mar 6, 2025
ee74bf8
fix button
TheVessen Mar 6, 2025
d444670
Merge branch 'chore/event-page' of https://github.com/opensource-cons…
TheVessen Mar 6, 2025
5577565
Merge remote-tracking branch 'origin' into chore/event-page
TheVessen Mar 14, 2025
130d43b
remove vite-tsconfig-paths dependency and delete vite.config.ts
TheVessen Mar 14, 2025
85d5751
Add vitest configuration and fix key prop in EventsIndexPartial
TheVessen Mar 14, 2025
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
32 changes: 32 additions & 0 deletions app/events/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Button, EventsPartial, Section } from "@/components";
import { loadEvents } from "@/lib/mdxParser/mdxParser";

export default function Events({}: {}) {
return (
<div className="mt-28 prose-h2:mt-0 md:mt-0 md:prose-h2:text-2xl md:prose-h3:text-xl">
<Section>
<h1 className="py-6 text-xl font-bold md:text-4xl">Events</h1>
<p>
Join us for various events focused on open source in the AECO
industry. From community calls to workshops and conferences, we bring
together practitioners and enthusiasts to share knowledge and drive
innovation.
</p>
<div className="pt-4">
<Button
target="/#contact-us"
label="Want to organize an event?"
type="primary"
/>
</div>
</Section>

<Section color="primary-500">
<EventsPartial showPast={false} />
</Section>
<Section color="slate-300">
<EventsPartial showPast={true} />
</Section>
</div>
);
}
10 changes: 10 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,13 @@ svg:not(:root) {
overflow-clip-margin: content-box;
overflow: hidden;
}

.transition-all {
transition-property: all;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 300ms;
}

.section-transition {
transition: background-color 500ms ease-in-out;
}
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const metadata: Metadata = {

const navItems = [
{ name: "Projects", target: "/projects" },
{ name: "Events", target: "/#events" },
{ name: "Events", target: "/events" },
{ name: "Trainings", target: "/trainings" },
{ name: "About us", target: "/#who-is-behind-the-initiative" },
];
Expand Down
9 changes: 5 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Image from "next/image";
import team from "../content/team.json";
import ContactCard from "@/components/src/contactCard";
import { PartnersPartial } from "@/components/src/partials/partners";
import { EventsIndexPartial } from "@/components/src/partials/events";

export default function Home() {
const discordLink = process.env.DISCORD_LINK || "";
Expand Down Expand Up @@ -75,11 +76,11 @@ export default function Home() {
exchange – find them here + further events that we attend as well.
</p>
</div>
<EventsPartial />
</Section>
<Section title="Past Events" color="slate-300">
<EventsPartial showPast={true} />
<EventsIndexPartial />
</Section>
{/* <Section title="Past Events" color="slate-300">
<EventsPartial showPast={true} maxEventCount={4} />
</Section> */}
<Section>
<Image
src="/images/partials/AEC-Hackathon-091.jpg"
Expand Down
112 changes: 99 additions & 13 deletions components/src/partials/events.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Button } from "../button";
import { Card } from "../card";
import { loadEvents } from "@/lib/mdxParser/mdxParser";

Expand All @@ -12,19 +13,104 @@ export function EventsPartial({ showPast = false }: { showPast?: boolean }) {
);

return (
<div className="grid gap-12 py-10 md:mt-16 lg:grid-cols-2 lg:gap-32">
{!es.length
? "No pending events"
: es.map((e) => (
<Card
key={e.metadata.start.toLocaleDateString("en-GB")}
title={e.title || ""}
type="event"
color={"white"}
subtitle={e.metadata.start.toLocaleDateString("en-GB")}
slug={e.slug}
/>
))}
<div className="mt-10 ">
<h2 className="text-gray-600 mb-12 text-2xl font-semibold">
{showPast ? "Past Events" : "Upcoming Events"}
</h2>
<div className="grid gap-12 md:mt-16 lg:grid-cols-2 lg:gap-32">
{!es.length
? "No pending events"
: es.map((e) => (
<Card
key={e.metadata.start.toLocaleDateString("en-GB")}
title={e.title || ""}
type="event"
color={"white"}
subtitle={e.metadata.start.toLocaleDateString("en-GB")}
slug={e.slug}
/>
))}
</div>
</div>
);
}

export function EventsIndexPartial() {
let eventsParsed = loadEvents();

const pastEvents = eventsParsed
.filter((e) => e.metadata.isPast)
.sort((a, b) => (a.metadata.start < b.metadata.start ? 1 : -1))
.slice(0, 3);

const futureEvents = eventsParsed
.filter((e) => !e.metadata.isPast)
.sort((a, b) => (a.metadata.start < b.metadata.start ? 1 : -1));

return (
<div className="flex flex-col gap-24">
{/* Upcoming Events Section */}
<section className="mt-10">
<h2 className="text-gray-600 mb-12 text-2xl font-semibold">
Upcoming Events
</h2>
<div className="grid gap-12 lg:grid-cols-2 lg:gap-32">
{futureEvents.length === 0 ? (
<p className="text-gray-600 text-lg">No upcoming events</p>
) : (
futureEvents.map((e) => (
<Card
key={e.metadata.start.toLocaleDateString("en-GB")}
title={e.title || ""}
type="event"
color="white"
subtitle={e.metadata.start.toLocaleDateString("en-GB")}
slug={e.slug}
/>
))
)}
</div>
</section>

{/* Past Events Section */}
{pastEvents.length > 0 && (
<section className="border-gray-100 border-t border-opacity-60 pt-8">
<h2 className="text-gray-600 mb-12 text-2xl font-semibold">
Past Events
</h2>
<div className="grid gap-12 lg:grid-cols-2 lg:gap-32">
{pastEvents.map((e) => (
<div
key={e.metadata.start.toLocaleDateString("en-GB")}
className="opacity-80 hover:opacity-100"
>
<Card
title={e.title || ""}
type="event"
color="slate-300"
subtitle={e.metadata.start.toLocaleDateString("en-GB")}
slug={e.slug}
/>
</div>
))}
<div className="flex h-full flex-col bg-white p-4 shadow-sm">
<h4 className="mb-2 mt-0 text-xl font-bold md:text-2xl">
Discover More
</h4>
<p className="text-gray-600 mb-8">
View our complete archive of past and upcoming events
</p>
<div className="mt-auto">
<Button
type="primary"
label="See all events"
target="/events"
/>
</div>
</div>
</div>
</section>
)}
</div>
);
}
1 change: 0 additions & 1 deletion lib/mdxParser/mdxMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ const metadataTransforms: MetadataTransformer = {

const isPast = eventEnd.getTime() < Date.now();


return {
...defaultContent.metadata,
start: eventStart,
Expand Down
14 changes: 14 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vitest/config';
import { resolve } from 'path';

export default defineConfig({
test: {
// Other test configuration...
},
resolve: {
alias: {
'@': resolve(__dirname, './'),
'@lib': resolve(__dirname, './lib')
}
}
});