Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation Bar and Footer #14

Merged
merged 15 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
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
2 changes: 2 additions & 0 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
"@types/node": "20.4.9",
"@types/react": "18.2.20",
"@types/react-dom": "^18.2.0",
"bootstrap": "^5.3.1",
"eslint": "8.46.0",
"eslint-config-next": "^13.4.1",
"next": "^13.4.1",
"react": "18.2.0",
"react-bootstrap": "^2.8.0",
"react-dom": "^18.2.0",
"sass": "^1.65.1",
"typescript": "5.1.6"
Expand Down
15 changes: 12 additions & 3 deletions apps/site/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import "bootstrap/dist/css/bootstrap.min.css";
import "./globals.scss";

import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { Fuzzy_Bubbles } from "next/font/google";

import NavBar from "@/components/NavBar/NavBar";
import Footer from "@/components/Footer/Footer";

const inter = Inter({ subsets: ["latin"] });
const fuzzy = Fuzzy_Bubbles({ weight: ["400", "700"], subsets: ["latin"] });

export const metadata: Metadata = {
title: "Create Next App",
Expand All @@ -16,7 +21,11 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={fuzzy.className}>
<NavBar />
{children}
<Footer />
</body>
</html>
);
}
21 changes: 21 additions & 0 deletions apps/site/src/assets/icons/facebook.svg
samderanova marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions apps/site/src/assets/icons/insta.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions apps/site/src/assets/icons/mail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions apps/site/src/assets/icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions apps/site/src/assets/icons/zothacks-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions apps/site/src/assets/images/lined_paper.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions apps/site/src/components/Footer/Footer.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@use "@/lib/styles/variables.scss" as variables;

.footer {
padding-bottom: 7vw;
}

.socials {
display: grid;
grid-template-columns: repeat(4, 7.5vw);
column-gap: 2vw;
place-items: center;
place-content: center;
}

.text {
font-size: 1.5rem;
font-weight: bold;
color: black;
text-align: center;
margin-bottom: 0;
}

@include variables.media-breakpoint-down(md) {
.socials {
grid-template-columns: repeat(4, 10vw);
}
}

@include variables.media-breakpoint-down(sm) {
.socials {
column-gap: 10vw;
}
}

@include variables.media-breakpoint-up(lg) {
.socials {
grid-template-columns: repeat(4, 80px);
column-gap: 20px;
}
}
samderanova marked this conversation as resolved.
Show resolved Hide resolved
62 changes: 62 additions & 0 deletions apps/site/src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import Image from "next/image";

import styles from "./Footer.module.scss";

import Mail from "@/assets/icons/mail.svg";
import Facebook from "@/assets/icons/facebook.svg";
import Instagram from "@/assets/icons/insta.svg";
import Twitter from "@/assets/icons/twitter.svg";

type Social = {
icon: any;
link: string;
alt: string;
width: number;
height: number;
};

const SOCIALS: Social[] = [
{
icon: Mail,
link: "mailto:hack@uci.edu",
alt: "Mail",
width: 79,
height: 59,
},
{
icon: Facebook,
link: "https://www.facebook.com/UCI.Hack/",
alt: "Facebook",
width: 59,
height: 59,
},
{
icon: Instagram,
link: "https://www.instagram.com/hackatuci/",
alt: "Instagram",
width: 69,
height: 72,
},
{
icon: Twitter,
link: "https://www.twitter.com/HackUCI",
alt: "Twitter",
width: 64,
height: 53,
},
];

export default function Footer() {
return (
<footer className={styles.footer}>
<p className={styles.text}>Made with &lt;3 in Irvine, CA - Hack @ UCI</p>
<div className={styles.socials}>
{SOCIALS.map(({ icon, link, alt, width, height }: Social) => (
<a key={link} href={link} target="_blank">
<Image src={icon.src} alt={alt} width={width} height={height} />
</a>
))}
</div>
</footer>
);
}
87 changes: 87 additions & 0 deletions apps/site/src/components/NavBar/NavBar.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@use "@/lib/styles/variables.scss" as variables;

