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

Create intro and mentor sections #26

Merged
merged 14 commits into from
Sep 26, 2023
Merged
4 changes: 2 additions & 2 deletions apps/site/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import "@/lib/styles/bootstrap.scss";
import "@/lib/styles/globals.scss";

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "ZotHacks",
description: "Hack at UCI's premier hackathon for beginners at UCI",
};

export default function RootLayout({
Expand Down
18 changes: 18 additions & 0 deletions apps/site/src/assets/images/MentorStickyGreen.svg
taesungh 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.
18 changes: 18 additions & 0 deletions apps/site/src/assets/images/MentorStickyYellow.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.
Binary file added apps/site/src/assets/images/YellowVertPost-it.png
taesungh marked this conversation as resolved.
Show resolved Hide resolved
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.
Binary file added apps/site/src/assets/images/bookmark.png
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.
Binary file added apps/site/src/assets/images/bookmark_border.png
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/hack-doodle.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.
41 changes: 41 additions & 0 deletions apps/site/src/assets/images/index-card-pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/site/src/assets/images/index-card.png
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.
3 changes: 3 additions & 0 deletions apps/site/src/assets/images/tape.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions apps/site/src/components/BookmarkLink/BookmarkLink.module.scss
taesungh marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.bookmarkLink {
background-image: url("~@/assets/images/bookmark.png");
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center;
text-decoration: none;
color: black;
padding-left: 2.5rem;
padding-right: 3rem;
transition: background-image 0.2s ease, font-weight 0.2s ease;

&:hover {
background-image: url("~@/assets/images/bookmark_border.png");
transition: background-image 0.2s ease, font-weight 0.2s ease;
color: black;
font-weight: bold;
}
}
26 changes: 26 additions & 0 deletions apps/site/src/components/BookmarkLink/BookmarkLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";
import Button from "react-bootstrap/Button";

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

interface BookmarkLinkProps {
className?: string;
href: string;
children: React.ReactNode;
taesungh marked this conversation as resolved.
Show resolved Hide resolved
}

export default function BookmarkLink({
className,
href,
children,
}: BookmarkLinkProps) {
return (
<Button
className={styles.bookmarkLink + " " + className}
variant="link"
href={href}
>
{children}
</Button>
);
}
2 changes: 2 additions & 0 deletions apps/site/src/lib/styles/_bootstrap-utils.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "./zothacks-theme";

@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/variables-dark";
Expand Down
5 changes: 5 additions & 0 deletions apps/site/src/lib/styles/_zothacks-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ $light-blue: #81deeb;
$blue: #3902fd;
$purple: #6600b6;
$navbar-red: #ff0000;

// bootstrap overrides
$font-family-base: var(--next-font-fuzzy-bubbles);
$font-size-base: 1.25rem;
$headings-font-weight: 700;
taesungh marked this conversation as resolved.
Show resolved Hide resolved
16 changes: 16 additions & 0 deletions apps/site/src/lib/useWindowWidth.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { useState, useEffect } from "react";

export default function useWindowWidth() {
const [windowWidth, setWindowWidth] = useState(window.innerWidth);

useEffect(() => {
function handleResize() {
setWindowWidth(window.innerWidth);
}

window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
});

return windowWidth;
}
8 changes: 4 additions & 4 deletions apps/site/src/views/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";

import Landing from "./sections/Landing/Landing";
import About from "./sections/About/About";
import Mentors from "./sections/Mentors/Mentors";
taesungh marked this conversation as resolved.
Show resolved Hide resolved
import Intro from "./sections/Intro/Intro";
import Mentor from "./sections/Mentor/Mentor";
import Sponsors from "./sections/Sponsors/Sponsors";
import FAQ from "./sections/FAQ/FAQ";

Expand All @@ -12,8 +12,8 @@ function Home() {
return (
<div className={styles.home}>
<Landing />
<About />
<Mentors />
<Intro />
<Mentor />
<Sponsors />
<FAQ />
</div>
Expand Down
43 changes: 43 additions & 0 deletions apps/site/src/views/Home/sections/Intro/Intro.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@use "bootstrap-utils" as bootstrap;

.intro {
background-image: url("~src/assets/images/index-card.png");
background-size: 100% 100%;
samderanova marked this conversation as resolved.
Show resolved Hide resolved
background-position: center;
background-repeat: no-repeat;
padding: 5rem 1rem;
position: relative;
text-align: center;

h2 {
margin-bottom: 70px;
}

@include bootstrap.media-breakpoint-up(sm) {
& {
taesungh marked this conversation as resolved.
Show resolved Hide resolved
padding: 8rem 4rem;
}
}
taesungh marked this conversation as resolved.
Show resolved Hide resolved
}

.pin {
position: absolute;
top: 0;
left: 50%;
transform: translate(-75%, -50%);
width: auto;
}

.hackDoodle {
position: absolute;
bottom: 0;
right: 0;
transform: translate(-25%, 50%);
width: auto;

@include bootstrap.media-breakpoint-down(lg) {
& {
display: none;
}
}
}
34 changes: 34 additions & 0 deletions apps/site/src/views/Home/sections/Intro/Intro.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Image from "next/image";
import Row from "react-bootstrap/Row";
import pin from "@/assets/images/index-card-pin.svg";
import hackDoodle from "@/assets/images/hack-doodle.svg";
import styles from "./Intro.module.scss";

export default function Intro() {
return (
<Row className={styles.intro + " m-5"}>
<Image
samderanova marked this conversation as resolved.
Show resolved Hide resolved
className={styles.pin}
src={pin}
width="100"
height="100"
alt="Index card pin"
/>
<h2>What is ZotHacks?</h2>
<p>
ZotHacks is a beginner-friendly hackathon where students with minimal
computer science experience will learn to build their first CS project.
Through ZotHacks, we introduce these students to the world of hackathons
and web development by providing technical workshops, strong mentorship,
and free food!
</p>
<Image
className={styles.hackDoodle}
src={hackDoodle}
width="250"
height="250"
alt="Hack logo doodle"
/>
</Row>
);
}
102 changes: 102 additions & 0 deletions apps/site/src/views/Home/sections/Mentor/Mentor.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
@use "bootstrap-utils" as bootstrap;

.applySticky {
background-image: url("~@/assets/images/MentorStickyYellow.svg");
background-repeat: no-repeat;
background-size: contain;
padding-top: 3rem;
padding-left: 5rem;
padding-right: 5rem;
padding-bottom: 8rem;
margin-left: 22%;
position: relative;
height: 325px;
samderanova marked this conversation as resolved.
Show resolved Hide resolved

h2 {
font-size: 1.8rem;
}

a {
position: absolute;
bottom: 10%;
left: 5%;
transform: rotate(7.5deg);
}


@include bootstrap.media-breakpoint-down(xxl) {
& {
margin-left: 17.5%;
}
}
}

.descSticky {
background-image: url("~@/assets/images/MentorStickyGreen.svg");
background-repeat: no-repeat;
background-size: contain;
background-position: 60%;
padding: 6rem;
position: absolute;
z-index: -1;
top: 15%;
left: 40%;
width: 41.667%;
samderanova marked this conversation as resolved.
Show resolved Hide resolved

p {
transform: rotate(-5deg);
}

@include bootstrap.media-breakpoint-down(xxl) {
& {
top: 10%;
left: 42%;
}
}

@include bootstrap.media-breakpoint-down(xl) {
& {
width: 50%;
padding: 5rem;
}
}
}

.applyStickyMobile {
background-image: url("~@/assets/images/YellowVertPost-it.png");
background-repeat: no-repeat;
background-size: 100% 100%;
z-index: 1;
}

.descStickyMobile {
background-image: url("~@/assets/images/MentorStickyGreen.svg");
background-repeat: no-repeat;
background-size: contain;
position: absolute;
width: 300px;
height: 300px;
right: 0;
bottom: -15%;
z-index: 0;

a {
position: absolute;
bottom: 0;
z-index: 100;
transform: rotate(-5deg);
}

@include bootstrap.media-breakpoint-up(sm) {
& {
bottom: -25%;
}
}
}

.tape {
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, -50%);
}
Loading
Loading