Skip to content

Commit

Permalink
add the chic tech temp modal (#306)
Browse files Browse the repository at this point in the history
Co-authored-by: Saloni Vaishnav <[email protected]>
  • Loading branch information
inolasv and Saloni Vaishnav authored Sep 11, 2024
1 parent 0c1971e commit a0e9b7a
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 22 deletions.
30 changes: 29 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import React, { useState } from 'react';
import Head from 'next/head';
import Image from 'next/image';
import { Inter } from 'next/font/google';
import Link from 'next/link';

import AboutUsSection from '../sections/AboutUsSection';
import ComputerWindow from '../components/general/ComputerWindowComponent';
Expand All @@ -14,6 +15,8 @@ import styles from '@/styles/pages/Home.module.css';
const inter = Inter({ subsets: ['latin'] });

export default function Home() {
const [showTempModal, setShowTempModal] = useState(true);

return (
<>
<Head>
Expand Down Expand Up @@ -77,6 +80,31 @@ export default function Home() {
</Head>

<main className={`${styles.main} ${inter.className}`}>
{/* temporary for chic tech 2024: */}
{showTempModal && (
<ComputerWindow className={styles.tempModalContainer}>
<div className={styles.tempModal}>
<p>Interested in attending ChicTech 2024?</p>
<div className={styles.tempModalButtonContainer}>
<Link
href="https://docs.google.com/document/d/1EPZ560SkJqddTxeHNtoeSmiy8rWYRWTMnXCYQOhYF18/edit"
className={styles.tempModalButton}
>
Learn More
</Link>
<button
type="button"
className={styles.tempModalButton}
onClick={() => setShowTempModal(false)}
>
Dismiss
</button>
</div>
</div>
</ComputerWindow>
)}
{/* */}

<h1 className={styles.title}>Illinois Women in Computer Science</h1>
<div className={`${styles.windowContainer}`}>
<div className={`${styles.windowGrid}`}>
Expand Down
22 changes: 4 additions & 18 deletions src/sections/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,10 @@ export default function WCSNavbar() {
<div
className={`${styles.linksContainer} ${isMenuOpen ? styles.show : ''}`}
>
<NavLink
href="https://points.illinoiswcs.org/"
label="points"
/>
<NavLink href="https://points.illinoiswcs.org/" label="points" />
<NavLink href="/officers" label="officers" onClick={handleLinkClick} />
<NavLink
href="/committees"
label="committees"
/>
<NavLink
href="/resources"
label="resources"
/>
<NavLink href="/committees" label="committees" />
<NavLink href="/resources" label="resources" />
</div>

<button type="button" className={styles.hamburger} onClick={toggleMenu}>
Expand All @@ -77,12 +68,7 @@ export default function WCSNavbar() {
<div className={`${styles.bar} ${isMenuOpen ? styles.open3 : ''}`} />
</button>

{isMenuOpen
&& (
<NavbarMobile
handleLinkClick={handleLinkClick}
/>
)}
{isMenuOpen && <NavbarMobile handleLinkClick={handleLinkClick} />}
</div>
);
}
47 changes: 47 additions & 0 deletions src/styles/pages/Home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,53 @@
background-size: contain;
}

.tempModal {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.25rem;
margin: 1rem;
min-width: fit-content;
color: #21636c;
}

.tempModalButton {
padding: 0.2rem 1rem 0.2rem 1rem;
border-radius: 0.5rem;
border-width: 0px;
position: relative;
max-width: 200px;
margin: 0.2rem;
background-color: var(--light-pink);

text-align: center;
font-size: small;
color: #21636c;
}

.tempModalButtonContainer {
display: flex;
flex-direction: row;
}

.tempModalContainer {
position: fixed;
z-index: 99;
animation: show-temp-modal ease-in-out 0.9s backwards;
right: 2em;
bottom: 2em;
}

@keyframes show-temp-modal {
from {
transform: translateX(100vw);
}
to {
transform: translateX(0vw);
}
}

.windowContainer {
max-width: 825px;
}
Expand Down
6 changes: 3 additions & 3 deletions src/styles/sections/Navbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

.hamburger {
display: none;
display: none;
cursor: pointer;
padding: 15px 25px 15px 25px;
background-color: transparent;
Expand Down Expand Up @@ -67,12 +67,12 @@

@media (max-width: 1000px) {
.linksContainer {
display: none;
display: none;
position: absolute;
}

.hamburger {
display: block;
display: block;
}
}

Expand Down

0 comments on commit a0e9b7a

Please sign in to comment.