.nav {
position: fixed;
width: 100%;
}

.navbar {
background-image: url("~@/assets/images/lined_paper.svg");
background-size: cover;
background-position: left bottom;
background-repeat: no-repeat;
filter: drop-shadow(0px 2.5px 2px rgba(0, 0, 0, 0.4));
}

.logo {
position: absolute;
left: 30px;
width: 20vw;
height: 20vw;
text-align: center;
transform: rotate(-16.81deg) translateY(-5vw);
}

.homeNotActive,
.resourcesNotActive,
.scheduleNotActive {
margin-left: 1vw;
margin-right: 1vw;
font-size: 2rem;
font-weight: bold;
color: black;
text-decoration: none;
}

.homeActive {
margin-left: 1vw;
margin-right: 1vw;
font-size: 2rem;
font-weight: bold;
color: black;
text-decoration: none;
color: variables.$green;
samderanova marked this conversation as resolved.
Show resolved Hide resolved
}

.resourcesActive {
margin-left: 1vw;
margin-right: 1vw;
font-size: 2rem;
font-weight: bold;
color: black;
text-decoration: none;
color: variables.$blue;
}
samderanova marked this conversation as resolved.
Show resolved Hide resolved

.scheduleActive {
margin-left: 1vw;
margin-right: 1vw;
font-size: 2rem;
font-weight: bold;
color: black;
text-decoration: none;
color: variables.$navbar-red;
}

@include variables.media-breakpoint-down(md) {
.logo {
left: 3vw;
transform: rotate(-16.81deg) translateY(-6vw);
}
.homeNotActive,
.resourcesNotActive,
.scheduleNotActive,
.homeActive,
.resourcesActive,
.scheduleActive {
font-size: 1.5rem;
}
}

@include variables.media-breakpoint-up(lg) {
.logo {
width: 180px;
height: 180px;
transform: rotate(-16.81deg) translateY(-50px);
}
}
65 changes: 65 additions & 0 deletions apps/site/src/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"use client";

import { usePathname } from "next/navigation";
import Link from "next/link";
import Image from "next/image";

import Container from "react-bootstrap/Container";
import Nav from "react-bootstrap/Nav";
import Navbar from "react-bootstrap/Navbar";

import ZotHacksLogo from "@/assets/icons/zothacks-logo.svg";

import styles from "./NavBar.module.scss";

export default function NavBar() {
const activeRoute = usePathname();

return (
<nav className={styles.nav}>
<Navbar expand="md" className={`bg-body-tertiary ${styles.navbar}`}>
<Container fluid>
<Navbar.Brand />
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="ms-auto text-center">
<Link
href="/"
className={
activeRoute === "/" ? styles.homeActive : styles.homeNotActive
}
>
Home
</Link>
<Link
href="/resources"
className={
activeRoute === "/resources"
? styles.resourcesActive
: styles.resourcesNotActive
}
>
Resources
</Link>
<Link
href="/schedule"
className={
activeRoute === "/schedule"
? styles.scheduleActive
: styles.scheduleNotActive
}
>
Schedule
</Link>
</Nav>
</Navbar.Collapse>
</Container>
</Navbar>
<Link href="/">
<div className={styles.logo}>
<Image src={ZotHacksLogo.src} alt="ZotHacks Logo" fill />
</div>
</Link>
</nav>
);
}
6 changes: 6 additions & 0 deletions apps/site/src/lib/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// Common variables for site theme consistency

// import bootstrap scss
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins";

// colors
$white: #fafaff; // Paper Background color
$beige: #faf4ea;
Expand All @@ -14,6 +19,7 @@ $green: #3df048;
$light-blue: #81deeb;
$blue: #3902fd;
$purple: #6600b6;
$navbar-red: #ff0000;

// fonts
$fuzzy-bubbles: "Fuzzy Bubbles", cursive;
2 changes: 1 addition & 1 deletion apps/site/src/views/Landing/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export default function Landing() {
<h1>ZotHacks 2023</h1>
</main>
);
}
}
Loading
Loading