Skip to content

Commit c89ab0e

Browse files
authored
Merge pull request #59 from pythonkr/add-og
파이콘 한국 2022 날짜 정보 추가 및 sns 링크 연결
2 parents 5e7c4f7 + b6535e6 commit c89ab0e

File tree

13 files changed

+111
-36
lines changed

13 files changed

+111
-36
lines changed

frontend/components/core/NavBar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import styled from 'styled-components'
44
import { useTranslation } from 'react-i18next'
55
import { useRouter } from 'next/router'
66
import { media } from '../../assets/styles/mixin'
7+
import SnsLink from './SnsLink'
78

89
const Container = styled.nav`
910
${media.mobile(`
@@ -174,6 +175,7 @@ const NavBar = (props: NavProps) => {
174175
</LanguageChangeButton>
175176
</ListItem>
176177
)}
178+
<SnsLink />
177179
</List>
178180
</Container>
179181
)

frontend/components/core/NavBarMobile.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
SubMenuToggleLabel,
1414
SubMenuToggleSpan
1515
} from './NavBar'
16+
import SnsLink from './SnsLink'
1617

1718
const Container = styled.div`
1819
display: none;
@@ -252,6 +253,7 @@ const NavBarMobile = (props: NavProps) => {
252253
</LanguageChangeButton>
253254
</ListItem>
254255
)}
256+
<SnsLink />
255257
</List>
256258
</Navigation>
257259
)}

frontend/components/core/NavLink.tsx

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import React from 'react'
2+
import Icon from '@mdi/react'
3+
import { mdiFacebook, mdiTwitter } from '@mdi/js'
4+
import styled from 'styled-components'
5+
import Resource from '../../data/constants/resources'
6+
import { media } from '../../assets/styles/mixin'
7+
8+
const List = styled.ul`
9+
display: flex;
10+
`
11+
const ListItem = styled.li`
12+
padding: 0.4rem;
13+
color: ${(props) => props.theme.colors.white};
14+
${media.mobile(`
15+
padding: 1.3rem 0;
16+
`)}
17+
& + & {
18+
${media.mobile(`
19+
padding-left: 1rem;
20+
`)}
21+
}
22+
`
23+
24+
export const Link = styled.a`
25+
display: flex;
26+
cursor: pointer;
27+
`
28+
29+
const SnsLink = () => {
30+
return (
31+
<List>
32+
<ListItem>
33+
<Link
34+
target="_blank"
35+
aria-label="Facebook Link"
36+
href={Resource.pyconkrFacebook}
37+
>
38+
<Icon path={mdiFacebook} size={1} />
39+
</Link>
40+
</ListItem>
41+
<ListItem>
42+
<Link
43+
target="_blank"
44+
aria-label="Twitter Link"
45+
href={Resource.pyconkrTwitter}
46+
>
47+
<Icon path={mdiTwitter} size={1} />
48+
</Link>
49+
</ListItem>
50+
</List>
51+
)
52+
}
53+
54+
export default SnsLink

frontend/components/layout/Layout.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,25 @@ const Layout = (props: LayoutProps) => {
3535
? `${t(`pageTitle:${props.pageName}`)} : ${t(`label:siteTitle`)}`
3636
: `${t(`label:siteTitle`)}`
3737

38+
const description = `${t(`label:pyconkrTitle`)}: ${t(`label:pyconkrDate`)}`
39+
3840
// TODO: locale을 context로 관리
3941
return (
4042
<>
4143
<NextSeo
4244
title={title}
43-
description=""
45+
description={description}
4446
openGraph={{
4547
type: 'website',
4648
url: 'https://pycon.kr',
4749
title: title,
48-
site_name: title
50+
site_name: title,
51+
description: description,
52+
images: [
53+
{
54+
url: `https://2022.pycon.kr/images/og-temp.jpg`
55+
}
56+
]
4957
}}
5058
/>
5159
<NavBarMobile locale={props.locale} />

frontend/components/service/Home/Main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const MainBackground = () => {
5858
<>
5959
<Container>
6060
<Title>{t(`label:pyconkrTitle`)}</Title>
61-
<BodyText>{t(`label:comingSoon`)}</BodyText>
61+
<BodyText>{t(`label:pyconkrDate`)}</BodyText>
6262
</Container>
6363
<Background />
6464
</>

frontend/data/constants/resources.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const Resources = {
1818

1919
PYCONKR_2014_IMG:
2020
'https://live.staticflickr.com/3912/14958407280_c7e9e6717e_z.jpg'
21-
}
21+
},
22+
pyconkrFacebook: 'https://www.facebook.com/pyconkorea',
23+
pyconkrTwitter: 'https://twitter.com/PyConKR'
2224
}
2325

2426
export default Resources

frontend/locales/en/label.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
siteTitle: 'PyCon Korea 2022',
33
preparing: 'Under Construction',
44
pyconkrTitle: 'PYCON KOREA 2022',
5-
comingSoon: 'Coming Soon',
5+
pyconkrDate: 'October 1-2, 2022',
66
about: {
77
main: {
88
title: 'About PyCon Korea',

frontend/locales/ko/label.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
siteTitle: '파이콘 한국 2022',
33
preparing: '준비 중입니다.',
44
pyconkrTitle: 'PYCON KOREA 2022',
5-
comingSoon: 'Coming Soon',
5+
pyconkrDate: '2022년 10월 1일 ~ 10월 2일',
66
about: {
77
main: {
88
title: '파이콘 한국이란',

frontend/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"@mdi/font": "^6.7.96",
13+
"@mdi/js": "^6.7.96",
14+
"@mdi/react": "^1.6.0",
1215
"@sls-next/serverless-component": "^3.7.0",
1316
"axios": "^0.27.2",
1417
"babel-plugin-styled-components": "^2.0.6",

0 commit comments

Comments
 (0)