Skip to content

Commit 1b1c62b

Browse files
committed
지난 파이콘 한국 이미지 추가
1 parent dad0601 commit 1b1c62b

File tree

4 files changed

+100
-15
lines changed

4 files changed

+100
-15
lines changed

frontend/components/core/Image.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react'
2+
import styled from 'styled-components'
3+
4+
const ImageBox = styled.img`
5+
display: inline-block;
6+
width: 100%;
7+
height: 100%;
8+
vertical-align: top;
9+
`
10+
11+
interface ImageProps {
12+
src: string
13+
alt: string
14+
}
15+
16+
const Image = (props: ImageProps) => {
17+
return <ImageBox src={props.src} alt={props.alt} />
18+
}
19+
20+
export default Image
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const Resources = {
2+
previousPyconkrImage: {
3+
PYCONKR_2019_IMG:
4+
'https://live.staticflickr.com/65535/48715744618_1e10fe2748_z.jpg',
5+
PYCONKR_2018_IMG:
6+
'https://live.staticflickr.com/4841/44768712850_878001fc21_z.jpg',
7+
8+
PYCONKR_2017_IMG:
9+
'https://live.staticflickr.com/4402/36867958855_ef8e526e38_z.jpg',
10+
11+
PYCONAPAC_2016_IMG:
12+
'https://live.staticflickr.com/8558/30070813755_b738c7036b_z.jpg',
13+
14+
PYCONKR_2015_IMG:
15+
'https://live.staticflickr.com/5773/20996231336_f94423fd5e_z.jpg',
16+
17+
PYCONKR_2014_IMG:
18+
'https://live.staticflickr.com/3912/14958407280_c7e9e6717e_z.jpg'
19+
}
20+
}
21+
22+
export default Resources

frontend/locales/ko/pageTitle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
[PageName.Contribute]: '기여하기',
99
[PageName.Sponsor]: '후원하기',
1010
[PageName.SponsorProspectus]: '후원사 안내',
11-
[PageName.SponsorBenefit]: '후원사 혜택',
11+
[PageName.SponsorBenefit]: '후원사 혜택 설명',
1212
[PageName.SponsorTerms]: '후원사 약관',
1313
[PageName.CoC]: '행동 강령'
1414
}

frontend/pages/about/previous-pyconkr.tsx

Lines changed: 57 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,33 @@ import PageTitle from '../../components/core/PageTitle'
77
import { PreviousPyconkr } from '../../data/enums/PreviousPyconkr'
88
import { Heading3, Paragraph, ColorLink } from '../../assets/styles/typo'
99
import styled from 'styled-components'
10+
import Resource from '../../data/constants/resources'
11+
import Image from '../../components/core/Image'
12+
import { media } from '../../assets/styles/mixin'
1013

14+
const Row = styled.div`
15+
display: flex;
16+
${media.mobile(`
17+
flex-direction: column;
18+
`)}
19+
`
20+
const Col = styled.div`
21+
width: 50%;
22+
${media.mobile(`
23+
width: 100%;
24+
`)}
25+
& + & {
26+
margin-left: 1.2rem;
27+
${media.mobile(`
28+
margin-left: 0;
29+
margin-top: 1.2rem;
30+
`)}
31+
}
32+
`
1133
const Container = styled.div`
1234
padding-bottom: 2rem;
1335
& + & {
14-
padding-top: 2rem;
36+
padding-top: 5rem;
1537
}
1638
`
1739
const ParagraphContainer = styled.div`
@@ -25,23 +47,44 @@ const Link = styled(ColorLink)`
2547
const PreviousPyconkrPage: NextPage = (props: PageProps) => {
2648
const { t } = useTranslation()
2749
const keys = Object.keys(PreviousPyconkr)
50+
const images = Resource.previousPyconkrImage
2851

2952
return (
3053
<>
3154
<PageTitle title={props.pageName} />
32-
{keys.map((item, index) => (
33-
<Container key={index}>
34-
<Heading3>{t(`contentDescription:${item}.title`)}</Heading3>
35-
<ParagraphContainer>
36-
<Paragraph>
37-
{t(`contentDescription:${item}.paragraph`)}
38-
</Paragraph>
39-
</ParagraphContainer>
40-
<Link href={t(`contentDescription:${item}.url`)}>
41-
{t(`contentDescription:${item}.url`)}
42-
</Link>
43-
</Container>
44-
))}
55+
{keys.map((item, index) => {
56+
const imageKey = `${item}_IMG`
57+
const imageUrl = images[imageKey] ?? ''
58+
return (
59+
<Container key={index}>
60+
<Row>
61+
<Col>
62+
<Image
63+
src={imageUrl}
64+
alt={`image of ${item}`}
65+
/>
66+
</Col>
67+
<Col>
68+
<Heading3>
69+
{t(`contentDescription:${item}.title`)}
70+
</Heading3>
71+
<ParagraphContainer>
72+
<Paragraph>
73+
{t(
74+
`contentDescription:${item}.paragraph`
75+
)}
76+
</Paragraph>
77+
</ParagraphContainer>
78+
<Link
79+
href={t(`contentDescription:${item}.url`)}
80+
>
81+
{t(`contentDescription:${item}.url`)}
82+
</Link>
83+
</Col>
84+
</Row>
85+
</Container>
86+
)
87+
})}
4588
</>
4689
)
4790
}

0 commit comments

Comments
 (0)