Skip to content

Commit

Permalink
Completely reform the routing and directory layout to be less cringe
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Sep 13, 2024
1 parent fd4dc24 commit 7e845f1
Show file tree
Hide file tree
Showing 41 changed files with 135 additions and 166 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



const AboutUsSection = function () {
const ClubSummary = function () {

return (

Expand All @@ -21,4 +21,4 @@ const AboutUsSection = function () {

}

export default AboutUsSection
export default ClubSummary
16 changes: 8 additions & 8 deletions frontend/src/app/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import { UnknownAction } from "@reduxjs/toolkit";
import { useEffect } from "react";
import Decision from "./EventsOnHomePage/Decision";
import AboutUsSection from "./aboutus";
import { useAppDispatch, useAppSelector } from "./hooks/hooks";
import { AddExecProfile, ExecProfileObject, selectProfile } from "./slices/execProfileSlice";
import { SetCurrentPage } from "./slices/pageSlice";
import { AppDispatch } from "./stores/store";
import { loadProfilesAsync } from "./thunks/ProfileThunks";
import Decision from "./events/EventsOnHomePage/Decision";
import ClubSummary from "./ClubSummary";
import { useAppDispatch, useAppSelector } from "../redux/hooks/hooks";
import { AddExecProfile, ExecProfileObject, selectProfile } from "../redux/slices/execProfileSlice";
import { SetCurrentPage } from "../redux/slices/pageSlice";
import { AppDispatch } from "../redux/stores/store";
import { loadProfilesAsync } from "../redux/thunks/ProfileThunks";


let InstanceCount: number = 0;
Expand Down Expand Up @@ -74,7 +74,7 @@ export default function HomePage({ }: HomePageProps) {
</div>
<Decision />

<AboutUsSection />
<ClubSummary />
</>
);
}
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/app/about/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import { UnknownAction } from "@reduxjs/toolkit";
import { useEffect, useState } from "react";
import Conditional from "../Conditional";
import ExecProfiles from "../ExecProfiles";
import { useAppDispatch, useAppSelector } from "../hooks/hooks";
import { AddExecProfile, ExecProfileObject, selectProfile } from "../slices/execProfileSlice";
import { SetCurrentPage } from "../slices/pageSlice";
import { AppDispatch } from "../stores/store";
import { loadProfilesAsync } from "../thunks/ProfileThunks";
import Conditional from "../shared_components/Conditional";
import ExecProfiles from "./ExecProfiles";
import { useAppDispatch, useAppSelector } from "../../redux/hooks/hooks";
import { AddExecProfile, ExecProfileObject, selectProfile } from "../../redux/slices/execProfileSlice";
import { SetCurrentPage } from "../../redux/slices/pageSlice";
import { AppDispatch } from "../../redux/stores/store";
import { loadProfilesAsync } from "../../redux/thunks/ProfileThunks";

interface AboutPageProps
{}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import ExecProfile from "./ExecProfile";
import { useAppSelector } from './hooks/hooks';
import { ExecProfileObject, selectProfile } from './slices/execProfileSlice';
import { useAppSelector } from '../../redux/hooks/hooks';
import { ExecProfileObject, selectProfile } from '../../redux/slices/execProfileSlice';

export default function ExecProfiles() {
const profiles = useAppSelector(selectProfile);
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions frontend/src/app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import AboutPage from "@/app/about/AboutPage";
import NavBar from "../NavBar";
import NavBar from "../shared_components/header/NavBar";
import { Provider } from "react-redux";
import { store } from "../stores/store";
import Footer from "../Footer";
import { store } from "../../redux/stores/store";
import Footer from "../shared_components/footer/Footer";

export default function Page()
{
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/events/Event.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Image from "next/image";
import { useState } from "react";
import { useSelector } from "react-redux";
import { useAppDispatch } from "../hooks/hooks";
import IconLabel from "../IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";
import { useAppDispatch } from "../../redux/hooks/hooks";
import IconLabel from "../shared_components/IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../../redux/slices/eventSlice";

import { Button } from "@/components/ui/button";
import {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/events/Events.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CalendarEvent } from "../slices/eventSlice";
import { CalendarEvent } from "../../redux/slices/eventSlice";
import EventInstance from "./Event";

interface EventsProps
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/events/EventsLuma.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from "next/navigation";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";
import { useAppDispatch } from "../../redux/hooks/hooks";
import { SetCurrentPage } from "../../redux/slices/pageSlice";

export default function EventsSection() {
const router = useRouter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
} from "@/components/ui/carousel";

import { useState } from "react";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";
import { useAppDispatch } from "../../../redux/hooks/hooks";
import { SetCurrentPage } from "../../../redux/slices/pageSlice";

// import { fetchEventsAsync } from "../thunks/EventThunks";
// import { CalendarEvent, DefaultCalendarEvent, SetCalendarEvents, SetCurrentEvent, SetFetchIntervalStarted, selectEvent } from "../slices/eventSlice";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { CarouselMy } from './Carosel';
import { CarouselMy } from './Carousel';
import EventsSection from './EventeSection';

function Decision() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Image from "next/image";
import { useState } from "react";
import { useSelector } from "react-redux";
import { useAppDispatch } from "../hooks/hooks";
import IconLabel from "../IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";
import { useAppDispatch } from "../../../redux/hooks/hooks";
import IconLabel from "../../shared_components/IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../../../redux/slices/eventSlice";

import { Button } from "@/components/ui/button";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Image from "next/image";
import { useState } from "react";
import { useSelector } from "react-redux";
import { useAppDispatch } from "../hooks/hooks";
import IconLabel from "../IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";
import { useAppDispatch } from "../../../redux/hooks/hooks";
import IconLabel from "../../shared_components/IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../../../redux/slices/eventSlice";

import { Button } from "@/components/ui/button";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRouter } from "next/navigation";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";
import { useAppDispatch } from "../../../redux/hooks/hooks";
import { SetCurrentPage } from "../../../redux/slices/pageSlice";

export class Range {
Start: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CalendarEvent } from "../slices/eventSlice";
import { CalendarEvent } from "../../../redux/slices/eventSlice";
import EventInstance from "./Event";

interface EventsProps
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/events/EventsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from "react";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";
import { useAppDispatch } from "../../redux/hooks/hooks";
import { SetCurrentPage } from "../../redux/slices/pageSlice";
// import { fetchEventsAsync } from "../thunks/EventThunks";
// import { CalendarEvent, DefaultCalendarEvent, SetCalendarEvents, SetCurrentEvent, SetFetchIntervalStarted, selectEvent } from "../slices/eventSlice";
import { useRouter } from "next/navigation";
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/events/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";

import { Provider } from "react-redux";
import Footer from "../Footer";
import NavBar from "../NavBar";
import { store } from "../stores/store";
import Footer from "../shared_components/footer/Footer";
import NavBar from "../shared_components/header/NavBar";
import { store } from "../../redux/stores/store";
import EventsPage from "./EventsPage";

export default function Page()
Expand Down
104 changes: 13 additions & 91 deletions frontend/src/app/hacks/Body.tsx
Original file line number Diff line number Diff line change
@@ -1,99 +1,21 @@
import {Timer} from "@/app/hacks/Timer";
import SocialIcons from "@/app/SocialIcons";
import {IconLabel} from "@/app/hacks/IconLabel";
import Image from "next/image";
import {Timer} from "./Timer";
import SocialIcons from "@/app/shared_components/SocialIcons";

export function Body()
{
return <div className={"grid-rows-5 bg-hacks-bg-black text-white"}>
<div className={"flex flex-col items-center gap-[7vh] max-[850px]:gap-[8vh] mt-[8vh] max-[850px]:mt-[9vh] font-audiowide"}>

{/*
<div>
<Timer EndTime={new Date(2023, 8, 22, 8, 0, 0)}/>
<span className={"text-sm max-[850px]:text-sm flex flex-col items-center mt-0"}>left until the hackathon</span>
</div>
*/}

<div className={"text-xl max-[850px]:text-sm flex flex-col items-center"}>
<a href="/hacks/schedule" target="_lank" rel="noopener noreferrer"
className="text-xl max-[850px]:text-xl inline-flex itembs-center m-5 justify-center px-5 py-5 border border-transparent leading-6 font-medium rounded-md text-white bg-lang-orange hover:bg-orange-700 focus:outline-none focus:ring focus:ring-orange-300 active:bg-orange-800 transition duration-150 ease-in-out">
⭐ Langara Hacks! 2023! Schedule ⭐
</a>
</div>

<span className={"text-sm"}> Registration is closed! </span>
return <div className={"grid-rows-3 bg-hacks-bg-black items-center"}>

<div className={"flex flex-col items-center mt-3"}>
<span className={"text-3xl max-[850px]:text-xl"}>Schedule</span>
<div className={"flex flex-col items-center justify-center gap-[7vh] max-[850px]:gap-[8vh] mt-[4vh] max-[850px]:mt-[9vh] max-h-full h-[250vh]"}>
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRyF8-IjcBAjemcPYusfUjDub2ZY1qsMOeYzVBfq3bZrHJn0RQ498RVPvAz45TQUmaoGpWZMWGchkfV/pubhtml?gid=1141432285&amp;single=true&amp;widget=true&amp;headers=false" className={"h-full w-[max(52vw,_500px)]"}></iframe>
</div>

<div className={"flex flex-col items-center self-center gap-[5vh] max-[850px]:gap-[6vh] mt-[10vh] max-[850px]:mt-[40vh] max-w-[100vw]"}>
<span className={"text-3xl max-[850px]:text-xl self-center text-bold"}>Prizes</span>
<div className="max-w-[70vw] mb-4 flex flex-col items-center gap-3 text-lg">
<span>First Place: $250</span>
<span>Second Place: $150</span>
<span> Audience Favourite: $100</span>
</div>
</div>

<div className={"flex flex-col items-center self-center gap-[7vh] max-[850px]:gap-[8vh] mt-[8vh] max-[850px]:mt-[9vh] max-w-[100vw]"}>
<span className={"text-3xl max-[850px]:text-xl self-center"}>What is a Hackathon?</span>
<span className="max-w-[70vw] mb-4">
A hackathon is a competition where teams of students (generally 2 - 4) work together and use their software or hardware skills to build a project in a very short amount of time! No actual hacking is involved. A hackathon is a great way to make new bonds, develop skills outside of the classroom, create a portfolio project, gain experience on project management, and so much more!
</span>
</div>

<div className={"flex flex-col items-center justify-center gap-[7vh] max-[850px]:gap-[8vh] mt-[8vh] max-[850px]:mt-[9vh] max-w-[100vw]"}>
<span className={"text-3xl max-[850px]:text-xl"}>Frequently Asked Questions:</span>
<div className={"max-w-[70vw] space-y-4 self-center"}>
<div className="mb-4">
<b>Q: What should I do if I lack coding experience?</b>
<p>A: If you&apos;re unfamiliar with coding, worry not! We will have multiple workshops to prepare you for the hackathon! Even if coding isn&apos;t your strong suit, your participation is still highly encouraged. You can contribute to your team in various other capacities and learn from the experience!</p>
</div>

<div className={"mb-4"}>
<b>Q: Can individuals who are not students at Langara register for the hackathon?</b>
<p>A: Absolutely! We welcome non-Langara students to participate. However, at least 50% of your team must be current Langara students.</p>
</div>

<div className={"mb-4"}>
<b>Q: Are students from disciplines other than computer science or computer studies allowed to participate?</b>
<p>A: Yes! We encourage students from diverse backgrounds to join in. While programming is a vital component of a hackathon, there are numerous other facets to a successful project. You can contribute your expertise to areas such as project presentation, design, or conceptualization!</p>
</div>

<div className="mb-4">
<b>Q: Who is organizing this hackathon?</b>
<p>A: The hackathon is being organized by the Hackathon Task Force in collaboration with the Langara Computer Science Club.</p>
</div>

<div className="mb-4">
<b>Q: Do I need to bring my own food?</b>
<p>A: Lunch and dinner will be provided for all participants! Please let us know your dietary restrictions when you register. You are also welcome to bring your own food or snacks! </p>
</div>

<div className="mb-4">
<b>Q: What if I don&apos;t have a team upon registration?</b>
<p>A: Don&apos;t worry! Even if you don&apos;t currently have a team, you can still register for the hackathon. We will have team building events in the days leading up to the hackathon! Although a team isn&apos;t mandatory, we highly, highly recommend you to form a team of 3 - 4 people!</p>
</div>

</div>
</div>


<div className={""}>
<div className={"flex flex-col items-center gap-[2vh] max-[850px]:gap-[2vh] mt-[8vh] max-[850px]:mt-[9vh]"}>
<span className={"text-3xl max-[850px]:text-xl"}> Sponsors: </span>
<span className={"max-[850px]:text-sm"}> Langara Department of Computer Science </span>
<span className={"max-[850px]:text-sm"}> Langara IT Department </span>
<a className={"max-[850px]:text-sm hover:text-lang-orange"} href ="https://www.microserve.ca/"><Image src={"https://www.microserve.ca/wp-content/uploads/2022/05/microserve-logo-svg.svg"} alt={"Microserve"} height={100} width={150}/></a>
<a href="mailto:[email protected]" className={"hover:text-lang-orange self-center"}> Want to sponsor? Get in touch! </a>
</div>

<br></br>
<br></br>
</div>

<div className={"flex flex-row justify-center h-max gap-5 mb-[20px]"}>
<SocialIcons/>
</div>
</div>
<br></br>

<div className={"flex flex-row justify-center h-max gap-5 mb-[20px]"}>
<SocialIcons/>
</div>
</div>;
}
18 changes: 4 additions & 14 deletions frontend/src/app/hacks/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
import {useState} from "react";
import {IconLabel} from "@/app/hacks/IconLabel";
import {IconLabel} from "./IconLabel";

export function Header()
{
return <div className = {"bg-hacks-nav-black h-full w-full font-audiowide"}>
<div className = {"grid grid-rows-2 h-full gap-1"}>
<div className={"grid items-end h-full mt-2"}>
return <div className = {"bg-hacks-nav-black w-full font-audiowide "}>
<div className = {"grid grid-rows-1 gap-1"}>
<div className={"grid items-end mt-2"}>
<div className={"flex flex-col gap-2"}>
<div className={"text-6xl max-[1100px]:text-3xl self-center"}> Langara <span className={"text-lang-orange"}>Hacks</span></div>
<div className={"text-s max-[850px]:text-sm self-center"}> Collaborate, Create, Innovate </div>
</div>
</div>

<div className={"grid grid-cols-2"}>
<div className={"justify-self-end self-center w-[70vh] max-[850px]:w-[40vh]"}>
<IconLabel iconSrc={"/location_icon.png"} label={"T Gallery, \n Langara College"} height={25} width={25}/>
</div>
<div className={"justify-self-start self-center w-[40vh] max-[850px]:w-[20vh]"}>
<IconLabel iconSrc={"/calender_icon.png"} label={"8:00 AM - 6:30 PM \n Sept 23rd, 2023"} height={25} width={25}/>
</div>
</div>

</div>
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/hacks/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Header} from "./Header";
import {Body} from "@/app/hacks/Body";
import {Body} from "../hacks/Body";

export default function Page()
{
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/hacks/schedule/Body.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Timer} from "@/app/hacks/Timer";
import SocialIcons from "@/app/SocialIcons";
import {Timer} from "../Timer";
import SocialIcons from "@/app/shared_components/SocialIcons";

export function Body()
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/hacks/schedule/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useState} from "react";
import {IconLabel} from "@/app/hacks/IconLabel";
import {IconLabel} from "../IconLabel";

export function Header()
{
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import { useEffect, useState } from 'react';
import { Provider } from 'react-redux';
import Footer from './Footer';
import Footer from './shared_components/footer/Footer';
import HomePage from './HomePage';
import NavBar from './NavBar';
import { store } from './stores/store';
import NavBar from './shared_components/header/NavBar';
import { store } from '../redux/stores/store';



Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/resources/Body.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import SocialIcons from "@/app/SocialIcons";
import SocialIcons from "@/app/shared_components/SocialIcons";

export function Body()
{
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useRouter } from "next/navigation";
import { useState } from 'react';
import * as FaIcons from 'react-icons/fa';
import { useSelector } from "react-redux";
import { useAppDispatch } from "./hooks/hooks";
import { SetCurrentPage, selectCurrentPage } from "./slices/pageSlice";
import { useAppDispatch } from "../../redux/hooks/hooks";
import { SetCurrentPage, selectCurrentPage } from "../../redux/slices/pageSlice";
import SocialIcons from './SocialIcons';

interface MenuProps
Expand Down
File renamed without changes.
Loading

0 comments on commit 7e845f1

Please sign in to comment.