Skip to content

Commit 9c299fb

Browse files
committed
Fix website responsive layouts
1 parent bfc0579 commit 9c299fb

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

website/sass/article.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
width: 100%;
1717
height: auto;
1818
}
19-
2019
}
2120

2221
hr {
@@ -47,7 +46,10 @@
4746
}
4847

4948
.social {
49+
width: 100%;
5050
display: flex;
51-
gap: 20px;
51+
gap: calc(var(--font-size-link) * 0.8);
52+
flex-wrap: wrap;
53+
justify-content: center;
5254
}
5355
}

website/sass/base.scss

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
--max-width: 1600px;
1010
--max-width-plus-padding: calc(var(--max-width) + 40px * 2);
1111
--variable-px: Min(1px, 0.15vw);
12+
--page-edge-padding: 40px;
1213
--border-thickness: 2px;
1314
--font-size-intro-heading: 60px;
1415
--font-size-intro-body: 22px;
@@ -35,6 +36,7 @@
3536
--font-size-heading: 28px;
3637
--font-size-body: 16px;
3738
--border-thickness: 1px;
39+
--page-edge-padding: 20px;
3840
}
3941

4042
@media screen and (max-width: 400px) {
@@ -178,7 +180,7 @@ pre {
178180

179181
kbd {
180182
background: var(--color-fog);
181-
border-radius: calc(var(--variable-px) * 4);
183+
border-radius: calc(var(--variable-px) * 2);
182184
outline: calc(var(--border-thickness) / 2) solid var(--color-navy);
183185
padding: 0 4px;
184186
margin: 0 4px;
@@ -303,6 +305,7 @@ hr,
303305
display: flex;
304306
flex-direction: column;
305307
align-items: flex-start;
308+
width: 100%;
306309
}
307310
}
308311

@@ -387,7 +390,7 @@ hr,
387390
min-width: 320px;
388391

389392
header {
390-
padding: 0 40px;
393+
padding: 0 var(--page-edge-padding);
391394
color: var(--color-walnut);
392395

393396
// var(--max-width) + (80px + 32px) * 2
@@ -549,7 +552,7 @@ hr,
549552
}
550553

551554
main {
552-
padding: 0 40px;
555+
padding: 0 var(--page-edge-padding);
553556

554557
.content {
555558
padding: calc(120 * var(--variable-px)) 0;
@@ -564,6 +567,16 @@ hr,
564567
~ section {
565568
margin-top: calc(80 * var(--variable-px));
566569
}
570+
571+
p img {
572+
max-width: 100%;
573+
}
574+
575+
pre {
576+
max-width: 100%;
577+
box-sizing: border-box;
578+
overflow: auto;
579+
}
567580
}
568581

569582
}

website/sass/blog.scss

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#intro {
22
.section {
33
flex: 1 1 100%;
4+
width: 100%;
45

56
.left-right-split {
67
width: 100%;
@@ -38,10 +39,19 @@
3839
flex-direction: column;
3940
gap: 80px;
4041

41-
4242
article {
4343
display: flex;
44-
gap: 80px;
44+
gap: 20px 80px;
45+
46+
@media screen and (max-width: 960px) {
47+
flex-wrap: wrap;
48+
justify-content: center;
49+
50+
.banner.banner {
51+
width: 100%;
52+
max-width: 540px;
53+
}
54+
}
4555

4656
.details {
4757
display: flex;

0 commit comments

Comments
 (0)