-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from HackAtUCI/feature/intro-and-mentor
Create intro and mentor sections
- Loading branch information
Showing
20 changed files
with
6,699 additions
and
2,852 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
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.
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.
80 changes: 80 additions & 0 deletions
80
apps/site/src/components/BookmarkLink/BookmarkLink.module.scss
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,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); | ||
} | ||
} | ||
} |
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,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> | ||
); | ||
} |
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 |
---|---|---|
@@ -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; | ||
} |
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 was deleted.
Oops, something went wrong.
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,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; | ||
} | ||
} |
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,38 @@ | ||
import Image from "next/image"; | ||
import Container from "react-bootstrap/Container"; | ||
|
||
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"> | ||
<div className={styles.intro}> | ||
<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" | ||
/> | ||
</div> | ||
</Container> | ||
); | ||
} |
Oops, something went wrong.