Skip to content

Commit dad0601

Browse files
committed
Merge branch 'devdev'
2 parents bf5a823 + 5bdd94b commit dad0601

File tree

14 files changed

+466
-33
lines changed

14 files changed

+466
-33
lines changed

frontend/assets/styles/markdown.ts

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
import styled from 'styled-components'
2+
import { media } from './mixin'
3+
import theme from './theme'
24

35
const MarkdownStyle = styled.div`
4-
h1 {
5-
margin: 1.2rem 0 0.9rem;
6+
h1,
7+
h2,
8+
h3,
9+
h4 {
10+
margin: 1.2rem 0 1rem;
611
}
712
h1 ~ h1 {
813
margin: 4rem 0 1.2rem;
914
}
10-
h2 {
11-
margin: 1.2rem 0 1rem;
15+
h2:first-of-type {
16+
margin-top: 2rem;
17+
}
18+
h2 ~ h2 {
19+
margin: 3rem 0 1.2rem;
1220
}
1321
ul,
1422
li {
@@ -22,6 +30,34 @@ const MarkdownStyle = styled.div`
2230
a {
2331
text-decoration: underline;
2432
}
33+
table {
34+
border-collapse: collapse;
35+
color: ${theme.colors.grey_33};
36+
text-align: center;
37+
overflow: auto;
38+
display: block;
39+
margin: 1.2rem 0;
40+
${media.mobile(`
41+
margin-right: -1rem;
42+
`)}
43+
}
44+
th {
45+
padding: 0.3rem;
46+
font-weight: bold;
47+
}
48+
tr {
49+
border-bottom: solid 1px ${theme.colors.grey_d9};
50+
height: 3rem;
51+
}
52+
tbody > tr:nth-of-type(odd) {
53+
background-color: ${theme.colors.grey_f9};
54+
}
55+
tr > td:first-of-type {
56+
font-weight: bold;
57+
}
58+
td {
59+
padding: 0.6rem;
60+
}
2561
`
2662

2763
export default MarkdownStyle

frontend/assets/styles/theme.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ const Theme = {
44
primary1: '#62599C',
55
primary2: '#0070f3',
66
black: '#000000',
7-
white: '#FFFFFF',
8-
grey0: '#FAFAFA',
9-
grey1: '#999999',
10-
grey2: '#666666',
11-
grey3: '#333333'
7+
white: '#ffffff',
8+
grey_f9: '#f9f9f9',
9+
grey_d9: '#d9d9d9',
10+
grey_99: '#999999',
11+
grey_66: '#666666',
12+
grey_33: '#333333'
1213
},
1314
gradient:
1415
'linear-gradient(115deg, rgb(12, 0, 96), rgb(98, 89, 156), rgb(255, 247, 53))'

frontend/components/core/NavBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const SubMenuList = styled.ul`
6363
display: flex;
6464
flex-direction: column;
6565
background: ${(props) => props.theme.colors.white};
66-
color: ${(props) => props.theme.colors.grey2};
66+
color: ${(props) => props.theme.colors.grey_66};
6767
padding: 1rem 0;
6868
position: absolute;
6969
left: 0;

frontend/data/enums/PageName.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export enum PageName {
66
Contribute = 'Contribute',
77
Sponsor = 'Sponsor',
88
SponsorProspectus = 'SponsorProspectus',
9+
SponsorBenefit = 'SponsorBenefit',
910
SponsorTerms = 'SponsorTerms',
1011
CoC = 'CoC'
1112
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface ISponsorTerms {
1+
export interface IContents {
22
content: {
33
ko: string
44
en: string
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface IApiSponsorTerms {
1+
export interface IApiContents {
22
slug: string
33
title: string
44
content: string

frontend/locales/en/pageTitle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default {
88
[PageName.Contribute]: 'Contribution',
99
[PageName.Sponsor]: 'Sponsor',
1010
[PageName.SponsorProspectus]: 'Prospectus',
11+
[PageName.SponsorBenefit]: 'Benefit',
1112
[PageName.SponsorTerms]: 'Terms of Sponsor',
1213
[PageName.CoC]: 'CoC'
1314
}

frontend/locales/ko/pageTitle.ts

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

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
"env-cmd": "^10.1.0",
1616
"gray-matter": "^4.0.3",
1717
"i18next": "^21.6.14",
18+
"ms": "^2.1.3",
1819
"next": "12.1.0",
1920
"next-seo": "^5.4.0",
2021
"react": "17.0.2",
2122
"react-dom": "17.0.2",
2223
"react-i18next": "^11.16.1",
2324
"react-markdown": "^8.0.3",
25+
"remark-gfm": "^3.0.1",
2426
"serverless": "^2.72.3",
2527
"styled-components": "^5.3.3"
2628
},

frontend/pages/api/sponsor.ts

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
11
import axios from 'axios'
2-
import { ISponsorTerms } from '../../interfaces/ISponsor'
3-
import { IApiSponsorTerms } from '../../interfaces/api/IApiSponsor'
2+
import { IContents } from '../../interfaces/IContents'
3+
import { IApiContents } from '../../interfaces/api/IApiContents'
44

5-
export const getSponsorTerms = async (): Promise<ISponsorTerms> => {
5+
export const getSponsorProspectus = async (): Promise<IContents> => {
6+
const response = await axios.get(
7+
`https://api.2022.pycon.kr/api/content/prospectus`
8+
)
9+
const data: IApiContents = response.data
10+
11+
return {
12+
content: {
13+
ko: data.content,
14+
en: data.eng_content
15+
}
16+
}
17+
}
18+
19+
export const getSponsorBenefit = async (): Promise<IContents> => {
20+
const response = await axios.get(
21+
`https://api.2022.pycon.kr/api/content/sporsor-benefit`
22+
)
23+
const data: IApiContents = response.data
24+
25+
return {
26+
content: {
27+
ko: data.content,
28+
en: data.eng_content
29+
}
30+
}
31+
}
32+
33+
export const getSponsorTerms = async (): Promise<IContents> => {
634
const response = await axios.get(
735
`https://api.2022.pycon.kr/api/content/terms-of-sponsor`
836
)
9-
const data: IApiSponsorTerms = response.data
37+
const data: IApiContents = response.data
1038

1139
return {
1240
content: {

0 commit comments

Comments
 (0)