Skip to content

Commit 4b20ddd

Browse files
author
Poojan
committed
fix(About): apply full-page dark/high-contrast background and correct styled-component imports
1 parent aacce0d commit 4b20ddd

File tree

2 files changed

+73
-12
lines changed

2 files changed

+73
-12
lines changed

client/modules/About/About.styles.js

Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
import styled from 'styled-components';
1+
import styled, { createGlobalStyle } from 'styled-components';
22
import { remSize, prop } from '../../theme';
33

4+
// 1. Global style for the full page background
5+
export const GlobalStyle = createGlobalStyle`
6+
html, body, #root {
7+
background-color: ${prop('backgroundColor')};
8+
color: ${prop('primaryTextColor')};
9+
min-height: 100vh;
10+
width: 100vw;
11+
margin: 0;
12+
padding: 0;
13+
transition: background-color 0.3s, color 0.3s;
14+
font-family: inherit;
15+
}
16+
`;
17+
18+
// 2. Page Content wrapper
419
export const AboutPageContent = styled.div`
520
margin: ${remSize(42)} ${remSize(295)};
21+
background-color: ${prop('backgroundColor')};
22+
color: ${prop('primaryTextColor')};
23+
min-height: 100vh;
624
725
@media (max-width: 1279px) {
826
margin: ${remSize(20)};
@@ -12,10 +30,15 @@ export const AboutPageContent = styled.div`
1230
}
1331
`;
1432

33+
// 3. Intro section
1534
export const Intro = styled.div`
35+
background-color: ${prop('backgroundColor')};
36+
color: ${prop('primaryTextColor')};
37+
1638
& h1 {
1739
font-size: ${remSize(32)};
1840
font-weight: 700;
41+
color: ${prop('primaryTextColor')};
1942
}
2043
2144
& a {
@@ -26,38 +49,40 @@ export const Intro = styled.div`
2649
align-items: center;
2750
width: ${remSize(110)};
2851
justify-content: space-evenly;
52+
color: ${prop('primaryTextColor')};
53+
background-color: ${prop('backgroundColor')};
2954
3055
&:hover {
3156
color: ${prop('Button.primary.default.background')};
3257
background-color: ${prop('Button.primary.hover.background')};
3358
border-color: ${prop('Button.primary.hover.border')};
3459
text-decoration: none;
3560
36-
& svg {
37-
& path {
38-
fill: ${prop('Button.primary.default.background')};
39-
}
61+
svg path {
62+
fill: ${prop('Button.primary.default.background')};
4063
}
4164
}
4265
}
4366
`;
4467

68+
// 4. Intro Headline
4569
export const IntroHeadline = styled.div`
4670
display: flex;
4771
align-items: center;
72+
background-color: ${prop('backgroundColor')};
73+
color: ${prop('primaryTextColor')};
4874
4975
& div {
5076
height: 100%;
5177
align-items: center;
5278
font-weight: 550;
5379
font-size: ${remSize(24)};
5480
margin: ${remSize(24)};
81+
color: ${prop('primaryTextColor')};
5582
}
5683
57-
& svg {
58-
& path {
59-
fill: ${prop('logoColor')};
60-
}
84+
& svg path {
85+
fill: ${prop('logoColor')};
6186
}
6287
6388
@media (max-width: 769px) {
@@ -70,62 +95,79 @@ export const IntroHeadline = styled.div`
7095
}
7196
`;
7297

98+
// 5. Intro Description
7399
export const IntroDescription = styled.div`
74100
line-height: ${remSize(27)};
75101
font-size: ${remSize(16)};
76102
margin: ${remSize(24)} 0;
103+
background-color: ${prop('backgroundColor')};
104+
color: ${prop('primaryTextColor')};
77105
78106
p {
79107
margin-bottom: ${remSize(24)};
108+
color: ${prop('primaryTextColor')};
80109
}
81110
`;
82111

112+
// 6. Section Wrapper
83113
export const Section = styled.div`
84114
margin: ${remSize(50)} 0;
115+
background-color: ${prop('backgroundColor')};
116+
color: ${prop('primaryTextColor')};
85117
86118
& h2 {
87119
font-size: ${remSize(24)};
88120
padding-bottom: ${remSize(30)};
89121
font-weight: 600;
122+
color: ${prop('primaryTextColor')};
90123
}
91124
92125
@media (max-width: 769px) {
93126
display: grid;
94127
}
95128
`;
96129

130+
// 7. SectionContainer
97131
export const SectionContainer = styled.div`
98132
display: flex;
99133
justify-content: row;
100134
padding-top: 0;
101135
font-size: ${remSize(16)};
102136
width: 100%;
103137
flex-wrap: wrap;
138+
background-color: ${prop('backgroundColor')};
139+
color: ${prop('primaryTextColor')};
104140
105141
@media (max-width: 769px) {
106142
display: grid;
107143
}
108144
`;
109145

146+
// 8. SectionItem
110147
export const SectionItem = styled.div`
111148
width: 33%;
112149
display: flex;
113150
line-height: ${remSize(19.5)};
114151
font-size: ${remSize(14)};
115152
padding: 0 ${remSize(30)} ${remSize(30)} 0;
153+
background-color: ${prop('backgroundColor')};
154+
color: ${prop('primaryTextColor')};
116155
117156
& p {
118157
margin-top: ${remSize(7)};
158+
color: ${prop('primaryTextColor')};
119159
}
120160
121161
& a {
122162
font-weight: 700;
123163
font-size: ${remSize(16)};
124164
text-decoration: underline;
165+
color: ${prop('primaryTextColor')};
125166
126167
&:hover {
127168
text-decoration: underline;
128169
text-decoration-thickness: 0.1em;
170+
color: ${prop('primaryTextColor')};
129171
}
130172
}
131173
@@ -149,39 +191,49 @@ export const SectionItem = styled.div`
149191
}
150192
`;
151193

