diff --git a/README.md b/README.md index dc8a135..564f228 100644 --- a/README.md +++ b/README.md @@ -45,4 +45,5 @@ So you don't need to worry about deployment of your code: As long as your change ## Contributing +Thank you for considering contributing to the .devClub website. Please read the [Contributing Guide](CONTRIBUTING.md) before opening a pull request. diff --git a/src/components/PeopleList.tsx b/src/components/PeopleList.tsx index 49832a2..e555082 100644 --- a/src/components/PeopleList.tsx +++ b/src/components/PeopleList.tsx @@ -15,7 +15,7 @@ import Select from "@mui/material/Select"; import MenuItem from "@mui/material/MenuItem"; import teamConfig from "@/resources/data/teamConfig"; -import { ITeamMember } from "@/resources/data/types"; +import { ITeamMember } from "@/types/types"; function PersonCard({ personData }: { personData: ITeamMember }) { return ( diff --git a/src/components/championsList.tsx b/src/components/championsList.tsx index 786a846..f21b7a3 100644 --- a/src/components/championsList.tsx +++ b/src/components/championsList.tsx @@ -1,4 +1,4 @@ -import { IChampion } from "@/resources/data/types"; +import { IChampion } from "@/types/types"; import "@/styles/PeopleList.scss"; import Box from "@mui/material/Box"; diff --git a/src/resources/data/champions.ts b/src/resources/data/champions.ts index 8a14b94..ca69ebc 100644 --- a/src/resources/data/champions.ts +++ b/src/resources/data/champions.ts @@ -2,7 +2,7 @@ import graham from "@/resources/images/champions/graham.jpg"; import joshua from "@/resources/images/champions/joshua.jpg"; import brooklynn from "@/resources/images/champions/brooklynn.png"; import jacob from "@/resources/images/champions/jacob.jpg"; -import { IChampion } from "./types"; +import { IChampion } from "@/types/team"; const champions: IChampion[] = [ { diff --git a/src/resources/data/devHacksArchive/HackathonYearSponsors.tsx b/src/resources/data/devHacksArchive/HackathonYearSponsors.tsx index f009fbd..7272112 100644 --- a/src/resources/data/devHacksArchive/HackathonYearSponsors.tsx +++ b/src/resources/data/devHacksArchive/HackathonYearSponsors.tsx @@ -42,17 +42,11 @@ import Ubisoft2023 from "@/resources/images/devhacks/2023/devHacksSponsors/Ubiso import GreenUmbrella from "@/resources/images/devhacks/2023/devHacksSponsors/greenUmbrella.webp"; import PayWorks from "@/resources/images/devhacks/2023/devHacksSponsors/payWorks.jpg"; -type HackathonYearSponsorsProps = { year: string | number }; - -type Tier = - | "platinum" - | "gold" - | "silver" - | "bronze" - | "inkind" - | "schoolSponsor"; //size not implemented in devHacksSponsors.scss -type Sponsor = { name: string; logo: string }; -type YearSponsors = Partial>; +import type { + HackathonYearSponsorsProps, + Tier, + YearSponsors, +} from "@/types/hackathon/sponsors"; const TIER_LABEL: Record = { platinum: "Platinum", diff --git a/src/resources/data/events.ts b/src/resources/data/events.ts index 5c79e2c..25715f3 100644 --- a/src/resources/data/events.ts +++ b/src/resources/data/events.ts @@ -1,4 +1,4 @@ -import type { EventData } from "./types"; +import type { EventData } from "@/types/events"; import workshop from "@/resources/images/events/workshop.jpg"; import devgames from "@/resources/images/events/devgames.jpg"; import battlesnake from "@/resources/images/events/battlesnakes.jpg"; @@ -12,9 +12,8 @@ import labtours from "@/resources/images/events/Labtours.jpg"; import codingKickoff from "@/resources/images/events/Coding Kickoff.png"; //add upcoming image imports here -import devhacks2026 from "@/resources/images/devhacks/2026/devhacks2026.png"; -export { TERMS_ORDER } from "./types"; +export { TERMS_ORDER } from "@/types/events"; //if you want to add an upcoming event //add the fields: upcomingTitle, upcomingDescription, upcomingImage,location, date in the format 026-01-13T18:00:00 and rsvp to the relevant event object below diff --git a/src/resources/data/forms.ts b/src/resources/data/forms.ts deleted file mode 100644 index 37f13d1..0000000 --- a/src/resources/data/forms.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const forms: Record = { - arewethereyet: "https://forms.gle/TZREGetDcMRtZY7G7", - aurafarming: "https://www.instagram.com/reel/DMg0SvhARRN/", - "councilor-applications": - "https://www.youtube.com/watch?v=dQw4w9WgXcQ&list=RDdQw4w9WgXcQ&start_radio=1", - "awty-handbook": - "https://docs.google.com/document/d/1UotSzRsbD6umpQfN0rHvS7MDXIfaHf7s1IlC7veRaVs/edit?usp=sharing", -}; diff --git a/src/resources/data/hackathonInfoConfig.ts b/src/resources/data/hackathonInfoConfig.ts index 8455695..9700e01 100644 --- a/src/resources/data/hackathonInfoConfig.ts +++ b/src/resources/data/hackathonInfoConfig.ts @@ -1,4 +1,4 @@ -import { HackathonInfo } from "./types"; +import { HackathonInfo } from "../../types/types"; const hackathonInfoConfig: HackathonInfo = { "2026": { diff --git a/src/resources/data/hackathonThemeConfig.ts b/src/resources/data/hackathonThemeConfig.ts index 19c8110..9962464 100644 --- a/src/resources/data/hackathonThemeConfig.ts +++ b/src/resources/data/hackathonThemeConfig.ts @@ -1,5 +1,5 @@ import { hexToRgb } from "@mui/material"; -import { HackathonTheme } from "./types"; +import { HackathonTheme } from "../../types/types"; const hackathonThemeConfig: HackathonTheme = { "2026": [ diff --git a/src/resources/data/hackathonWinners.ts b/src/resources/data/hackathonWinners.ts index ee3a5d7..5cfb311 100644 --- a/src/resources/data/hackathonWinners.ts +++ b/src/resources/data/hackathonWinners.ts @@ -1,9 +1,6 @@ -export type HackathonWinner = { - prizeIndex: number; - projectName: string; - teamMembers: string[]; - projectUrl?: string; -}; +import { HackathonWinner } from "@/types/hackathon/winner"; + +//prize index is the prize category index from its respective year const hackathonWinners: Record = { "2026": [ diff --git a/src/resources/data/teamConfig.ts b/src/resources/data/teamConfig.ts index 79fa2a4..cfb5736 100644 --- a/src/resources/data/teamConfig.ts +++ b/src/resources/data/teamConfig.ts @@ -1,4 +1,4 @@ -import { ITeam } from "./types"; +import { ITeam } from "@/types/team"; //Please limit social medias to 3 per exec const teamConfig: ITeam = { diff --git a/src/resources/data/types.ts b/src/resources/data/types.ts deleted file mode 100644 index af2ef6a..0000000 --- a/src/resources/data/types.ts +++ /dev/null @@ -1,69 +0,0 @@ -export type HackathonTheme = { - [key: string]: { - title: string; - description: string | string[]; - details?: { - header?: string; - content?: string[]; - }[]; - body?: string; - }[]; -}; - -export type HackathonInfo = { - [key: string]: { - year: string; - title: string; - subtitle: string; - location: string; - date: string; - description: string; - links: { - text: string; - path: string; - }[]; - }; -}; - -export interface ITeamMember { - firstName: string; - middleName?: string; - lastName: string; - role: string; - image: string; - linkedin?: string; - github?: string; - website?: string; - instagram?: string; - discord?: string; -} - -export interface ITeam { - [year: string]: ITeamMember[]; -} - -export interface IChampion { - name: string; - challenge: string; - image: string; - bio: string; -} -export type Term = "Summer" | "Fall" | "Winter"; - -export interface EventData { - id: string; - title: string; - term?: Term[]; - description: string; - image: string; - path?: string; - recurring?: boolean; - //use this for upcoming events in Events.ts, can be array or just string to setup multiple events of the same thing - upcomingTitle?: string | string[]; - upcomingDescription?: string | string[]; - upcomingImage?: string | string[]; - date?: string | string[]; - location?: string | string[]; - rsvp?: string | string[]; -} -export const TERMS_ORDER: Term[] = ["Summer", "Fall", "Winter"]; diff --git a/src/resources/images/clubs/logo-cusec.svg b/src/resources/images/clubs/logo-cusec.svg index 5b03c59..ac40c9d 100644 --- a/src/resources/images/clubs/logo-cusec.svg +++ b/src/resources/images/clubs/logo-cusec.svg @@ -1 +1,101 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/routes/Events.tsx b/src/routes/Events.tsx index 008fec8..18d749a 100644 --- a/src/routes/Events.tsx +++ b/src/routes/Events.tsx @@ -1,6 +1,6 @@ import React, { useMemo, useState } from "react"; import { EVENTS } from "@/resources/data/events"; -import type { Term } from "@/resources/data/types"; +import type { Term } from "@/types/events"; import "@/styles/Events.scss"; const TERMS: Term[] = ["Summer", "Fall", "Winter"]; diff --git a/src/routes/FormRedirect.tsx b/src/routes/FormRedirect.tsx deleted file mode 100644 index 8d2aae0..0000000 --- a/src/routes/FormRedirect.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { redirect } from "react-router-dom"; -import { forms } from "@/resources/data/forms"; - -const formsNormalized: Record = Object.fromEntries( - Object.entries(forms).map(([k, v]) => [k.toLowerCase(), v]) -); - -export function formRedirectLoader({ request }: { request: Request }) { - const url = new URL(request.url); - const slug = url.pathname.replace(/^\/+|\/+$/g, "").toLowerCase(); - const target = formsNormalized[slug]; - if (target) return redirect(target); - return null; -} diff --git a/src/routes/hackathon/Hackathon.tsx b/src/routes/hackathon/Hackathon.tsx index 13ff7b1..1f04079 100644 --- a/src/routes/hackathon/Hackathon.tsx +++ b/src/routes/hackathon/Hackathon.tsx @@ -162,7 +162,7 @@ function Hackathon() { {/*

