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

Final edits #33

Merged
merged 58 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
db81d85
Merge branch 'main' into charles
May 17, 2023
3b69bde
getCommitteeInfo function
ChiweiChen May 26, 2023
f4258bc
getCommitteeInfo function
ChiweiChen May 26, 2023
35bffd2
gets basic info now
ChiweiChen May 26, 2023
ff5ecca
test
ChiweiChen May 26, 2023
cacebce
landing backend setup
ChiweiChen May 29, 2023
02c1d7f
Merge branch 'main' of https://github.com/uclaacm/committee-website-t…
elizabethkim11 May 29, 2023
d1bf8f9
linting
elizabethkim11 May 29, 2023
c8e25c6
Change color var to favicon link
elizabethkim11 May 29, 2023
4c26307
Landing bg image backend done
elizabethkim11 May 29, 2023
48dbc6b
Linting
elizabethkim11 May 29, 2023
5981115
synced officer backend with frontend and changed config
May 29, 2023
f700686
Reformat board card
andyren12 May 30, 2023
46e4488
Reformat board card
andyren12 May 30, 2023
04dba68
before git pull
ChiweiChen May 30, 2023
8c038df
Merge branch 'landingBackend' of https://github.com/uclaacm/committee…
ChiweiChen May 30, 2023
141fbab
Merge branch 'landingBackend' into elizabeth
elizabethkim11 May 31, 2023
e24fec8
Merge branch 'main' of https://github.com/uclaacm/committee-website-t…
elizabethkim11 May 31, 2023
9ad7daa
Merge branch 'main' of https://github.com/uclaacm/committee-website-t…
elizabethkim11 May 31, 2023
840d90d
make script write to output.json
elizabethkim11 May 31, 2023
cf556dd
linting
elizabethkim11 May 31, 2023
44734fc
padding for pages
ChiweiChen Jun 1, 2023
c8bff1d
css changes
ChiweiChen Jun 1, 2023
ebbf61c
Merge branch 'main' into landingBackend
ChiweiChen Jun 1, 2023
97f8fc0
padding below navbar + main merged into landing page backend
ChiweiChen Jun 1, 2023
2363569
Test landing page script
andyren12 Jun 1, 2023
fe473fd
change back to ICPC
ChiweiChen Jun 1, 2023
060919d
Fetch spreadsheet data for footer
andyren12 Jun 1, 2023
cabd8f0
Move output.json to public
elizabethkim11 Jun 1, 2023
621db6e
linting
elizabethkim11 Jun 1, 2023
86a45b4
Merge remote-tracking branch 'origin/andy' into elizabeth
elizabethkim11 Jun 1, 2023
79666ec
Component backend
elizabethkim11 Jun 1, 2023
0e31878
Linting
elizabethkim11 Jun 1, 2023
8816a93
Navbar color variable
andyren12 Jun 1, 2023
69378fc
Merge branch 'elizabeth' of https://github.com/uclaacm/committee-webs…
andyren12 Jun 1, 2023
5222ab9
Default logo for event banner
elizabethkim11 Jun 1, 2023
bb8b73b
Merge branch 'elizabeth' of https://github.com/uclaacm/committee-webs…
andyren12 Jun 1, 2023
fbf491d
Filter by upcoming date
andyren12 Jun 1, 2023
bcc5c7b
Add committee color
andyren12 Jun 1, 2023
0d7e215
finished officers frontend and backend
Jun 1, 2023
bb5a40f
renamed landing styles file
Jun 1, 2023
a68f190
renamed landing page styles file
Jun 1, 2023
d452770
fix bug with env variable
ArshMalik02 Aug 21, 2023
52d7002
syncing
ArshMalik02 Aug 21, 2023
90ce281
fixed team page errors and removed general members
Aug 21, 2023
5b98924
fixed team page errors and removed general members
Aug 21, 2023
9d4927a
fixed parts of get officers algortihm
Aug 28, 2023
3000390
fixed parts of get officers algorithm
Aug 28, 2023
30178da
Merge branch 'charles' into arsh-final-edits
ArshMalik02 Sep 3, 2023
25ac472
fix a bug in officer backend code
ArshMalik02 Sep 3, 2023
1df07c4
delete unnecessary console logs
ArshMalik02 Sep 3, 2023
b8e52a8
Merge branch 'landingBackend' into arsh-final-edits
ArshMalik02 Sep 3, 2023
6657928
fix bug in events page
ArshMalik02 Sep 3, 2023
48e23e5
add global var for team page
ArshMalik02 Sep 3, 2023
aa1cc8d
add global var to landing page
ArshMalik02 Sep 3, 2023
fbd05ef
fix aliasing
ArshMalik02 Sep 3, 2023
95fab2e
fix env config
ArshMalik02 Sep 3, 2023
d8ce46a
modify env config
ArshMalik02 Sep 3, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ jobs:
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
CI: true
DIRECTORY_SPREADSHEET_ID: ${{secrets.DIRECTORY_SPREADSHEET_ID }}
LANDING_SPREADSHEET_ID: ${{secrets.LANDING_SPREADSHEET_ID }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Things you should do **after using this as a template**:
- [ ] update the README badges for the GitHub Actions and Netlify with the correct links!
- [ ] update and delete this documentation!
- [ ] update `public/index.html` to have a description and title
- [ ] update `public/favicon.svg` and `public/favaicon512.png` as needed
- [ ] update `public/favicon.svg` as needed
- [ ] contact Regina Wang (`@reginawang99`), Matthew Nieva (`@matthewcn56`), Matthew Wang (`@mattxwang`)or Jiin Kim (`@doubleiis02`) with any questions about our quickstarter template set-up.

## Loading in Committee Info (can also delete this section when done)
Expand Down
55 changes: 34 additions & 21 deletions components/BoardCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from 'next/image';
import React from 'react';
import React, { useState } from 'react';
import styles from '../styles/BoardCard.module.scss';

interface CardInterface {
Expand All @@ -19,37 +19,50 @@ function BoardCard({
github,
email,
}: CardInterface) {
const [src, setSrc] = useState(imageURL);
return (
<div className={styles.container}>
<div className={styles.profilepic}>
<Image src={imageURL} alt="PFP" width={100} height={100} />
<Image
src={src}
alt="Profile Picture"
width={90}
height={90}
onError={() => {
setSrc('/profile.png');
}}
/>
</div>
<div className={styles.text}>
<div>
<div style={{ marginBottom: '-.8em' }}>
<span className={styles.name}>{name} | </span>
<span className={styles.pronouns}>{pronouns}</span>
</div>
<div>
<span className={styles.position}>{position}</span>
</div>
<div className={styles.contact}>
<Image
src="/github-mark.png"
alt="Github Icon"
width={21}
height={21}
/>
<a href={github}>{github}</a>
</div>
<div className={styles.contact}>
<Image
src="/icons8-mail-24.png"
alt="Mail Icon"
width={21}
height={21}
/>
{email}
</div>
{github && (
<div className={styles.contact}>
<Image
src="/github-mark.png"
alt="Github Icon"
width={21}
height={21}
/>
{github}
</div>
)}
{email && (
<div className={styles.contact}>
<Image
src="/icons8-mail-24.png"
alt="Mail Icon"
width={20}
height={20}
/>
{email}
</div>
)}
</div>
</div>
);
Expand Down
127 changes: 83 additions & 44 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,57 +1,94 @@
import Image from 'next/image';
import Link from 'next/link';
import React from 'react';
import WordmarkLogo from '../public/acm-logo-wordmark-extended.png';
import React, { useEffect, useState } from 'react';
import discord from '../public/discord.png';
import email from '../public/email.png';
import instagram from '../public/instagram.png';
import styles from '../styles/Footer.module.scss';

export default function Footer() {
interface CommitteeData {
committee: string;
name: string;
subtitle: string;
description: string;
logoLink: string;
dcLink: string;
igLink: string;
email: string;
favicon: string;
backgroundImg: string;
}

const Footer = () => {
const [committeeData, setCommitteeData] = useState<CommitteeData[] | null>(
null,
);

useEffect(() => {
const fetchData = async () => {
try {
const response = await fetch('/output.json');
const jsonData = await response.json();
setCommitteeData(jsonData);
} catch (error) {
console.error('error');
}
};
//eslint-disable-next-line
fetchData();
}, []);

return (
<footer>
<section className={styles.socials}>
<section className={styles.footerlogo}>
<Link href="/">
<a>
<Image src={WordmarkLogo} width={100} height={40} alt="Logo" />
{committeeData && (
<section className={styles.socials}>
<section className={styles.footerlogo}>
<Link href="/">
<a>
<Image
src={committeeData[0].logoLink}
width={100}
height={40}
alt="Logo"
/>
</a>
</Link>
</section>
<section className={styles.footerlogo}>
<a
href={`https://${committeeData[0].igLink}`}
target="_blank"
rel="noreferrer"
>
<Image
src={instagram}
width={25}
height={25}
alt="Instagram Icon"
/>
</a>
</Link>
</section>
<section className={styles.footerlogo}>
<a
href="https://www.instagram.com/acm.ucla"
target="_blank"
rel="noreferrer"
>
<Image
src={instagram}
width={25}
height={25}
alt="Instagram Icon"
/>
</a>
</section>
<section className={styles.footerlogo}>
<a
href="https://discord.com/invite/eWmzKsY"
target="_blank"
rel="noreferrer"
>
<Image src={discord} width={30} height={25} alt="Discord Icon" />
</a>
</section>
<section className={styles.footerlogo}>
<a
href="mailto: [email protected]"
target="_blank"
rel="noreferrer"
className={styles.mailanchor}
>
<Image src={email} width={25} height={20} alt="Email Icon" />
</a>
</section>
<section className={styles.footerlogo}>
<a
href={`https://${committeeData[0].dcLink}`}
target="_blank"
rel="noreferrer"
>
<Image src={discord} width={30} height={25} alt="Discord Icon" />
</a>
</section>
<section className={styles.footerlogo}>
<a
href={`mailto:${committeeData[0].email}`}
target="_blank"
rel="noreferrer"
className={styles.mailanchor}
>
<Image src={email} width={25} height={20} alt="Email Icon" />
</a>
</section>
</section>
</section>
)}
<section className={styles.credit}>
<span>
Made by{' '}
Expand All @@ -74,4 +111,6 @@ export default function Footer() {
</section>
</footer>
);
}
};

export default Footer;
4 changes: 2 additions & 2 deletions components/MainLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Head from 'next/head';
import React from 'react';
import vars from '../styles/global_variables.module.scss';
import Footer from './Footer';
import Navbar from './Navbar';
import vars from '../styles/global_variables.module.scss';

interface LayoutProps {
children: JSX.Element;
Expand All @@ -19,7 +19,7 @@ export default function MainLayout(props: LayoutProps) {
content="width=device-width, initial-scale=1, minimum-scale=1"
/>
<title>ACM {vars.committee}</title>
<link rel="icon" href="/logo.png" />
<link rel="icon" href="/favicon.svg" />
</Head>
<Navbar />
<main>{props.children}</main>
Expand Down
124 changes: 79 additions & 45 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,89 @@
import Image from 'next/image';
import Link from 'next/link';
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { FaTimes, FaBars } from 'react-icons/fa';
import WordmarkLogo from '../public/acm-logo-wordmark-extended.png';
import styles from '../styles/Navbar.module.scss';

export default function Navbar() {
interface CommitteeData {
committee: string;
name: string;
subtitle: string;
description: string;
logoLink: string;
dcLink: string;
igLink: string;
email: string;
favicon: string;
backgroundImg: string;
}

const Navbar = () => {
const [committeeData, setCommitteeData] = useState<CommitteeData[] | null>(
null,
);

useEffect(() => {
const fetchData = async () => {
try {
const response = await fetch('/output.json');
const jsonData = await response.json();
setCommitteeData(jsonData);
} catch (error) {
console.error('error');
}
};
//eslint-disable-next-line
fetchData();
}, []);

const [clicked, setClicked] = useState(false);
return (
<div>
<nav className={styles.navbar}>
<div className="navbar-brand">
<Link href="/">
<a className="force-child-display-block">
<Image
src={WordmarkLogo}
width={106}
height={40}
alt="Open Source at ACM Home"
/>
</a>
</Link>
</div>
<div>
<ul
className={styles['nav-item-list']}
id={clicked ? styles.active : ''}
>
<li>
<Link href="/teamPage">
<a>Team</a>
</Link>
</li>
<li>
<Link href="/eventsPage">
<a>Events</a>
</Link>
</li>
<li>
<Link href="/">
<button>Join Us</button>
</Link>
</li>
</ul>
</div>
<div id={styles['small-screen']}>
<i onClick={() => setClicked(!clicked)}>
{clicked ? <FaTimes /> : <FaBars />}
</i>
</div>
</nav>
{committeeData && (
<nav className={styles.navbar}>
<div className="navbar-brand">
<Link href="/">
<a className="force-child-display-block">
<Image
src={committeeData[0].logoLink}
width={106}
height={40}
alt="Open Source at ACM Home"
/>
</a>
</Link>
</div>
<div>
<ul
className={styles['nav-item-list']}
id={clicked ? styles.active : ''}
>
<li>
<Link href="/teamPage">
<a>Team</a>
</Link>
</li>
<li>
<Link href="/eventsPage">
<a>Events</a>
</Link>
</li>
<li>
<Link href="/">
<button>Join Us</button>
</Link>
</li>
</ul>
</div>
<div id={styles['small-screen']}>
<i onClick={() => setClicked(!clicked)}>
{clicked ? <FaTimes /> : <FaBars />}
</i>
</div>
</nav>
)}
</div>
);
}
};

export default Navbar;
Loading
Loading