Skip to content

Commit 90b11b7

Browse files
authored
fix mobile sizing (#50)
1 parent 67cc30d commit 90b11b7

7 files changed

Lines changed: 80 additions & 9 deletions

File tree

client/src/app.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ p {
5050
margin-top: 3rem;
5151
}
5252

53-
@media (max-width: 768px) {
53+
@media (width < 768px) {
5454
.app-content {
5555
grid-template-columns: 1fr;
5656
}
5757
}
5858

59-
@media (max-width: 768px) {
59+
@media (width < 768px) {
6060
.mobile-hidden {
6161
border: 0;
6262
clip: rect(0 0 0 0);

client/src/assets/bolt.svg

Lines changed: 3 additions & 0 deletions
Loading

client/src/components/page-layout/PageLayout.module.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,11 @@
5656

5757
margin-bottom: var(--bolt-space-8);
5858
}
59+
60+
.hero h1 {
61+
text-align: center;
62+
}
63+
64+
.hero p {
65+
text-align: center;
66+
}

client/src/components/section/Section.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
@media (width < 768px) {
3131
.section {
3232
grid-template-columns: 1fr;
33+
gap: var(--bolt-space-10);
3334
}
3435

3536
.preview {

client/src/components/top-nav/TopNav.module.css

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,74 @@
77
z-index: 100;
88
}
99

10+
@media (width < 768px) {
11+
.topNav {
12+
padding: var(--bolt-space-3) var(--bolt-space-4);
13+
}
14+
}
15+
16+
.navContainer {
17+
display: flex;
18+
align-items: center;
19+
}
20+
1021
.navLeft {
1122
display: flex;
1223
align-items: center;
13-
gap: 4rem;
24+
gap: 1.5rem;
25+
}
26+
27+
.navBrand {
28+
display: flex;
29+
align-items: center;
30+
flex-shrink: 0;
31+
}
32+
33+
.navBrandLink {
34+
display: flex;
35+
align-items: center;
36+
color: var(--bolt-content-primary);
37+
}
38+
39+
.navLogoFull {
40+
height: 24px;
41+
display: block;
42+
}
43+
44+
.navLogoIcon {
45+
height: 24px;
46+
width: 24px;
47+
display: none;
48+
}
49+
50+
@media (max-width: 640px) {
51+
.navLogoFull {
52+
display: none;
53+
}
54+
55+
.navLogoIcon {
56+
display: block;
57+
}
1458
}
1559

1660
.navLinks {
1761
margin-top: 0.5rem;
1862
display: flex;
19-
gap: var(--bolt-space-8);
63+
gap: var(--bolt-space-6);
64+
flex-wrap: wrap;
65+
}
66+
67+
@media (width < 480px) {
68+
.navLinks {
69+
gap: var(--bolt-space-4);
70+
}
2071
}
2172

2273
.navLink {
2374
color: var(--bolt-content-secondary);
2475
text-decoration: none;
76+
white-space: nowrap;
77+
font-size: clamp(0.8rem, 2.5vw, 1rem);
2578
}
2679

2780
.active {

client/src/components/top-nav/TopNav.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Link } from "@tanstack/react-router";
22

3+
import BoltIcon from "../../assets/bolt.svg";
34
import BoltLightningGames from "../../assets/lightning-games.svg";
45

56
import styles from "./TopNav.module.css";
@@ -14,7 +15,12 @@ export function TopNav() {
1415
<img
1516
src={BoltLightningGames}
1617
alt="Game Logo"
17-
className={styles.navLogo}
18+
className={styles.navLogoFull}
19+
/>
20+
<img
21+
src={BoltIcon}
22+
alt="Game Logo"
23+
className={styles.navLogoIcon}
1824
/>
1925
</Link>
2026
</div>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
.heading1 {
22
font-size: var(--bolt-font-heading-1-size);
3-
line-height: 0;
3+
line-height: 1.2;
44
font-weight: var(--bolt-font-heading-1-weight);
5+
margin-block: 0;
56
}
67
.heading1.large {
78
font-size: var(--bolt-font-heading-1-large-size);
8-
line-height: 0;
99
}
1010

1111
.heading1.xlarge {
1212
font-size: var(--bolt-font-heading-1-xlarge-size);
13-
line-height: 0;
1413
}
1514

1615
.heading2 {
1716
font-size: var(--bolt-font-heading-2-size);
18-
line-height: 0;
17+
line-height: 1.2;
1918
font-weight: var(--bolt-font-heading-2-weight);
19+
margin-block: 0;
2020
}

0 commit comments

Comments
 (0)