194+
// 9. Contact Section
152195
export const Contact = styled.div`
153196
margin-bottom: ${remSize(50)};
197+
background-color: ${prop('backgroundColor')};
198+
color: ${prop('primaryTextColor')};
154199
155200
& h2 {
156201
font-size: ${remSize(24)};
157202
font-weight: 600;
203+
color: ${prop('primaryTextColor')};
158204
}
159205
160206
& div {
161207
display: flex;
162208
width: 100%;
163209
margin: ${remSize(20)} 0;
164210
font-size: ${remSize(16)};
211+
color: ${prop('primaryTextColor')};
165212
}
166213
`;
167214

215+
// 10. ContactTitle
168216
export const ContactTitle = styled.p`
169217
width: 50%;
218+
color: ${prop('primaryTextColor')};
170219
171220
@media (max-width: 769px) {
172221
width: 30%;
173222
}
174223
`;
175224

225+
// 11. ContactHandles
176226
export const ContactHandles = styled.p`
177227
width: 50%;
228+
color: ${prop('primaryTextColor')};
178229
179230
& a {
180231
color: ${prop('logoColor')};
181232
text-decoration: underline;
182233
183234
&:hover {
184235
text-decoration: underline;
236+
color: ${prop('logoColor')};
185237
}
186238
}
187239
@@ -190,11 +242,14 @@ export const ContactHandles = styled.p`
190242
}
191243
`;
192244

245+
// 12. Footer
193246
export const Footer = styled.div`
194-
border-top: 0.1rem dashed;
247+
border-top: 0.1rem dashed ${prop('primaryTextColor')};
195248
padding: 0 ${remSize(20)} ${remSize(70)} 0;
196249
width: 100%;
197250
font-size: ${remSize(16)};
251+
background-color: ${prop('backgroundColor')};
252+
color: ${prop('primaryTextColor')};
198253
199254
& div {
200255
display: flex;
@@ -210,11 +265,13 @@ export const Footer = styled.div`
210265
&:hover {
211266
text-decoration: underline;
212267
text-decoration-thickness: 0.1em;
268+
color: ${prop('logoColor')};
213269
}
214270
}
215271
216272
& p {
217273
padding: ${remSize(20)} 9.5% 0 0;
274+
color: ${prop('primaryTextColor')};
218275
}
219276
220277
@media (max-width: 770px) {
@@ -229,4 +286,4 @@ export const Footer = styled.div`
229286
display: grid;
230287
}
231288
}
232-
`;
289+
`;

client/modules/About/pages/About.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
66
import { Link } from 'react-router-dom';
77

88
import {
9+
GlobalStyle,
910
AboutPageContent,
1011
Intro,
1112
IntroHeadline,
@@ -20,6 +21,7 @@ import {
2021
} from '../About.styles';
2122

2223
import { ContactSectionLinks, AboutSectionInfo } from '../statics/aboutData';
24+
2325
import Nav from '../../IDE/components/Header/Nav';
2426
import RootPage from '../../../components/RootPage';
2527
import packageData from '../../../../package.json';
@@ -57,8 +59,10 @@ const About = () => {
5759

5860
return (
5961
<RootPage>
62+
<GlobalStyle />
63+
6064
<Helmet>
61-
<title> {t('About.TitleHelmet')} </title>
65+
<title>{t('About.TitleHelmet')}</title>
6266
</Helmet>
6367

6468
<Nav layout="dashboard" />

0 commit comments

Comments
 (0)