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

QA + mobile/animations #201

Merged
merged 54 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ce83fbd
Merge pull request #191 from nwplus/dev
DonaldKLee May 31, 2024
6bb7e52
Merge pull request #193 from nwplus/dev
DonaldKLee Jun 1, 2024
5188a43
Fix titles
martincai8 Jun 4, 2024
27a0eda
Merge pull request #194 from nwplus/24-25-profiles-fix
DonaldKLee Jun 4, 2024
7b746a3
Merge pull request #195 from nwplus/dev
joannelex Jun 25, 2024
42ed51a
Merge pull request #196 from nwplus/dev
martincai8 Jul 30, 2024
5767fe7
hero done
DonaldKLee Aug 19, 2024
8610e4c
hero done?
DonaldKLee Aug 27, 2024
c2624c1
Fix titles
martincai8 Jun 4, 2024
4778e99
Redesign who we are gallery section
daniel-panhead Aug 12, 2024
d10d1da
Add new stats section
daniel-panhead Aug 23, 2024
2998d1c
Make gallery section responsive with mobile carousel
daniel-panhead Aug 23, 2024
6bf2892
Remove unused import
daniel-panhead Aug 23, 2024
2366c97
Add filter tabs component for resources section
daniel-panhead Aug 28, 2024
04a4dce
Redesign rest of resources section with new dropdowns and layout
daniel-panhead Aug 29, 2024
7c0b35f
Fix titles
martincai8 Jun 4, 2024
176f4e6
Redesign who we are gallery section
daniel-panhead Aug 12, 2024
db21090
Add new stats section
daniel-panhead Aug 23, 2024
a5df7ed
Make gallery section responsive with mobile carousel
daniel-panhead Aug 23, 2024
81dd39e
Remove unused import
daniel-panhead Aug 23, 2024
19e1cc9
Remove unused const
daniel-panhead Aug 29, 2024
dbb1887
Merge pull request #197 from nwplus/daniel/redesign-who-we-are
DonaldKLee Aug 31, 2024
b30173b
Merge pull request #198 from nwplus/daniel/redesign-resources
DonaldKLee Aug 31, 2024
e42810f
Add background graphics to resources section
daniel-panhead Sep 2, 2024
c433a34
our hackathons backup
DonaldKLee Sep 3, 2024
cd44484
Merge branch 'www-enhancements' of https://github.com/nwplus/www into…
DonaldKLee Sep 3, 2024
af6d67c
test
DonaldKLee Sep 3, 2024
94d7503
linting fix
DonaldKLee Sep 3, 2024
9c9209f
linting fix
DonaldKLee Sep 3, 2024
aab2980
newsletter with confirmation
DonaldKLee Sep 3, 2024
b38184d
new video
DonaldKLee Sep 3, 2024
bded68e
hero and hackathons
DonaldKLee Sep 3, 2024
128ed65
linting fix
DonaldKLee Sep 3, 2024
631c09e
our hackathons
DonaldKLee Sep 3, 2024
3b04b52
fix deploy?
DonaldKLee Sep 3, 2024
76fd6f4
fixed planet nwhacks
DonaldKLee Sep 3, 2024
43fbb99
Merge pull request #199 from nwplus/www-enhancements
byronwang93 Sep 3, 2024
2c1969e
clear form
DonaldKLee Sep 7, 2024
a74a5fa
sponsorship cta
DonaldKLee Sep 7, 2024
c74993f
mobile hero svg
DonaldKLee Sep 8, 2024
d6e2134
Add counter animation to statistics
daniel-panhead Sep 7, 2024
68d5552
Add card flipping animation to stats cards
daniel-panhead Sep 8, 2024
ef43180
Limit resource items on mobile
daniel-panhead Sep 8, 2024
547213e
Update about us images
daniel-panhead Sep 8, 2024
d811d2b
Fix resource responsiveness
daniel-panhead Sep 8, 2024
e0e85d0
Increase stats cards animation duration
daniel-panhead Sep 13, 2024
08abe99
Add image optimization packages + convert hero illustration to png
daniel-panhead Sep 15, 2024
66f2fa2
desktop moons
DonaldKLee Sep 15, 2024
a5f2cef
our hackathons done
DonaldKLee Sep 15, 2024
ca22519
mobile hero
DonaldKLee Sep 15, 2024
ec6008e
mobile navbar done
DonaldKLee Sep 15, 2024
d66c0a5
Merge branch 'www-enhancements' into daniel/enhancements-qa
DonaldKLee Sep 15, 2024
9345cc3
merge conflicts
DonaldKLee Sep 15, 2024
8772762
Merge pull request #200 from nwplus/daniel/enhancements-qa
DonaldKLee Sep 15, 2024
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
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
96 changes: 96 additions & 0 deletions components/AboutUsGallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import React, { useEffect, useState } from 'react';
import ImageTileContainer from './ImageTileContainer';
import Carousel from './Carousel';
import styled from 'styled-components';

