Skip to content

Commit

Permalink
rework footer: overhaul CSS, link to all pages on site (#236)
Browse files Browse the repository at this point in the history
This PR does two main things:

1. swaps out the footer CSS to be module'd, use grid in favor of fixed-width spacing, and uses classes instead of nested specificity
    * this comes with the added benefit of increasing accessibility, since we're relying on less hacky positioning!
2. adds links to the footer - every single page under the "ACM" category, and a link to each committee
    * under evan's suggestion, I've converted each committee link to a dark version of their logo + wordmark, to add some flair!

Motivating goals for adding the links to the footer:

1. as we add new pages (Impact, JEDI, etc.) we need to put them somewhere - and the navbar is quite a bit of work!
2. for the Tech Gala page, there's no way to get to it other than the homepage alert banner
3. the current flow to get to a committee's website is always 2+ clicks from the homepage, which seems bad 
4. this is typical practice (I personally always scroll down to footers to find relevant links)

Some comments I'll make:

* ~~I kinda dislike how the links align, but a simple left/right text align looks even worse~~
* ~~how often do the footer links change? we may want to plop this into a data file~~
* when we add JEDI/Impact/w.e, where should they go? I'm thinking a new section under ACM called "Events and Initiatives", and we can bundle tech gala in there as well
* ~~are there any spacing issues and/or mobile view things I should look into fixing?~~
* added an extra util

Inadvertently part of #191.
  • Loading branch information
mattxwang authored Sep 2, 2021
1 parent 475ae31 commit 48f0b83
Show file tree
Hide file tree
Showing 14 changed files with 440 additions and 107 deletions.
91 changes: 70 additions & 21 deletions components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,91 @@
import Link from 'next/link';
import React from 'react';
import committees from '../data/committees';
import styles from '../styles/components/Footer.module.scss';
import SocialMedia from './SocialMedia';

// TODO: add GM?
const footerACMLinks = [
{ title: 'About', path: '/about' },
{ title: 'Committees', path: '/committees' },
{ title: 'Events', path: '/events' },
{ title: 'Sponsors', path: '/sponsors' },
{ title: 'Tech Gala', path: '/techgala' },
{ title: 'Membership Portal', path: 'https://members.uclaacm.com', ext: true },
];

function FooterLinkElement({ title, path, ext }){
return (
<Link href={path}>
<a className={styles['link-footer']} target={ext ? '_blank': ''} rel={ext ? 'noopener noreferrer' : ''}>{title}</a>
</Link>
);
}

function Footer(){
return (
<footer id="footer">
<div id="footer-inner">
<div id="footer-items">
<div className="footer-item">
<h3>Find us on social media</h3>
<footer className={styles.footer}>
<nav className={styles['footer-inner']} aria-labelledby="footer-navigation">
<h2 className="sr-only" id="footer-navigation">Footer Navigation</h2>
<div className="grid-desktop-3">
<div>
<h3 className={styles['footer-header']}>Find us on social media</h3>
<SocialMedia type="light"/>
<div className="mt-1">
<Link href="http://eepurl.com/c5pE6P">
<a className="button tight" target="_blank" rel="noreferrer noopener">
Join our Mailing List
</a>
</Link>
</div>
<p className={styles['footer-header']}>Reach us at</p>
<a className={styles['link-footer']} href="mailto: [email protected]"><span className="footer-text">[email protected]</span></a>
</div>
<div className="footer-item">
<h3>Reach us at</h3>
<a href="mailto: [email protected]" className="email"><span className="footer-text">[email protected]</span></a>
<div>
<h3 className={styles['footer-header']}>About ACM at UCLA</h3>
<ul className='list-unstyled'>
{
footerACMLinks.map((link) => <li key={link.path}><FooterLinkElement {...link} /></li>)
}
</ul>
{/* TODO: consider where to put impact/jedi! events & initiatives? */}
</div>
{/* the paddingTop is a magic number that replaces a
previous empty <h3> tag previously used for spacing. should be replaced later.
*/}
<div className="footer-item" style={{paddingTop: '28px'}}>
<Link href="http://eepurl.com/c5pE6P">
<a className="button tight" target="_blank" rel="noreferrer noopener">
Join our Mailing List
</a>
</Link>
<div>
<h3 className={styles['footer-header']}>Committees</h3>
<ul className={`list-unstyled text-left ${styles['footer-committee-sidebar-container']}`}>
{
committees.map(({name, slug, external_link, wordmark_dark}) => {
const path = external_link ? external_link : `/committees#${slug}`;
return (
<>
<li key={slug} className={styles['display-inline']}>
<FooterLinkElement
path={path}
/* TODO: resolve 404 with <Image /> component */
/* eslint-disable-next-line @next/next/no-img-element */
title={<img className='committee-sidebar-image' src={wordmark_dark} alt={`ACM ${name}`} />}
ext={external_link}
/>
</li>
<br />
</>
);
})
}
</ul>
</div>
</div>
<div id="netlify-badge">
<div className="mt-1">
<a href="https://www.netlify.com" target="_BLANK" rel="noopener noreferrer">
{/* TODO: resolve 404 with <Image /> component */}
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src="https://www.netlify.com/img/global/badges/netlify-light.svg" alt="Deploys by Netlify" />
</a>
</div>
<div id="footer-bottom">
<span className="footer-text">&copy; ACM at UCLA 2021.</span>
<div>
<span className={styles['footer-text-thin']}>&copy; ACM at UCLA 2021.</span>
</div>
</div>
</nav>
</footer>
);
}
Expand Down
24 changes: 24 additions & 0 deletions data/committees.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ export default [
{
name: 'Studio',
class: 'studio',
slug: 'studio',
tagline: 'Creative Expression through Games and VR',
external_link: null,
image: '/images/committees/studio_wordmark.svg',
wordmark_dark: '/images/committees/studio_wordmark_dark.svg',
diamond: '/images/diamonds/studio_diamond.svg',
links: [
{
Expand Down Expand Up @@ -53,7 +56,9 @@ export default [
{
name: 'ICPC',
class: 'icpc',
slug: 'icpc',
tagline: 'Mastering Algorithms and Competitive Programming',
external_link: 'https://icpc.uclaacm.com/',
links: [
{
platform: 'website',
Expand Down Expand Up @@ -93,12 +98,15 @@ export default [
introImage: '/images/committees/icpc/icpc_motif_applied.png',
mission: 'Our mission is to promote algorithmic thinking and help build proficient problem solvers.',
image: '/images/committees/icpc_wordmark.svg',
wordmark_dark: '/images/committees/icpc_wordmark_dark.svg',
diamond: '/images/diamonds/icpc_diamond.svg',
},
{
name: 'Design',
class: 'design',
slug: 'design',
tagline: 'Form Follows Function',
external_link: null,
links: [
{
platform: 'website',
Expand Down Expand Up @@ -142,12 +150,15 @@ export default [
introImage: '/images/committees/design/design_motif_applied.png',
mission: 'Our mission is to design, manage, and support the visual identity of ACM at UCLA. We create the club\'s branding, event banners, and more elements, while also doing workshops to teach UI/UX to the UCLA community.',
image: '/images/committees/design_wordmark.svg',
wordmark_dark: '/images/committees/design_wordmark_dark.svg',
diamond: '/images/diamonds/design_diamond.svg',
},
{
name: 'Cyber',
class: 'cyber',
slug: 'cyber',
tagline: 'Cybersecurity Made Simple',
external_link: 'https://acmcyber.com/',
links: [
{
platform: 'website',
Expand Down Expand Up @@ -191,12 +202,15 @@ export default [
introImage: '/images/committees/cyber/cyber_motif_applied.png',
mission: 'Our mission is to create a community in which both experts and beginners alike can grow in the field of cybersecurity skills and knowledge. We want to make cybersecurity simple and accessible for everyone.',
image: '/images/committees/cyber_wordmark.svg',
wordmark_dark: '/images/committees/cyber_wordmark_dark.svg',
diamond: '/images/diamonds/cyber_diamond.svg',
},
{
name: 'Teach LA',
class: 'teachla',
slug: 'teachla',
tagline: 'Learn It, Teach It',
external_link: 'https://teachla.uclaacm.com',
links: [
{
platform: 'website',
Expand Down Expand Up @@ -244,12 +258,15 @@ export default [
introImage: '/images/committees/teachLA/teachLA_motif_applied.png',
mission: 'Our mission is to provide equal access to K-12 CS education in the Los Angeles area. We do this by teaching classes, running workshops and events, and writing software!',
image: '/images/committees/teachLA_wordmark.svg',
wordmark_dark: '/images/committees/teachLA_wordmark_dark.svg',
diamond: '/images/diamonds/teachLA_diamond.svg',
},
{
name: 'W',
class: 'w',
slug: 'w',
tagline: 'Starting Conversations about Diversity in Tech',
external_link: null,
links: [
{
platform: 'website',
Expand Down Expand Up @@ -289,12 +306,15 @@ export default [
introImage: '/images/committees/w/w_motif_applied.png',
mission: 'Our goal is to promote diversity in tech through mentorship, networking, and professional development opportunities. We’re a safe space for everyone interested in computer science. :)',
image: '/images/committees/w_wordmark.svg',
wordmark_dark: '/images/committees/w_wordmark_dark.svg',
diamond: '/images/diamonds/w_diamond.svg',
},
{
name: 'AI',
class: 'ai',
slug: 'ai',
tagline: 'Learning Machine Learning',
external_link: 'https://uclaacmai.github.io/',
links: [
{
platform: 'website',
Expand Down Expand Up @@ -350,12 +370,15 @@ export default [
introImage: '/images/committees/ai/ai_motif_applied.png',
mission: 'Our mission is to grow and develop a community of students interested in Artificial Intelligence (AI) at UCLA, Los Angeles, and beyond. Our initiatives aim to serve everyone who has an interest in AI regardless of background, including people with no prior experience or knowledge in AI and non-CS majors.',
image: '/images/committees/ai_wordmark.svg',
wordmark_dark: '/images/committees/ai_wordmark_dark.svg',
diamond: '/images/diamonds/ai_diamond.svg',
},
{
name: 'Hack',
class: 'hack',
slug: 'hack',
tagline: 'Move Fast, Build Things',
external_link: 'https://hack.uclaacm.com',
links: [
{
platform: 'website',
Expand Down Expand Up @@ -399,6 +422,7 @@ export default [
introImage: '/images/committees/hack/hack_motif_applied.png',
mission: 'To empower the community by providing the means to build amazing things and explore what is possible through code!',
image: '/images/committees/hack_wordmark.svg',
wordmark_dark: '/images/committees/hack_wordmark_dark.svg',
diamond: '/images/diamonds/hack_diamond.svg',
},
];
28 changes: 28 additions & 0 deletions public/images/committees/ai_wordmark_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 48f0b83

Please sign in to comment.