Skip to content

Commit b299cfe

Browse files
Feat : Solution Challenge Update
1 parent 7914921 commit b299cfe

File tree

23 files changed

+511
-66
lines changed

23 files changed

+511
-66
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
33
"arcanis.vscode-zipfs",
4-
"dbaeumer.vscode-eslint"
4+
"dbaeumer.vscode-eslint",
5+
"styled-components.vscode-styled-components"
56
]
67
}

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
plugins: ['babel-plugin-styled-components'],
3+
};
13.6 KB
Loading
16.3 KB
Loading
Loading
Loading
9.38 KB
Loading
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const GithubIcon = () => {
2+
return (
3+
<path
4+
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
5+
fill="#000000"
6+
className="octo-body"
7+
></path>
8+
);
9+
};
10+
11+
export default GithubIcon;

src/components/GithubIcon/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as GithubIcon } from './GithubIcon';

src/pages/Clubs/GalleryComponent/FocusedGalleryItem/hooks/.gitkeep

Whitespace-only changes.

src/pages/Clubs/GalleryComponent/FocusedGalleryItem/index.jsx

Lines changed: 50 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -32,62 +32,60 @@ function FocusedGalleryItem({ focusedSectionId, focusedItem, onBlur, disabled })
3232
}, [isEscPressed]);
3333

3434
return (
35-
<>
36-
<OverlayContainer
37-
onClick={onClickOverlayContainer}
38-
disabled={disabled}
39-
blurvalue={blurValue}
40-
brightnessvalue={brightnessValue}
41-
data-scroll
42-
data-scroll-sticky
43-
data-scroll-target="#fixed-element-clubs-container"
44-
>
45-
<ProgressBar ref={progressBarRef} />
46-
{focusedSectionId && (
47-
<>
48-
<Padding>
49-
<Swiper
50-
modules={[Pagination]}
51-
spaceBetween={200}
52-
slidesPerView={2}
53-
centeredSlides
54-
pagination={{ type: 'progressbar', el: progressBarRef.current }}
55-
grabCursor
56-
onSwiper={(swiper) => {
57-
swiper.params.pagination.el = progressBarRef.current;
58-
59-
swiper.pagination.destroy();
60-
swiper.pagination.init();
61-
swiper.pagination.update();
62-
}}
63-
>
64-
{focusedItem[0].images.map((item, idx) => {
65-
if (idx === 0) {
66-
return (
67-
<SwiperSlide key={idx}>
68-
<Image layoutId={focusedSectionId} disabled={disabled} thumbnail={item} />
69-
</SwiperSlide>
70-
);
71-
}
72-
35+
<OverlayContainer
36+
onClick={onClickOverlayContainer}
37+
disabled={disabled}
38+
blurvalue={blurValue}
39+
brightnessvalue={brightnessValue}
40+
data-scroll
41+
data-scroll-sticky
42+
data-scroll-target="#fixed-element-clubs-container"
43+
>
44+
<ProgressBar ref={progressBarRef} />
45+
{focusedSectionId && (
46+
<>
47+
<Padding>
48+
<Swiper
49+
modules={[Pagination]}
50+
spaceBetween={200}
51+
slidesPerView={2}
52+
centeredSlides
53+
pagination={{ type: 'progressbar', el: progressBarRef.current }}
54+
grabCursor
55+
onSwiper={(swiper) => {
56+
swiper.params.pagination.el = progressBarRef.current;
57+
58+
swiper.pagination.destroy();
59+
swiper.pagination.init();
60+
swiper.pagination.update();
61+
}}
62+
>
63+
{focusedItem[0].images.map((item, idx) => {
64+
if (idx === 0) {
7365
return (
7466
<SwiperSlide key={idx}>
75-
<Image
76-
key={idx}
77-
disabled={disabled}
78-
thumbnail={item}
79-
initial="hidden"
80-
animate="visible"
81-
/>
67+
<Image layoutId={focusedSectionId} disabled={disabled} thumbnail={item} />
8268
</SwiperSlide>
8369
);
84-
})}
85-
</Swiper>
86-
</Padding>
87-
</>
88-
)}
89-
</OverlayContainer>
90-
</>
70+
}
71+
72+
return (
73+
<SwiperSlide key={idx}>
74+
<Image
75+
key={idx}
76+
disabled={disabled}
77+
thumbnail={item}
78+
initial="hidden"
79+
animate="visible"
80+
/>
81+
</SwiperSlide>
82+
);
83+
})}
84+
</Swiper>
85+
</Padding>
86+
</>
87+
)}
88+
</OverlayContainer>
9189
);
9290
}
9391

