1
1
import styled from "styled-components" ;
2
2
export const HandbookWrapper = styled . div `
3
+ /* Ensure consistent initial layout for SSR */
3
4
display: flex;
4
5
flex-direction: column;
6
+ min-height: 100vh;
7
+ position: relative;
5
8
6
9
.content > a:first-of-type > h2:first-of-type {
7
10
padding-top: 1rem;
@@ -14,19 +17,19 @@ export const HandbookWrapper = styled.div`
14
17
width:100%;
15
18
padding-bottom: 2rem;
16
19
ul > li {
17
- color: ${ ( props ) => props . theme . text } ;
20
+ color: ${ ( props ) => props . theme . text || "#000" } ;
18
21
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
19
22
}
20
23
ol > li {
21
- color: ${ ( props ) => props . theme . menuColor } ;
24
+ color: ${ ( props ) => props . theme . menuColor || "#000" } ;
22
25
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
23
26
}
24
27
ul > li > span {
25
- color: ${ ( props ) => props . theme . text } ;
28
+ color: ${ ( props ) => props . theme . text || "#000" } ;
26
29
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
27
30
}
28
31
ol > li > span {
29
- color: ${ ( props ) => props . theme . text } ;
32
+ color: ${ ( props ) => props . theme . text || "#000" } ;
30
33
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
31
34
}
32
35
}
@@ -57,7 +60,7 @@ export const HandbookWrapper = styled.div`
57
60
margin: 0;
58
61
padding: 0;
59
62
width: 250px;
60
- background-color:${ ( props ) => props . theme . secondaryLightColor } ;
63
+ background-color:${ ( props ) => props . theme . secondaryLightColor || "#f0f0f0" } ;
61
64
height: auto;
62
65
min-height: 100%;
63
66
flex-shrink: 0;
@@ -73,25 +76,74 @@ export const HandbookWrapper = styled.div`
73
76
}
74
77
75
78
.sidebar a.active {
76
- background-color: ${ ( props ) => props . theme . primaryLightColorTwo } ;
79
+ background-color: ${ ( props ) => props . theme . primaryLightColorTwo || "#007acc" } ;
77
80
color: white;
78
81
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
79
82
}
80
83
81
84
.sidebar a:hover:not(.active) {
82
- background-color:${ ( props ) => props . theme . secondaryLightColor } ;
85
+ background-color:${ ( props ) => props . theme . secondaryLightColor || "#f0f0f0" } ;
83
86
color: white;
84
87
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
85
88
}
86
89
90
+ /* SSR-safe header with strict dimension control */
87
91
.page-header-section {
88
- height: 10rem;
89
- text-align: center;
92
+ position: relative;
93
+ width: 100%;
94
+ height: 160px;
95
+ margin: 0;
96
+ padding: 0;
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: center;
90
100
background: rgb(71,126,150);
91
101
background: linear-gradient(250deg, rgba(71,126,150,1) 0%, rgba(0,179,159,1) 35%, rgba(60,73,79,1) 100%);
92
- h1 {
93
- line-height: 10rem;
94
- color: white;
102
+ /* Prevent layout shift during hydration */
103
+ contain: layout;
104
+ }
105
+
106
+ .page-header-section h1 {
107
+ margin: 0;
108
+ padding: 0 1rem;
109
+ width: 100%;
110
+ max-width: 1200px;
111
+ color: white;
112
+ font-size: 2.5rem;
113
+ font-weight: 700;
114
+ line-height: 1.2;
115
+ text-align: center;
116
+ box-sizing: border-box;
117
+ /* Use standard system fonts to avoid FOUT */
118
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
119
+ }
120
+
121
+ @media screen and (max-width: 768px) {
122
+ .page-header-section {
123
+ height: auto;
124
+ min-height: 140px;
125
+ padding: 1rem 0;
126
+ }
127
+
128
+ .page-header-section h1 {
129
+ font-size: 1.5rem;
130
+ line-height: 1.2;
131
+ padding: 0 1rem;
132
+ word-wrap: break-word;
133
+ hyphens: auto;
134
+ }
135
+ }
136
+
137
+ @media screen and (max-width: 480px) {
138
+ .page-header-section {
139
+ min-height: 120px;
140
+ padding: 0.75rem 0;
141
+ }
142
+
143
+ .page-header-section h1 {
144
+ font-size: 1.25rem;
145
+ line-height: 1.1;
146
+ padding: 0 0.75rem;
95
147
}
96
148
}
97
149
@@ -115,7 +167,7 @@ export const HandbookWrapper = styled.div`
115
167
display: block;
116
168
margin-left: auto;
117
169
margin-right: auto;
118
- filter: invert(${ ( props ) => props . theme . meshInterfaceLogoFilter } );
170
+ filter: invert(${ ( props ) => props . theme . meshInterfaceLogoFilter || 0 } );
119
171
}
120
172
.site-icon{
121
173
height: 1.6rem;
@@ -129,7 +181,7 @@ export const HandbookWrapper = styled.div`
129
181
vertical-align: bottom;
130
182
}
131
183
.smp-action{
132
- filter: invert(${ ( props ) => props . theme . meshInterfaceLogoFilter } );
184
+ filter: invert(${ ( props ) => props . theme . meshInterfaceLogoFilter || 0 } );
133
185
}
134
186
}
135
187
@@ -139,7 +191,7 @@ export const HandbookWrapper = styled.div`
139
191
}
140
192
141
193
td, th {
142
- border: 0.05rem solid ${ ( props ) => props . theme . primaryLightColor } ;
194
+ border: 0.05rem solid ${ ( props ) => props . theme . primaryLightColor || "#ccc" } ;
143
195
text-align: left;
144
196
padding: 0.5rem;
145
197
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
@@ -157,7 +209,7 @@ export const HandbookWrapper = styled.div`
157
209
}
158
210
159
211
tbody:nth-child(even) {
160
- background-color: ${ ( props ) => props . theme . secondaryLightColorTwo } ;
212
+ background-color: ${ ( props ) => props . theme . secondaryLightColorTwo || "#f9f9f9" } ;
161
213
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
162
214
}
163
215
@@ -195,7 +247,7 @@ export const HandbookWrapper = styled.div`
195
247
}
196
248
197
249
input[type=checkbox] + label:before {
198
- content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="white" viewBox="0 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>'); ;
250
+ content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="white" viewBox="0 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');
199
251
border: 0.1em solid #000;
200
252
border-radius: 0.2em;
201
253
display: inline-block;
@@ -204,7 +256,6 @@ export const HandbookWrapper = styled.div`
204
256
padding-left: 0.2em;
205
257
padding-bottom: 0.3em;
206
258
margin-right: 0.5em;
207
-
208
259
margin-bottom: 0.15em;
209
260
vertical-align: bottom;
210
261
color: transparent;
@@ -215,19 +266,18 @@ export const HandbookWrapper = styled.div`
215
266
transform: scale(0);
216
267
}
217
268
rect {
218
- fill: ${ props => props . theme . grey313131ToGreenC9FCF6 } ;
269
+ fill: ${ props => props . theme . grey313131ToGreenC9FCF6 || "#313131" } ;
219
270
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
220
271
}
221
272
path {
222
- stroke: ${ props => props . theme . green00D3A9ToGreen00B39F } ;
273
+ stroke: ${ props => props . theme . green00D3A9ToGreen00B39F || "#00D3A9" } ;
223
274
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
224
275
}
225
276
226
277
input[type=checkbox]:checked + label:before {
227
- content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="black" viewBox="0 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');;
228
-
229
- background-color: ${ ( props ) => props . theme . keppelColor } ;
230
- border-color: ${ ( props ) => props . theme . primaryLightColorTwo } ;
278
+ content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="black" viewBox="4 4 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/></svg>');
279
+ background-color: ${ ( props ) => props . theme . keppelColor || "#00B39F" } ;
280
+ border-color: ${ ( props ) => props . theme . primaryLightColorTwo || "#007acc" } ;
231
281
color: #fff;
232
282
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
233
283
}
@@ -239,8 +289,8 @@ export const HandbookWrapper = styled.div`
239
289
240
290
input[type=checkbox]:checked:disabled + label:before {
241
291
transform: scale(1);
242
- background-color: ${ ( props ) => props . theme . secondaryLightColor } ;
243
- border-color: ${ ( props ) => props . theme . secondaryLightColor } ;
292
+ background-color: ${ ( props ) => props . theme . secondaryLightColor || "#f0f0f0" } ;
293
+ border-color: ${ ( props ) => props . theme . secondaryLightColor || "#f0f0f0" } ;
244
294
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
245
295
}
246
296
@@ -335,7 +385,7 @@ export const HandbookWrapper = styled.div`
335
385
overflow:hidden;
336
386
.active{
337
387
font-weight:5000;
338
- color: ${ ( props ) => props . theme . secondaryColor } ;
388
+ color: ${ ( props ) => props . theme . secondaryColor || "#333" } ;
339
389
}
340
390
ul{
341
391
list-style: none;
@@ -362,7 +412,7 @@ export const HandbookWrapper = styled.div`
362
412
}
363
413
.text{
364
414
p{
365
- color: ${ props => props . theme . tertiaryColor } ;
415
+ color: ${ props => props . theme . tertiaryColor || "#666" } ;
366
416
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
367
417
}
368
418
}
@@ -375,7 +425,7 @@ export const HandbookWrapper = styled.div`
375
425
vertical-align: top;
376
426
}
377
427
.skill{
378
- color: ${ props => props . theme . tertiaryColor } ;
428
+ color: ${ props => props . theme . tertiaryColor || "#666" } ;
379
429
font-size: 16px;
380
430
padding: 0 0 1.25rem 1.8rem;
381
431
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
@@ -396,11 +446,11 @@ export const HandbookWrapper = styled.div`
396
446
.content_type {
397
447
display: flex;
398
448
flex-direction: column;
399
- background: ${ props => props . theme . grey212121ToWhite } ;
400
- box-shadow: 0px 0px ${ props => props . theme . projectShadowsize } ${ props => props . theme . green00D3A9ToGreyE6E6E6 } ;
449
+ background: ${ props => props . theme . grey212121ToWhite || "#212121" } ;
450
+ box-shadow: 0px 0px ${ props => props . theme . projectShadowsize || "10px" } ${ props => props . theme . green00D3A9ToGreyE6E6E6 || "#00D3A9" } ;
401
451
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
402
452
&:hover{
403
- box-shadow: 0px 0px 5px ${ props => props . theme . primaryColor } ;
453
+ box-shadow: 0px 0px 5px ${ props => props . theme . primaryColor || "#007acc" } ;
404
454
}
405
455
padding: 12% 6% 12% 6%;
406
456
height: 220px;
@@ -411,11 +461,11 @@ export const HandbookWrapper = styled.div`
411
461
margin-bottom: auto;
412
462
margin-top: 0.5rem;
413
463
font-weight: 700;
414
- color: ${ props => props . theme . secondaryColor }
464
+ color: ${ props => props . theme . secondaryColor || "#333" }
415
465
}
416
466
p{
417
467
font-weight: 300;
418
- color: ${ props => props . theme . text } ;
468
+ color: ${ props => props . theme . text || "#000" } ;
419
469
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
420
470
}
421
471
img{
@@ -425,7 +475,7 @@ export const HandbookWrapper = styled.div`
425
475
}
426
476
.process {
427
477
margin: 10px auto;
428
- border-left: solid 2px ${ ( props ) => props . theme . tertiaryColor } ;
478
+ border-left: solid 2px ${ ( props ) => props . theme . tertiaryColor || "#666" } ;
429
479
padding: 0px 20px 0px 20px;
430
480
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
431
481
}
@@ -441,9 +491,9 @@ export const HandbookWrapper = styled.div`
441
491
width: 20px;
442
492
height: 20px;
443
493
display: block;
444
- border: 3px solid ${ ( props ) => props . theme . tertiaryColor } ;
494
+ border: 3px solid ${ ( props ) => props . theme . tertiaryColor || "#666" } ;
445
495
border-radius: 50%;
446
- background-color: ${ ( props ) => props . theme . secondaryColor } ;
496
+ background-color: ${ ( props ) => props . theme . secondaryColor || "#333" } ;
447
497
top: 25px;
448
498
left: -32px;
449
499
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
@@ -458,7 +508,7 @@ export const HandbookWrapper = styled.div`
458
508
details.invite-only {
459
509
margin: 1rem;
460
510
padding: 1rem;
461
- background-color: ${ ( props ) => props . theme . grey313131ToGreenC9FCF6 } ;
511
+ background-color: ${ ( props ) => props . theme . grey313131ToGreenC9FCF6 || "#313131" } ;
462
512
span {
463
513
font-weight: bold;
464
514
display: inline;
0 commit comments