Our Sponsors

*/} -

Event Pictures

+

Pictures

Go Back in Time

diff --git a/src/routes/hackathon/HackathonArchive.tsx b/src/routes/hackathon/HackathonArchive.tsx index 9890ed9..5ea365f 100644 --- a/src/routes/hackathon/HackathonArchive.tsx +++ b/src/routes/hackathon/HackathonArchive.tsx @@ -7,7 +7,7 @@ import HackathonWinners from "@/routes/hackathon/hackathonWinners"; import HackathonYearPictures from "@/resources/data/devHacksArchive/HackathonYearPictures"; import HackathonYearSponsors from "@/resources/data/devHacksArchive/HackathonYearSponsors"; -import { HackathonInfo } from "@/resources/data/types"; +import { HackathonInfo } from "@/types/hackathon/hackathon"; function HackathonArchive() { const { data } = useLoaderData() as HackathonInfo; diff --git a/src/routes/hackathon/HackathonArchiveCards.ts b/src/routes/hackathon/HackathonArchiveCards.ts index 4935bb0..c8591c4 100644 --- a/src/routes/hackathon/HackathonArchiveCards.ts +++ b/src/routes/hackathon/HackathonArchiveCards.ts @@ -4,13 +4,7 @@ import scheduleBg2026 from "@/resources/images/devhacks/2026/schedule_bg_2026.pn import scheduleBg2023 from "@/resources/images/devhacks/2023/devhacks2023-schedule-bg.png"; -export type HackathonArchiveCard = { - year: number; - title: string; - subtitle: string; - route: string; - image: string; -}; +import { HackathonArchiveCard } from "@/types/hackathon/hackathon"; export const HackathonArchiveCards: HackathonArchiveCard[] = [ { diff --git a/src/routes/hackathon/HackathonSchedule.tsx b/src/routes/hackathon/HackathonSchedule.tsx index 2cf72a6..e1a7ca3 100644 --- a/src/routes/hackathon/HackathonSchedule.tsx +++ b/src/routes/hackathon/HackathonSchedule.tsx @@ -4,7 +4,7 @@ import Devhacks2024Schedule from "@/resources/data/devHacksArchive/devHacks2024/ import Devhacks2025Schedule from "@/resources/data/devHacksArchive/devHacks2025/Schedule2025"; import Devhacks2026Schedule from "@/resources/data/devHacksArchive/devHacks2026/Schedule2026"; -import { HackathonConfig } from "@/resources/data/types"; +import { HackathonInfo } from "@/types/hackathon/hackathon"; const scheduleMap = { "2024": Devhacks2024Schedule, @@ -15,7 +15,7 @@ const scheduleMap = { type YearKey = keyof typeof scheduleMap; function HackathonSchedule() { - const { data } = useLoaderData() as HackathonConfig; + const { data } = useLoaderData() as HackathonInfo; const ScheduleComponent = scheduleMap[data.year as YearKey]; diff --git a/src/routes/hackathon/HackathonThemes.tsx b/src/routes/hackathon/HackathonThemes.tsx index 0ae2dd7..be7301f 100644 --- a/src/routes/hackathon/HackathonThemes.tsx +++ b/src/routes/hackathon/HackathonThemes.tsx @@ -3,7 +3,7 @@ import { useLoaderData } from "react-router-dom"; import { memo, useMemo, ReactNode } from "react"; import "@/styles/PrizeCategories.scss"; -import { HackathonTheme } from "@/resources/data/types"; +import { HackathonTheme } from "@/types/types"; type ThemeDetail = { header?: string; diff --git a/src/types/events.ts b/src/types/events.ts new file mode 100644 index 0000000..181d89b --- /dev/null +++ b/src/types/events.ts @@ -0,0 +1,19 @@ +export type Term = "Summer" | "Fall" | "Winter"; + +export interface EventData { + id: string; + title: string; + term?: Term[]; + description: string; + image: string; + path?: string; + recurring?: boolean; + //use this for upcoming events in Events.ts, can be array or just string to setup multiple events of the same thing + upcomingTitle?: string | string[]; + upcomingDescription?: string | string[]; + upcomingImage?: string | string[]; + date?: string | string[]; + location?: string | string[]; + rsvp?: string | string[]; +} +export const TERMS_ORDER: Term[] = ["Summer", "Fall", "Winter"]; diff --git a/src/types/hackathon/hackathon.ts b/src/types/hackathon/hackathon.ts new file mode 100644 index 0000000..90f42c9 --- /dev/null +++ b/src/types/hackathon/hackathon.ts @@ -0,0 +1,34 @@ +export type HackathonTheme = { + [key: string]: { + title: string; + description: string | string[]; + details?: { + header?: string; + content?: string[]; + }[]; + body?: string; + }[]; +}; + +export type HackathonInfo = { + [key: string]: { + year: string; + title: string; + subtitle: string; + location: string; + date: string; + description: string; + links: { + text: string; + path: string; + }[]; + }; +}; + +export type HackathonArchiveCard = { + year: number; + title: string; + subtitle: string; + route: string; + image: string; +}; diff --git a/src/types/hackathon/sponsors.ts b/src/types/hackathon/sponsors.ts new file mode 100644 index 0000000..d91e94d --- /dev/null +++ b/src/types/hackathon/sponsors.ts @@ -0,0 +1,18 @@ +export type Tier = + | "platinum" + | "gold" + | "silver" + | "bronze" + | "inkind" + | "schoolSponsor"; + +export type Sponsor = { + name: string; + logo: string; +}; + +export type YearSponsors = Partial>; + +export type HackathonYearSponsorsProps = { + year: string | number; +}; diff --git a/src/types/hackathon/winner.ts b/src/types/hackathon/winner.ts new file mode 100644 index 0000000..0078113 --- /dev/null +++ b/src/types/hackathon/winner.ts @@ -0,0 +1,6 @@ +export type HackathonWinner = { + prizeIndex: number; + projectName: string; + teamMembers: string[]; + projectUrl?: string; +}; diff --git a/src/types/team.ts b/src/types/team.ts new file mode 100644 index 0000000..382907e --- /dev/null +++ b/src/types/team.ts @@ -0,0 +1,24 @@ +export interface ITeamMember { + firstName: string; + middleName?: string; + lastName: string; + role: string; + image: string; + linkedin?: string; + github?: string; + website?: string; + instagram?: string; + discord?: string; +} + +export interface ITeam { + [year: string]: ITeamMember[]; +} + +//devchamp winners +export interface IChampion { + name: string; + challenge: string; + image: string; + bio: string; +}