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
Show file tree
Hide file tree
Changes from 12 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
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
6 changes: 6 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.
6 changes: 6 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/hack-doodle.png
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.
26 changes: 26 additions & 0 deletions apps/site/src/assets/images/index-card.svg
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.
80 changes: 80 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,80 @@
@use "sass:list";
@use "bootstrap-utils" as bootstrap;

.bookmarkLink {
@include bootstrap.button-variant(
white,
transparent,
$hover-border: bootstrap.$dark,
$active-border: bootstrap.$dark,
$active-color: bootstrap.$link-hover-color
);

$border-width: 2px;
--bs-btn-border-width: #{$border-width};
// disable active shadow since not so simple to extend shadow to ::after
--bs-btn-active-shadow: none;
--bs-btn-border-radius: 0;

padding-left: 1.5rem;
padding-right: 0;

filter: drop-shadow(2px 1px 4px rgba(black, 0.15));

transition: list.append(
list.append(bootstrap.$btn-transition, padding-left 0.15s ease-in-out),
font-weight 0.15s ease-in-out // non-variable but to synchronize delay
);

$height: calc(2.5rem + 2 * $border-width);
height: $height;
$chevron-size: calc($height / 2);

&::before,
&::after {
content: "";
position: absolute;
top: -$border-width;
left: 100%;
transition:
border-color 0.15s ease-in-out,
filter 0.15s ease-in-out;
}

&::before {
border-top: $chevron-size solid white;
border-right: $chevron-size solid transparent;
border-bottom: $chevron-size solid white;
border-left: $chevron-size solid white;
filter: drop-shadow(2px 1px 1px rgba(black, 0.1));
}

&::after {
border-top: $border-width solid white;
border-bottom: $border-width solid white;
border-right: $border-width solid transparent;
width: $height;
height: $height;
}

&:hover,
&:focus-visible {
padding-left: 2rem; // pulling effect
font-weight: bold;
}

&:hover,
&:focus-visible,
&:active {
border-right-color: transparent;

&::before {
filter: drop-shadow(5px 2px 4px rgba(black, 0.1));
}

&::after {
border-top-color: var(--bs-btn-active-border-color);
border-bottom-color: var(--bs-btn-active-border-color);
}
}
}
25 changes: 25 additions & 0 deletions apps/site/src/components/BookmarkLink/BookmarkLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { PropsWithChildren } from "react";
import Button from "react-bootstrap/Button";

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

interface BookmarkLinkProps {
className?: string;
href: string;
}

export default function BookmarkLink({
className,
href,
children,
}: PropsWithChildren<BookmarkLinkProps>) {
return (
<Button
className={styles.bookmarkLink + " " + className}
variant=""
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
1 change: 1 addition & 0 deletions apps/site/src/lib/styles/_zothacks-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $pink: #ffa8c3;
$orange: #ff5c00;
$gold: #ffd600; // accent colors
$yellow: #ffff00; // highlighter
$sticky-yellow: #ffffa9;
$green: #3df048;
$light-blue: #81deeb;
$blue: #3902fd;
Expand Down
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
11 changes: 0 additions & 11 deletions apps/site/src/views/Home/sections/About/About.tsx

This file was deleted.

36 changes: 36 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,36 @@
@use "bootstrap-utils" as bootstrap;

.intro {
@include bootstrap.padding(8rem 4rem);

background-image: url("~src/assets/images/index-card.svg");
background-size: 100% 100%;
background-position: center;
background-repeat: no-repeat;
position: relative;
text-align: center;

h2 {
margin-bottom: 70px;
}
}

.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;
}
}
37 changes: 37 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,37 @@
import Image from "next/image";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import pin from "@/assets/images/index-card-pin.svg";
import hackDoodle from "@/assets/images/hack-doodle.png";
import styles from "./Intro.module.scss";

export default function Intro() {
return (
<Container as="section">
<Row className={styles.intro + " mx-2"}>
samderanova marked this conversation as resolved.
Show resolved Hide resolved
<Image
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>
</Container>
);
}
Loading
Loading