1
- import styled from 'styled-components' ;
1
+ import styled , { createGlobalStyle } from 'styled-components' ;
2
2
import { remSize , prop } from '../../theme' ;
3
3
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
4
19
export const AboutPageContent = styled . div `
5
20
margin: ${ remSize ( 42 ) } ${ remSize ( 295 ) } ;
21
+ background-color: ${ prop ( 'backgroundColor' ) } ;
22
+ color: ${ prop ( 'primaryTextColor' ) } ;
23
+ min-height: 100vh;
6
24
7
25
@media (max-width: 1279px) {
8
26
margin: ${ remSize ( 20 ) } ;
@@ -12,10 +30,15 @@ export const AboutPageContent = styled.div`
12
30
}
13
31
` ;
14
32
33
+ // 3. Intro section
15
34
export const Intro = styled . div `
35
+ background-color: ${ prop ( 'backgroundColor' ) } ;
36
+ color: ${ prop ( 'primaryTextColor' ) } ;
37
+
16
38
& h1 {
17
39
font-size: ${ remSize ( 32 ) } ;
18
40
font-weight: 700;
41
+ color: ${ prop ( 'primaryTextColor' ) } ;
19
42
}
20
43
21
44
& a {
@@ -26,38 +49,40 @@ export const Intro = styled.div`
26
49
align-items: center;
27
50
width: ${ remSize ( 110 ) } ;
28
51
justify-content: space-evenly;
52
+ color: ${ prop ( 'primaryTextColor' ) } ;
53
+ background-color: ${ prop ( 'backgroundColor' ) } ;
29
54
30
55
&:hover {
31
56
color: ${ prop ( 'Button.primary.default.background' ) } ;
32
57
background-color: ${ prop ( 'Button.primary.hover.background' ) } ;
33
58
border-color: ${ prop ( 'Button.primary.hover.border' ) } ;
34
59
text-decoration: none;
35
60
36
- & svg {
37
- & path {
38
- fill: ${ prop ( 'Button.primary.default.background' ) } ;
39
- }
61
+ svg path {
62
+ fill: ${ prop ( 'Button.primary.default.background' ) } ;
40
63
}
41
64
}
42
65
}
43
66
` ;
44
67
68
+ // 4. Intro Headline
45
69
export const IntroHeadline = styled . div `
46
70
display: flex;
47
71
align-items: center;
72
+ background-color: ${ prop ( 'backgroundColor' ) } ;
73
+ color: ${ prop ( 'primaryTextColor' ) } ;
48
74
49
75
& div {
50
76
height: 100%;
51
77
align-items: center;
52
78
font-weight: 550;
53
79
font-size: ${ remSize ( 24 ) } ;
54
80
margin: ${ remSize ( 24 ) } ;
81
+ color: ${ prop ( 'primaryTextColor' ) } ;
55
82
}
56
83
57
- & svg {
58
- & path {
59
- fill: ${ prop ( 'logoColor' ) } ;
60
- }
84
+ & svg path {
85
+ fill: ${ prop ( 'logoColor' ) } ;
61
86
}
62
87
63
88
@media (max-width: 769px) {
@@ -70,62 +95,79 @@ export const IntroHeadline = styled.div`
70
95
}
71
96
` ;
72
97
98
+ // 5. Intro Description
73
99
export const IntroDescription = styled . div `
74
100
line-height: ${ remSize ( 27 ) } ;
75
101
font-size: ${ remSize ( 16 ) } ;
76
102
margin: ${ remSize ( 24 ) } 0;
103
+ background-color: ${ prop ( 'backgroundColor' ) } ;
104
+ color: ${ prop ( 'primaryTextColor' ) } ;
77
105
78
106
p {
79
107
margin-bottom: ${ remSize ( 24 ) } ;
108
+ color: ${ prop ( 'primaryTextColor' ) } ;
80
109
}
81
110
` ;
82
111
112
+ // 6. Section Wrapper
83
113
export const Section = styled . div `
84
114
margin: ${ remSize ( 50 ) } 0;
115
+ background-color: ${ prop ( 'backgroundColor' ) } ;
116
+ color: ${ prop ( 'primaryTextColor' ) } ;
85
117
86
118
& h2 {
87
119
font-size: ${ remSize ( 24 ) } ;
88
120
padding-bottom: ${ remSize ( 30 ) } ;
89
121
font-weight: 600;
122
+ color: ${ prop ( 'primaryTextColor' ) } ;
90
123
}
91
124
92
125
@media (max-width: 769px) {
93
126
display: grid;
94
127
}
95
128
` ;
96
129
130
+ // 7. SectionContainer
97
131
export const SectionContainer = styled . div `
98
132
display: flex;
99
133
justify-content: row;
100
134
padding-top: 0;
101
135
font-size: ${ remSize ( 16 ) } ;
102
136
width: 100%;
103
137
flex-wrap: wrap;
138
+ background-color: ${ prop ( 'backgroundColor' ) } ;
139
+ color: ${ prop ( 'primaryTextColor' ) } ;
104
140
105
141
@media (max-width: 769px) {
106
142
display: grid;
107
143
}
108
144
` ;
109
145
146
+ // 8. SectionItem
110
147
export const SectionItem = styled . div `
111
148
width: 33%;
112
149
display: flex;
113
150
line-height: ${ remSize ( 19.5 ) } ;
114
151
font-size: ${ remSize ( 14 ) } ;
115
152
padding: 0 ${ remSize ( 30 ) } ${ remSize ( 30 ) } 0;
153
+ background-color: ${ prop ( 'backgroundColor' ) } ;
154
+ color: ${ prop ( 'primaryTextColor' ) } ;
116
155
117
156
& p {
118
157
margin-top: ${ remSize ( 7 ) } ;
158
+ color: ${ prop ( 'primaryTextColor' ) } ;
119
159
}
120
160
121
161
& a {
122
162
font-weight: 700;
123
163
font-size: ${ remSize ( 16 ) } ;
124
164
text-decoration: underline;
165
+ color: ${ prop ( 'primaryTextColor' ) } ;
125
166
126
167
&:hover {
127
168
text-decoration: underline;
128
169
text-decoration-thickness: 0.1em;
170
+ color: ${ prop ( 'primaryTextColor' ) } ;
129
171
}
130
172
}
131
173
@@ -149,39 +191,49 @@ export const SectionItem = styled.div`
149
191
}
150
192
` ;
151
193
194
+ // 9. Contact Section
152
195
export const Contact = styled . div `
153
196
margin-bottom: ${ remSize ( 50 ) } ;
197
+ background-color: ${ prop ( 'backgroundColor' ) } ;
198
+ color: ${ prop ( 'primaryTextColor' ) } ;
154
199
155
200
& h2 {
156
201
font-size: ${ remSize ( 24 ) } ;
157
202
font-weight: 600;
203
+ color: ${ prop ( 'primaryTextColor' ) } ;
158
204
}
159
205
160
206
& div {
161
207
display: flex;
162
208
width: 100%;
163
209
margin: ${ remSize ( 20 ) } 0;
164
210
font-size: ${ remSize ( 16 ) } ;
211
+ color: ${ prop ( 'primaryTextColor' ) } ;
165
212
}
166
213
` ;
167
214
215
+ // 10. ContactTitle
168
216
export const ContactTitle = styled . p `
169
217
width: 50%;
218
+ color: ${ prop ( 'primaryTextColor' ) } ;
170
219
171
220
@media (max-width: 769px) {
172
221
width: 30%;
173
222
}
174
223
` ;
175
224
225
+ // 11. ContactHandles
176
226
export const ContactHandles = styled . p `
177
227
width: 50%;
228
+ color: ${ prop ( 'primaryTextColor' ) } ;
178
229
179
230
& a {
180
231
color: ${ prop ( 'logoColor' ) } ;
181
232
text-decoration: underline;
182
233
183
234
&:hover {
184
235
text-decoration: underline;
236
+ color: ${ prop ( 'logoColor' ) } ;
185
237
}
186
238
}
187
239
@@ -190,11 +242,14 @@ export const ContactHandles = styled.p`
190
242
}
191
243
` ;
192
244
245
+ // 12. Footer
193
246
export const Footer = styled . div `
194
- border-top: 0.1rem dashed;
247
+ border-top: 0.1rem dashed ${ prop ( 'primaryTextColor' ) } ;
195
248
padding: 0 ${ remSize ( 20 ) } ${ remSize ( 70 ) } 0;
196
249
width: 100%;
197
250
font-size: ${ remSize ( 16 ) } ;
251
+ background-color: ${ prop ( 'backgroundColor' ) } ;
252
+ color: ${ prop ( 'primaryTextColor' ) } ;
198
253
199
254
& div {
200
255
display: flex;
@@ -210,11 +265,13 @@ export const Footer = styled.div`
210
265
&:hover {
211
266
text-decoration: underline;
212
267
text-decoration-thickness: 0.1em;
268
+ color: ${ prop ( 'logoColor' ) } ;
213
269
}
214
270
}
215
271
216
272
& p {
217
273
padding: ${ remSize ( 20 ) } 9.5% 0 0;
274
+ color: ${ prop ( 'primaryTextColor' ) } ;
218
275
}
219
276
220
277
@media (max-width: 770px) {
@@ -229,4 +286,4 @@ export const Footer = styled.div`
229
286
display: grid;
230
287
}
231
288
}
232
- ` ;
289
+ ` ;
0 commit comments