@@ -7,11 +7,33 @@ import PageTitle from '../../components/core/PageTitle'
77import { PreviousPyconkr } from '../../data/enums/PreviousPyconkr'
88import { Heading3 , Paragraph , ColorLink } from '../../assets/styles/typo'
99import 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+ `
1133const Container = styled . div `
1234 padding-bottom: 2rem;
1335 & + & {
14- padding-top: 2rem ;
36+ padding-top: 5rem ;
1537 }
1638`
1739const ParagraphContainer = styled . div `
@@ -25,23 +47,44 @@ const Link = styled(ColorLink)`
2547const 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