Skip to content

Commit

Permalink
some "minor" changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Nov 28, 2024
1 parent adff1b7 commit 932f66c
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 83 deletions.
Binary file added frontend/public/blank_profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 7 additions & 58 deletions frontend/src/app/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,80 +1,29 @@
"use client";

import { UnknownAction } from "@reduxjs/toolkit";
import { useEffect } from "react";
// import Decision from "./events/EventsOnHomePage/Decision";
// import ClubSummary from "./shared_components/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;

interface HomePageProps {
}

export default function HomePage({ }: HomePageProps) {
// const execProfiles = useAppSelector(selectProfile);
const mainDispatch = useAppDispatch();

mainDispatch(SetCurrentPage("/"));

// useEffect(() => {
// (async () => {
// if (execProfiles.length < 1) {
// const promise: UnknownAction = (mainDispatch(loadProfilesAsync() as AppDispatch));

// ((await promise) as unknown as ExecProfileObject[]).forEach((element: ExecProfileObject) => {
// mainDispatch(AddExecProfile(element));
// });
// }
// })();
// });

let css: string = "", flexContainer: string = "flex flex-row max-[600px]:justify-center max-[600px]:mx-0 ml-[10%]";
let size: number = 5;

<div className={"text-3xl"}></div>;
<div className={"text-2xl"}></div>;
<div className={"flex-col-reverse"}></div>;

export default function HomePage() {
return (
<>
<div className={"flex flex-row max-[600px]:flex-col bg-body-gray w-full h-full"}>
<div className={"grid grid-rows-[15%_60%_20%] max-[600px]:grid-rows-1 w-full h-full gap-3 max-[600px]: gap-1 max-[900px]:basis-1/3"}>

<div className={"flex row-start-2 flex-col row-span-1 text-7xl max-[900px]:text-5xl max-[600px]:text-3xl text-white-900 justify-center"}>
<div className={flexContainer}>
<div className="flex flex-row max-[600px]:flex-col bg-body-gray w-full h-full">
<div className="grid grid-rows-[15%_60%_20%] max-[600px]:grid-rows-1 w-full h-full gap-3 max-[600px]:gap-1 max-[900px]:basis-1/3">
<div className="flex row-start-2 flex-col row-span-1 text-7xl max-[900px]:text-5xl max-[600px]:text-3xl text-white-900 justify-center">
<div className="flex flex-row max-[600px]:justify-center max-[600px]:mx-0 ml-[10%]">
<span className="shrink text-lang-orange">Langara</span>
</div>

<div className={flexContainer}>
<div className="flex flex-row max-[600px]:justify-center max-[600px]:mx-0 ml-[10%]">
<span className="shrink">Computer</span>
</div>

<div className={flexContainer}>
<div className="flex flex-row max-[600px]:justify-center max-[600px]:mx-0 ml-[10%]">
<span className="shrink">Science Club</span>
</div>

</div>
</div>

<div className="grid grid-rows-[20%_60%_20%] max-[600px]:grid-rows-1 w-full h-full">
<div className="flex flex-row row-start-2 row-span-1 justify-center max-[600px]:mt-0">

<img className="max-[600px]:h-auto max-[600px]:w-[100%] shrink-0" src="code_snippet.png" alt="Picture of code that asks the viewer to join the club" />

</div>
</div>


</div>
{/* <Decision /> */}

{/* <ClubSummary/> */}
</>
);
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/about/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function AboutPage({ }: AboutPageProps) {
<ExecProfiles />
</div>

<span className="text-left">{`Are you a former executive? Please reach out through our email if you would like anything changed <3`}</span>
</div>
);
}
12 changes: 9 additions & 3 deletions frontend/src/app/about/ExecProfiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default async function ExecProfiles() {
ImageBuffer={
exec.profile_picture
? `https://${exec.profile_picture}`
: 'https://via.placeholder.com/200x200'
: '/blank_profile.jpg'
}
Description={exec.bio || ''}
/>
Expand All @@ -80,7 +80,7 @@ export default async function ExecProfiles() {
{sortedRetiredYears.map(year => (
<div key={year} className="mt-10">
<h2 className="text-2xl font-semibold pb-5">Retired Executives - {year}</h2>
<div className=" flex flex-wrap flex-row gap-5">
<div className="flex flex-wrap flex-row gap-5">
{groupedRetiredExecutives[year].map((exec) => (
<ExecProfile
key={exec.student_id}
Expand All @@ -90,7 +90,7 @@ export default async function ExecProfiles() {
ImageBuffer={
exec.profile_picture
? `https://${exec.profile_picture}`
: 'https://via.placeholder.com/200x200'
: '/blank_profile.jpg'
}
Description={exec.bio || ''}
/>
Expand All @@ -99,6 +99,12 @@ export default async function ExecProfiles() {
</div>
))}
<br></br>


</div>


);


}
3 changes: 2 additions & 1 deletion frontend/src/app/about/ProfileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ interface ProfileModalProps {

export default function ProfileModal({Name, Position, ImageBuffer, Description, imageWidth}: ProfileModalProps) {
return (
<Dialog.Content className="relative max-w-[90vw] md:max-w-[60vw] max-h-[90vh] md:max-h-[60vh] overflow-y-auto p-5">
// TODO: FIX modal description text doesn't scroll
<Dialog.Content className="relative max-w-[90vw] md:max-w-[60vw] max-h-[90vh] md:max-h-[60vh] overflow-y-scroll p-5">
<VisuallyHidden>
<DialogTitle>{Name}</DialogTitle>
</VisuallyHidden>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default function Page()
<NavBar/>
<div className="p-[20px] pt-5 max-w-6xl mx-auto ">
<AboutPage/>

</div>
<Footer />
</main>
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/app/events/EventItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ interface EventItemProps {
export default function EventItem({ event }: EventItemProps) {
const imageUrl = event.thumbnail
? `https://${event.thumbnail}`
: 'https://via.placeholder.com/400x200';
: '/lcs.png';

return (
<div key={event.id} className="rounded border-2 bg-gray w-64">
<div key={event.id} className="rounded border-2 bg-gray w-64">
<Image
src={imageUrl}
alt={event.event_name}
width={400}
height={200}
className='w-[400px] h-[200px] object-cover'
className='w-[400px] h-[200px] rounded object-cover'
/>

<div className="p-2">
Expand All @@ -37,13 +37,13 @@ export default function EventItem({ event }: EventItemProps) {
<p className="text-xs">{event.location}</p>
</div>

{/* {event.registration_link && (
{event.registration_link && (
<Link href={event.registration_link} target="_blank" rel="noopener noreferrer">
<button className="w-full bg-blue-500 text-white ">
<button className="w-[100px] p-2 ml-2 mb-2 border-2 rounded bg-blue-500 text-white ">
Register
</button>
</Link>
)} */}
)}
</div>
);
}
2 changes: 1 addition & 1 deletion frontend/src/app/events/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Footer from "../shared_components/footer/Footer";

export default function Page() {
return (
<main className="grid grid-rows-[10vh_1fr] max-[600px]:grid-rows-[20vh_1fr] overflow-hidden">
<main className="grid grid-rows-[10vh_1fr] bg-body-gray max-[600px]:grid-rows-[20vh_1fr] overflow-hidden">
<NavBar/>
<div className="p-[20px] pt-5 max-w-6xl mx-auto">

Expand Down
22 changes: 9 additions & 13 deletions frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"use client";

import { useEffect, useState } from 'react';
import { Provider } from 'react-redux';
import Footer from './shared_components/footer/Footer';
import HomePage from './HomePage';
import NavBar from './shared_components/header/NavBar';
import { store } from '../redux/stores/store';
import Events from './events/page'; // Import the Events component

export default function Home() {
Expand All @@ -23,17 +21,15 @@ export default function Home() {
}, []);

return (
<Provider store={store}> {/* Wrap the entire application in Provider */}
<div className='h-screen w-full bg-body-gray'>
<main className="grid grid-rows-[10vh_1fr] dark max-[600px]:grid-rows-[20vh_1fr] h-full w-full overflow-y-visible overflow-x-hidden">
<NavBar />
<HomePage />
<Footer />
{/* You can render the Events component here if needed */}
{/* <Events /> */}
</main>
</div>
</Provider>
<div className='h-screen w-full bg-body-gray'>
<main className="grid grid-rows-[10vh_1fr] dark max-[600px]:grid-rows-[20vh_1fr] h-full w-full overflow-y-visible overflow-x-hidden">
<NavBar />
<HomePage />
<Footer />
{/* You can render the Events component here if needed */}
{/* <Events /> */}
</main>
</div>
);
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/shared_components/header/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function NavBar() {
<div className="flex flex-row justify-between items-center mx-auto px-4 md:px-10">
<div className="flex flex-row items-center justify-start">
<Link href="/">
<img src="LCS.png" alt="club-logo" className="shrink-0 grow-0 w-16 h-20 cursor-pointer select-none" />
<img src="LCS.png" alt="club-logo" className="shrink-0 grow-0 w-16 h-20 cursor-pointer select-none object-cover" />
</Link>
<div className="justify-center items-start lg:justify-start lg:flex hidden">
{navButtons}
Expand Down

0 comments on commit 932f66c

Please sign in to comment.