const GalleryContainer = styled.div`
display: flex;
flex-direction: row;
height: 400px;
width: 100%;
gap: 16px;

& > * {
flex-basis: 50%;
}

${(p) => p.theme.mediaQueries.mobile} {
flex-direction: column;
height: auto;

& > * {
flex-basis: auto;
}
}
`;

const GalleryVideo = styled.iframe`
height: 400px;
width: 100%;
margin-bottom: 10px;
border: none;
border-radius: 6px;

${(p) => p.theme.mediaQueries.mobile} {
height: 225px;
}
`;

const Image = styled.img`
height: 400px;
width: 100%;
margin-bottom: 10px;
border-radius: 6px;
object-fit: cover;

${(p) => p.theme.mediaQueries.mobile} {
height: 225px;
}
`;

/**
*
* @param {{ videoSrc: string, images: import('./ImageTileContainer').ImageTileRow[] }} param0
* @returns
*/
function AboutUsGallery({ videoSrc, images }) {
const [width, setWidth] = useState(0);
const mobileBreakpoint = 768;

useEffect(() => {
setWidth(window.innerWidth);
window.addEventListener('resize', () => setWidth(window.innerWidth));
}, []);

return width <= mobileBreakpoint ? (
<Carousel
items={[
<GalleryVideo
src={videoSrc}
title='YouTube video player'
allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'
referrerpolicy='strict-origin-when-cross-origin'
allowFullScreen
key='video'
></GalleryVideo>,
...images.flatMap((imgTileRow) => [
<Image src={imgTileRow.leftImg} key={imgTileRow.leftImg} />,
<Image src={imgTileRow.rightImg} key={imgTileRow.rightImg} />,
]),
]}
/>
) : (
<GalleryContainer>
<GalleryVideo
src={videoSrc}
title='YouTube video player'
allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'
referrerpolicy='strict-origin-when-cross-origin'
allowFullScreen
></GalleryVideo>
<ImageTileContainer rows={images} />;
</GalleryContainer>
);
}

export default AboutUsGallery;
16 changes: 4 additions & 12 deletions components/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ const EmptyDiamond = styled.div`
cursor: pointer;
`;

const Image = styled.img`
height: 100%;
width: 100%;
margin-bottom: 10px;
border-radius: 6px;
object-fit: cover;
`;

const BaseArrow = css`
border: solid ${(p) => p.theme.colors.primary};
border-width: 0 2px 2px 0;
Expand All @@ -70,9 +62,9 @@ const LeftArrow = styled.i`
left: 5%;
`

export default function Carousel ({ images, height, width }) {
export default function Carousel ({ items, height, width }) {
const [imageIndex, setImageIndex] = useState(0);
const numImages = images.length;
const numImages = items.length;

useEffect(() => {
const interval = setInterval(() => {
Expand All @@ -89,9 +81,9 @@ export default function Carousel ({ images, height, width }) {
<Container width={width} height={height}>
<RightArrow onClick={() => setImageIndex(imageIndex == numImages - 1 ? 0 : imageIndex + 1)}/>
<LeftArrow onClick={() => setImageIndex(imageIndex == 0 ? numImages - 1 : imageIndex - 1)}/>
<Image src={images[imageIndex]} />
{items[imageIndex]}
<FlexBox>
{images.map((item, index) => {
{items.map((item, index) => {
return index == imageIndex
? <FilledDiamond key={index} />
: <EmptyDiamond key={index} onClick={() => setImageIndex(index)}/>
Expand Down
10 changes: 5 additions & 5 deletions components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ const profiles = [
name: 'Alissa Guo',
emoji: '🥘',
color: '#FFC0CB',
title: 'Cmd-f logistics coordinator',
title: 'cmd-f Logistics Coordinator',
social: 'https://www.linkedin.com/in/alissa-guo/'
},
{
img: '/assets/profiles/Allison_Chu.png',
name: 'Allison Chu',
emoji: '🚅',
color: '#01DACC',
title: '',
title: 'Design Coordinator',
social: ''
},
{
Expand Down Expand Up @@ -301,7 +301,7 @@ const profiles = [
name: 'Khoa Bui',
emoji: '🐧',
color: '#e46060',
title: 'Logistics Coordinator',
title: 'nwHacks Logistics Coordinator',
social: ''
},
{
Expand Down Expand Up @@ -365,15 +365,15 @@ const profiles = [
name: 'Michelle Wan',
emoji: '🙆🏻‍♀️',
color: '#e8dcfc',
title: 'Sponsorships Coordinator',
title: 'Sponsorship Coordinator',
social: 'https://mwchelle.me'
},
{
img: '/assets/profiles/Michelle_Wang.png',
name: 'Michelle Wang',
emoji: '❄️',
color: '#9CDDFB',
title: 'Tres',
title: 'Treasurer',
social: 'https://www.linkedin.com/in/michelle-wang-mw/'
},
{
Expand Down
Loading
Loading