-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/TritonSE/PIA-Program-Manager …
…into feature/aaronchan32/edit-student-route
- Loading branch information
Showing
19 changed files
with
766 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/** | ||
* Navigation Component | ||
* | ||
* Wraps the content of the current page with the navbar | ||
* Uses the constant in `src/constants` to populate the actual sidebar | ||
*/ | ||
import { Poppins } from "next/font/google"; | ||
import Image from "next/image"; | ||
import React, { useMemo } from "react"; | ||
|
||
import { useWindowSize } from "../hooks/useWindowSize"; | ||
import { cn } from "../lib/utils"; | ||
|
||
const poppins = Poppins({ subsets: ["latin"], weight: "400" }); | ||
|
||
// the logo and company name component | ||
const Logo = () => { | ||
return ( | ||
<div className="flex h-full flex-col items-center justify-center"> | ||
<div className="mb-14 flex flex-col items-center"> | ||
<h1 className="font-[alternate-gothic] text-6xl text-white max-lg:text-5xl">Welcome to</h1> | ||
<h1 className="font-[alternate-gothic] text-6xl text-white max-lg:text-5xl"> | ||
Plant it Again! | ||
</h1> | ||
</div> | ||
<div className="flex h-[50%] flex-col items-center"> | ||
<Image alt="company logo" src="/sidebar/logo.png" width={250} height={250} className="" /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
// Navigation component that wraps the content of the page | ||
function Landing({ children }: { children: React.ReactNode }) { | ||
const { width } = useWindowSize(); | ||
const isMobile = useMemo(() => width <= 640, [width]); | ||
|
||
return ( | ||
<main | ||
className={cn( | ||
"flex h-full w-full bg-pia_primary_light_green max-sm:relative sm:max-lg:flex-col", | ||
poppins.className, | ||
)} | ||
> | ||
{/* Login left side */} | ||
{!isMobile ? ( | ||
<div | ||
className={cn( | ||
"flex h-screen w-full bg-pia_primary_light_green max-sm:relative", | ||
poppins.className, | ||
)} | ||
> | ||
<div | ||
className={cn( | ||
"z-10 flex h-screen w-[50%] flex-col", // Adjust the width based on the isMobile flag | ||
"flex-col gap-12 bg-pia_dark_green pt-16 text-pia_accent_green transition-transform", | ||
)} | ||
> | ||
<Logo /> | ||
</div> | ||
<div | ||
className={cn( | ||
"flex h-screen w-[50%] flex-col", // Adjust the width based on the isMobile flag | ||
)} | ||
> | ||
{children} | ||
</div> | ||
</div> | ||
) : ( | ||
<div | ||
className={cn( | ||
"flex h-screen w-full bg-pia_primary_light_green max-sm:relative", | ||
poppins.className, | ||
)} | ||
> | ||
{children} | ||
</div> | ||
)} | ||
</main> | ||
); | ||
} | ||
|
||
export default Landing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
import { AppProps } from "next/app"; | ||
|
||
import Navigation from "../components/Navigation"; | ||
import Landing from "../components/Landing"; | ||
|
||
import "../styles/global.css"; | ||
import "../styles/globals.css"; | ||
|
||
// import Navigation from "../components/Navigation"; | ||
|
||
function App({ Component, pageProps }: AppProps) { | ||
return ( | ||
<Navigation> | ||
<Landing {...pageProps}> | ||
<Component {...pageProps} /> | ||
</Navigation> | ||
</Landing> | ||
// <Navigation> | ||
// <Component {...pageProps} /> | ||
// </Navigation> | ||
); | ||
} | ||
export default App; |
Oops, something went wrong.