Skip to content

Commit ef7791c

Browse files
authored
Merge pull request #252 from CivicDataLab/251-add-policies-in-about-page
add Policies component and integrate into About page
2 parents 6d076cf + d5fa335 commit ef7791c

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

src/components/Policies.js

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import React from 'react';
2+
import styled from 'styled-components';
3+
import TeamHomePageStyle from '../styles/TeamHomePage';
4+
import MainContainer from '../styles/MainContainer';
5+
import HeroText from '../styles/HeroText';
6+
import StandardGrid from '../styles/StandardGrid';
7+
import { MiniTeam } from '../components/MiniTeamSection';
8+
9+
const PoliciesStyle = styled(MiniTeam)`
10+
a {
11+
display: block;
12+
font-weight: 500;
13+
color: #0da3b7;
14+
text-decoration: none;
15+
padding-bottom: 8px;
16+
border-bottom: 1px solid #0da3b7;
17+
margin: 20px 0;
18+
19+
&:hover {
20+
color: #1dcccc;
21+
}
22+
}
23+
24+
.upper-content-section {
25+
max-width: 100%;
26+
}
27+
28+
h1 {
29+
overflow-wrap: break-word;
30+
max-width: 100%;
31+
}
32+
33+
@media (min-width: 1280px) {
34+
width: 80%;
35+
}
36+
`;
37+
38+
const PoliciesStyleAbout = styled(TeamHomePageStyle)`
39+
a {
40+
display: block;
41+
font-weight: 500;
42+
color: #0da3b7;
43+
text-decoration: none;
44+
padding-bottom: 8px;
45+
border-bottom: 1px solid #0da3b7;
46+
margin: 20px 0;
47+
48+
&:hover {
49+
color: #1dcccc;
50+
}
51+
}
52+
53+
.upper-content-section {
54+
max-width: 100%;
55+
}
56+
57+
h1 {
58+
overflow-wrap: break-word;
59+
max-width: 100%;
60+
}
61+
`;
62+
63+
const Policies = ({ policies }) => {
64+
return (
65+
<>
66+
<PoliciesStyle>
67+
<h3>Policies</h3>
68+
<div>
69+
{policies?.map((resource) => (
70+
<a key={resource?.link} href={resource?.link} target="_blank" rel="noopener noreferrer">
71+
{resource?.title}
72+
</a>
73+
))}
74+
</div>
75+
</PoliciesStyle>
76+
</>
77+
);
78+
};
79+
80+
export const PoliciesAbout = ({ policies }) => {
81+
return (
82+
<MainContainer>
83+
<PoliciesStyleAbout>
84+
<StandardGrid>
85+
<div className={'content upper-content-section'}>
86+
<HeroText className={'section-heading'}>policies</HeroText>
87+
</div>
88+
<div className={'content lower-content-section'}>
89+
<hr />
90+
{policies?.map((resource) => (
91+
<a key={resource?.link} href={resource?.link} target="_blank" rel="noopener noreferrer">
92+
{resource?.title}
93+
</a>
94+
))}
95+
</div>
96+
</StandardGrid>
97+
</PoliciesStyleAbout>
98+
</MainContainer>
99+
);
100+
};
101+
102+
export default Policies;

src/pages/about.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Seo from '../components/Seo/Seo';
1616
import StandardGrid from '../styles/StandardGrid';
1717
import { PillarImages } from '../components/OurPillars';
1818
import { ResourcesAbout } from '../components/Resources';
19+
import { PoliciesAbout } from '../components/Policies';
1920
import AboutBackground from '../components/AboutBackground';
2021

2122
const HeroSection = styled(Section)`
@@ -160,6 +161,29 @@ const resources = [
160161
}
161162
];
162163

164+
const policies = [
165+
{
166+
link: 'https://drive.google.com/file/d/1i3zj9-pCJ-oOVp4g83RTExqKzHkEp6Wq/view?usp=drive_link',
167+
title: 'Health & Safety'
168+
},
169+
{
170+
link: 'https://drive.google.com/file/d/1fDQ-X4PV_GQXYb4jELf3S5uRZOC_QeiH/view?usp=drive_link',
171+
title: 'Environment & Sustainability'
172+
},
173+
{
174+
link: 'https://drive.google.com/file/d/1p1TGkLeZlPgstbByFNB-Ksk62EnIWHRW/view?usp=drive_link',
175+
title: 'Safeguarding'
176+
},
177+
{
178+
link: 'https://drive.google.com/file/d/16xsSLdgk76Y7-1Dd9AaS-Z2lRXY22lEq/view?usp=drive_link',
179+
title: 'Whistleblowing'
180+
},
181+
{
182+
link: 'https://drive.google.com/file/d/1I0rebTUbmhrVtli_hNwLOgRL6vN912kR/view?usp=drive_link',
183+
title: 'Modern Slavery'
184+
}
185+
];
186+
163187
const About = ({ data }) => {
164188
const values = data.allMarkdownRemark.edges;
165189

@@ -214,6 +238,8 @@ const About = ({ data }) => {
214238
</ValuesSection>
215239
</MainContainer>
216240
<ResourcesAbout resources={resources} />
241+
<PoliciesAbout policies={policies} />
242+
217243
<TeamHomePage />
218244
<WorkHomePage />
219245
<CivicDays />

0 commit comments

Comments
 (0)