File tree Expand file tree Collapse file tree 14 files changed +169
-37
lines changed
Expand file tree Collapse file tree 14 files changed +169
-37
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ const MarkdownStyle = styled.div`
2222 li {
2323 margin: 0.3rem 0.6rem;
2424 padding: 0;
25+ }
26+ ol li {
27+ list-style: numeric;
28+ }
29+ ul li {
2530 list-style: circle;
2631 }
2732 hr {
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ export enum PageName {
66 Contribute = 'Contribute' ,
77 Sponsor = 'Sponsor' ,
88 SponsorProspectus = 'SponsorProspectus' ,
9+ SponsorJoin = 'SponsorJoin' ,
910 SponsorBenefit = 'SponsorBenefit' ,
11+ SponsorFaq = 'SponsorFaq' ,
1012 SponsorTerms = 'SponsorTerms' ,
1113 CoC = 'CoC'
1214}
Original file line number Diff line number Diff line change 11export default {
22 notFound : "Can't find this page" ,
3- default : 'Server error has occurred'
3+ serverError : 'Server error has occurred'
44}
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ export default {
88 [ PageName . Contribute ] : 'Contribution' ,
99 [ PageName . Sponsor ] : 'Sponsor' ,
1010 [ PageName . SponsorProspectus ] : 'Prospectus' ,
11+ [ PageName . SponsorJoin ] : 'Join as Sponsor' ,
1112 [ PageName . SponsorBenefit ] : 'Benefit' ,
13+ [ PageName . SponsorFaq ] : 'FAQ' ,
1214 [ PageName . SponsorTerms ] : 'Terms of Sponsor' ,
1315 [ PageName . CoC ] : 'CoC'
1416}
Original file line number Diff line number Diff line change 11export default {
22 notFound : '페이지를 찾을 수 없습니다.' ,
3- default : '서버에서 문제가 발생했습니다.'
3+ serverError : '서버에서 문제가 발생했습니다.'
44}
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ export default {
88 [ PageName . Contribute ] : '기여하기' ,
99 [ PageName . Sponsor ] : '후원하기' ,
1010 [ PageName . SponsorProspectus ] : '후원사 안내' ,
11+ [ PageName . SponsorJoin ] : '후원사로 참여하기' ,
1112 [ PageName . SponsorBenefit ] : '후원사 혜택 설명' ,
13+ [ PageName . SponsorFaq ] : '자주 묻는 질문' ,
1214 [ PageName . SponsorTerms ] : '후원사 약관' ,
1315 [ PageName . CoC ] : '행동 강령'
1416}
Original file line number Diff line number Diff line change @@ -30,6 +30,34 @@ export const getSponsorBenefit = async (): Promise<IContents> => {
3030 }
3131}
3232
33+ export const getSponsorJoin = async ( ) : Promise < IContents > => {
34+ const response = await axios . get (
35+ `https://api.2022.pycon.kr/api/content/sponsor-join`
36+ )
37+ const data : IApiContents = response . data
38+
39+ return {
40+ content : {
41+ ko : data . content ,
42+ en : data . eng_content
43+ }
44+ }
45+ }
46+
47+ export const getSponsorFaq = async ( ) : Promise < IContents > => {
48+ const response = await axios . get (
49+ `https://api.2022.pycon.kr/api/content/sponsor-faq`
50+ )
51+ const data : IApiContents = response . data
52+
53+ return {
54+ content : {
55+ ko : data . content ,
56+ en : data . eng_content
57+ }
58+ }
59+ }
60+
3361export const getSponsorTerms = async ( ) : Promise < IContents > => {
3462 const response = await axios . get (
3563 `https://api.2022.pycon.kr/api/content/terms-of-sponsor`
Original file line number Diff line number Diff line change @@ -10,14 +10,18 @@ import matter from 'gray-matter'
1010import ReactMarkdown from 'react-markdown'
1111import HeadingComponents from '../../components/core/MarkdownHeadings'
1212import MarkdownStyle from '../../assets/styles/markdown'
13+ import remarkGfm from 'remark-gfm'
1314
1415const CoC : NextPage = ( props : any ) => {
1516 const { t } = useTranslation ( )
1617
1718 return (
1819 < div >
1920 < MarkdownStyle >
20- < ReactMarkdown components = { HeadingComponents } >
21+ < ReactMarkdown
22+ components = { HeadingComponents }
23+ remarkPlugins = { [ remarkGfm ] }
24+ >
2125 { props . content }
2226 </ ReactMarkdown >
2327 </ MarkdownStyle >
Original file line number Diff line number Diff line change @@ -3,10 +3,11 @@ import type { NextPage, GetServerSideProps } from 'next'
33import { PageName } from '../../data/enums/PageName'
44import { SponsorPage } from '../../interfaces/PageProps'
55import { GetServerSidePropsContext } from 'next'
6- import { getSponsorBenefit , getSponsorTerms } from '../api/sponsor'
6+ import { getSponsorBenefit } from '../api/sponsor'
77import ReactMarkdown from 'react-markdown'
88import HeadingComponents from '../../components/core/MarkdownHeadings'
99import MarkdownStyle from '../../assets/styles/markdown'
10+ import remarkGfm from 'remark-gfm'
1011
1112interface SponsorBenefitPage extends SponsorPage {
1213 locale : string
@@ -16,7 +17,10 @@ const SponsorBenefit: NextPage = (props: SponsorBenefitPage) => {
1617 return (
1718 < div >
1819 < MarkdownStyle >
19- < ReactMarkdown components = { HeadingComponents } >
20+ < ReactMarkdown
21+ components = { HeadingComponents }
22+ remarkPlugins = { [ remarkGfm ] }
23+ >
2024 { props . content [ props . locale ] }
2125 </ ReactMarkdown >
2226 </ MarkdownStyle >
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import type { NextPage , GetServerSideProps } from 'next'
3+ import { PageName } from '../../data/enums/PageName'
4+ import { SponsorPage } from '../../interfaces/PageProps'
5+ import { GetServerSidePropsContext } from 'next'
6+ import { getSponsorFaq } from '../api/sponsor'
7+ import ReactMarkdown from 'react-markdown'
8+ import HeadingComponents from '../../components/core/MarkdownHeadings'
9+ import MarkdownStyle from '../../assets/styles/markdown'
10+ import PageTitle from '../../components/core/PageTitle'
11+ import remarkGfm from 'remark-gfm'
12+
13+ interface SponsorSponsorFaqPage extends SponsorPage {
14+ locale : string
15+ }
16+
17+ const SponsorFaq : NextPage = ( props : SponsorSponsorFaqPage ) => {
18+ return (
19+ < div >
20+ < PageTitle title = { props . pageName } />
21+ < MarkdownStyle >
22+ < ReactMarkdown
23+ components = { HeadingComponents }
24+ remarkPlugins = { [ remarkGfm ] }
25+ >
26+ { props . content [ props . locale ] }
27+ </ ReactMarkdown >
28+ </ MarkdownStyle >
29+ </ div >
30+ )
31+ }
32+
33+ export const getServerSideProps : GetServerSideProps = async (
34+ context : GetServerSidePropsContext
35+ ) => {
36+ const { locale } = context
37+ const content = await getSponsorFaq ( )
38+
39+ return {
40+ props : {
41+ title : PageName . SponsorFaq ,
42+ locale,
43+ ...content
44+ }
45+ }
46+ }
47+
48+ export default SponsorFaq
You can’t perform that action at this time.
0 commit comments