src/pages/Google/Progress/index.jsx renamed to src/pages/Google/Progress/Progress.jsx

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,43 @@
1+
import { AnimatePresence } from 'framer-motion';
2+
import { useState } from 'react';
13
import styled from 'styled-components';
24

5+
import FocusedCardItem from './components/FocusedCardItem';
36
import SwiperElement from './Swiper';
7+
import { SlideContents } from './Swiper/SlideContent';
48

59
function Progress() {
10+
const [focusedSectionId, setFocusedSectionId] = useState(null);
11+
const isDisabled = focusedSectionId === null;
12+
13+
const focusedItem = SlideContents.filter((_, idx) => idx === focusedSectionId)[0];
14+
15+
const onClickElement = (idx) => {
16+
setFocusedSectionId(idx);
17+
};
18+
19+
const onBlurFocusedCardItem = () => {
20+
setFocusedSectionId(null);
21+
};
22+
623
return (
724
<Container data-scroll-section>
825
<ContentWrapper data-scroll data-scroll-speed="-10">
926
<TitleWrapper>
10-
<Title>...And GDSC - YS is challenging.</Title>
11-
<Desc>Currently in development.</Desc>
27+
<Title>...and GDSC - YS is always challenging.</Title>
28+
<Desc>Congratulations to those who reached to Top 100!</Desc>
1229
</TitleWrapper>
1330
<SwpierWrapper>
14-
<SwiperElement />
31+
<SwiperElement onClickElement={onClickElement} />
1532
</SwpierWrapper>
33+
<AnimatePresence>
34+
<FocusedCardItem
35+
focusedItem={focusedItem}
36+
disabled={isDisabled}
37+
focusedSectionId={focusedSectionId}
38+
onBlur={onBlurFocusedCardItem}
39+
/>
40+
</AnimatePresence>
1641
</ContentWrapper>
1742
</Container>
1843
);
@@ -53,8 +78,10 @@ const TitleWrapper = styled.div`
5378

5479
const Title = styled.span`
5580
display: inline-block;
56-
font-size: max(5vw, 28px);
5781
padding-left: 3vw;
82+
padding-bottom: 10px;
83+
84+
font-size: max(5vw, 28px);
5885
letter-spacing: -0.5px;
5986
`;
6087

src/pages/Google/Progress/Swiper/Slide.jsx

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
1+
import { motion } from 'framer-motion';
12
import styled from 'styled-components';
23

3-
function Slide({ name, index }) {
4+
function Slide({ content, index, onFocus }) {
5+
const onClickSlide = () => {
6+
onFocus(index);
7+
};
8+
49
return (
5-
<SlideContainer>
10+
<SlideContainer
11+
onClick={onClickSlide}
12+
layout
13+
layoutId={index + ''}
14+
whileHover={{
15+
borderRadius: 0,
16+
transtiion: {
17+
duration: 0.3,
18+
},
19+
}}
20+
whileInView={{
21+
transform: 'none',
22+
}}
23+
>
24+
<ImageWrapper>
25+
<ImageBackground>
26+
<Image src={require(`/public/assets/SolutionChallenge/${content.logo}`)} />
27+
</ImageBackground>
28+
</ImageWrapper>
629
<DescWrapper>
730
<Index>{index + 1}</Index>
8-
<Name>{name}</Name>
31+
<Name>{content.name}</Name>
932
</DescWrapper>
1033
</SlideContainer>
1134
);
1235
}
1336

1437
export default Slide;
1538

16-
const SlideContainer = styled.div`
39+
const SlideContainer = styled(motion.div)`
1740
width: 40vw;
1841
height: 350px;
1942
@@ -25,11 +48,40 @@ const SlideContainer = styled.div`
2548
border-radius: 20px;
2649
background-color: black;
2750
51+
cursor: pointer;
52+
2853
${({ theme }) => theme.tablet`
2954
width: 80vw;
3055
`}
3156
`;
3257

58+
const ImageWrapper = styled.div`
59+
width: 100%;
60+
flex: 1;
61+
62+
display: flex;
63+
justify-content: center;
64+
align-items: center;
65+
`;
66+
67+
const ImageBackground = styled.div`
68+
width: 175px;
69+
height: 175px;
70+
71+
display: flex;
72+
justify-content: center;
73+
align-items: center;
74+
75+
border-radius: 25px;
76+
77+
background-color: ${(props) => props.theme.backgroundColor.white};
78+
`;
79+
80+
const Image = styled.img`
81+
width: 125px;
82+
height: 125px;
83+
`;
84+
3385
const DescWrapper = styled.div`
3486
width: 100%;
3587
padding: 3% 10%;
Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,55 @@
11
export const SlideContents = [
22
{
33
name: 'GreenLight',
4+
githubURL: ['gdsc-ys/GreenLight-flutter'],
5+
logo: 'greenlight/logo.png',
6+
description:
7+
'Plogging assistant in your pocket.\nBoth picking up litter and jogging are nice, and doing both would be better!',
48
},
59
{
610
name: 'Connecting the Dots',
11+
githubURL: [
12+
'gdsc-ys/dot_connect_flutter',
13+
'gdsc-ys/dot-connect-server',
14+
'inshining/dot-connect-python-server',
15+
'snoop2head/DotT5',
16+
'snoop2head/DotNeuralNet',
17+
'minukHwang/dot-connect',
18+
],
19+
logo: 'dots/logo.png',
20+
description:
21+
"'Connecting the dots' could have different meaning for someone.\nThis app would guide you the other side of the meaningful dots.",
722
},
823
{
9-
name: 'Warning Is All You Need',
24+
name: 'HearSitter',
25+
githubURL: ['gdsc-ys/hearsitter-flutter'],
26+
logo: 'heresitter/logo.png',
27+
description:
28+
"Hearsitter is designed for aiding CODA(Children Of Deaf Adult).\nDeaf parent and their children could interact 'hand in hand'.",
1029
},
1130
{
1231
name: 'A-Eye',
32+
githubURL: ['gdsc-ys/A-EYE-mobile', 'gdsc-ys/A-eye-server'],
33+
logo: 'aeye/logo.png',
34+
description:
35+
'A-Eye offers 3 different eyes for parents.\nWe believe that happy parents could make happy kids.',
1336
},
1437
{
15-
name: '21Days',
38+
name: 'GSTEP',
39+
githubURL: ['gdsc-ys/GSTEP', 'yuljang/GSTEP-go', 'haaem/GSTEP-flutter'],
40+
logo: 'gstep/logo.png',
41+
description:
42+
'One small step of protecting environment, one giant step for mankind.\nGSTEP aims for anyone who concerns about the climate change.',
1643
},
1744
{
1845
name: 'Golden Time',
46+
githubURL: [
47+
'gdsc-ys/golden-time-backend',
48+
'gdsc-ys/golden-time-wearos',
49+
'gdsc-ys/golden-time-android',
50+
],
51+
logo: 'goldentime/logo.png',
52+
description:
53+
"Golden time is crucial for saving one's life in emergency.\nSending SOS to nearby neighbors would dramatically increase the saving chance.",
1954
},
2055
];

src/pages/Google/Progress/Swiper/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Swiper, SwiperSlide } from 'swiper/react';
1111
import Slide from './Slide';
1212
import { SlideContents } from './SlideContent';
1313

14-
function SwiperElement() {
14+
function SwiperElement({ onClickElement }) {
1515
const { width } = useWindowSize();
1616

1717
return (
@@ -37,7 +37,7 @@ function SwiperElement() {
3737
SlideContents.map((content, idx) => {
3838
return (
3939
<SwiperSlide key={idx}>
40-
<Slide name={content.name} index={idx} />
40+
<Slide content={content} index={idx} onFocus={onClickElement} />
4141
</SwiperSlide>
4242
);
4343
}),

0 commit comments

Comments
 (0)