Skip to content

Commit 5da3589

Browse files
feat: improve mobile css
Signed-off-by: Henry Gressmann <[email protected]>
1 parent 7ce169e commit 5da3589

File tree

6 files changed

+35
-14
lines changed

6 files changed

+35
-14
lines changed

content/rust-os/2-shell/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
transparent = true
3-
title = "Creating a Kernel in Rust #2: Shell"
3+
title = "Operating Systems in Rust #2: Shell"
44
description = "Creating a simple shell for our kernel to run commands and help us debug"
55
date = 2023-07-08
66

sass/footer.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
@import "variables";
22

33
.footer {
4-
margin-left: 45px;
54
position: absolute;
65
display: flex;
76
bottom: 0;
8-
padding: 40px 0;
7+
padding: 2rem 2rem;
98
flex-grow: 0;
9+
width: 100%;
10+
11+
@media (max-width: $phone-max-width) {
12+
justify-content: center;
13+
}
1014

1115
&__inner {
1216
display: flex;

sass/header.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,16 @@
1414

1515
.header {
1616
height: 6rem;
17-
margin-left: 45px;
17+
margin: 0 3rem;
1818

1919
ul {
20+
display: flex;
21+
22+
@media (max-width: $phone-max-width) {
23+
justify-content: space-evenly;
24+
}
25+
26+
2027
padding: 40px 0;
2128
margin: 0;
2229
list-style: none;

sass/main.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,6 @@ ol {
311311
li {
312312
position: relative;
313313
}
314-
315-
@media (max-width: $phone-max-width) {
316-
margin-left: 20px;
317-
}
318314
}
319315

320316
ol ol {
@@ -329,12 +325,11 @@ ol ol {
329325
padding: .5rem 5rem;
330326
padding-bottom: 5rem;
331327
max-width: 60rem;
332-
min-height: calc(100vh - 7rem);
328+
min-height: calc(100vh - 6rem);
333329
margin: 0 auto;
334330

335331
@media (max-width: $phone-max-width) {
336-
padding: 20px;
337-
margin-top: -5rem;
332+
padding: 2rem;
338333
}
339334
}
340335

sass/pagination.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
max-width: 80%;
5858
}
5959

60-
+ .button {
60+
+.button {
6161
margin-left: 10px;
6262
}
6363

@@ -74,4 +74,4 @@
7474
white-space: nowrap;
7575
overflow: hidden;
7676
}
77-
}
77+
}

sass/post.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,37 @@
22

33
li>div.year-pad {
44
height: 4rem;
5+
6+
@media (max-width: $phone-max-width) {
7+
height: 4.5rem;
8+
}
59
}
610

711
li>div.year {
812
position: absolute;
913
z-index: -1;
1014
user-select: none;
11-
top: .4rem;
15+
top: 0.9rem;
1216
left: -2rem;
1317

1418
h2 {
19+
line-height: 1;
1520
font-size: 6rem;
1621
margin: 0;
1722
color: var(--background);
1823
opacity: 0.3;
1924
-webkit-text-stroke: 1px var(--color);
2025
}
26+
27+
28+
@media (max-width: $phone-max-width) {
29+
top: 0rem;
30+
left: 0rem;
31+
32+
h2 {
33+
font-size: 4rem;
34+
}
35+
}
2136
}
2237

2338
.posts {

0 commit comments

Comments
 (0)