Skip to content

Commit 431a341

Browse files
claudeHeyItsGilbert
authored andcommitted
Fix mobile responsive issues across all landing page components
Comprehensive mobile optimization for screens from 320px to 768px: **HeroCodePreview:** - Reduced terminal title margin from 4rem to 2rem to prevent layout issues - Added horizontal overflow handling for code blocks - Added 768px breakpoint: smaller fonts, reduced padding - Added 480px breakpoint: compact terminal header, smaller buttons (10px) **CodeShowcase:** - Added horizontal padding to section (4rem 1rem) - Enabled smooth scrolling for tabs on mobile (-webkit-overflow-scrolling) - Made tabs scrollable on mobile (nowrap at 768px) - Added 480px breakpoint: compact layout, equal-width tabs, smaller fonts - Added overflow-x handling for code blocks **FeatureGrid:** - Added horizontal padding to prevent edge-to-edge layout - Enhanced 768px breakpoint with better spacing - Added 480px breakpoint: reduced padding, smaller fonts, compact cards **QuickStartSteps:** - Added section padding for better mobile layout - Enhanced 768px breakpoint: smaller copy button, better spacing - Improved 480px breakpoint: more compact design, smaller fonts/spacing **GitHubStats:** - Added 480px breakpoint for ultra-small screens - Reduced stat sizes and gaps for better mobile display **Landing Page (index.tsx):** - Improved badge wrapping with flex alignment - Added max-width to badge images to prevent overflow - Enhanced 480px breakpoint: reduced padding/gaps throughout - Smaller badge images (18px) on tiny screens All components now render properly on mobile devices without: - Horizontal overflow - Text too large for viewport - Buttons/tabs too small to tap - Excessive padding wasting screen space
1 parent 9cd67e9 commit 431a341

File tree

6 files changed

+280
-12
lines changed

6 files changed

+280
-12
lines changed

src/components/CodeShowcase/styles.module.css

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.showcaseSection {
2-
padding: 4rem 0;
2+
padding: 4rem 1rem;
33
background: var(--ifm-background-surface-color);
44
}
55

@@ -36,6 +36,7 @@
3636
border-bottom: 2px solid var(--ifm-color-emphasis-200);
3737
overflow-x: auto;
3838
flex-wrap: wrap;
39+
-webkit-overflow-scrolling: touch;
3940
}
4041

4142
.tab {
@@ -123,6 +124,7 @@
123124
.outputBlock pre {
124125
margin: 0 !important;
125126
border-radius: 0 !important;
127+
overflow-x: auto !important;
126128
}
127129

128130
@keyframes fadeIn {
@@ -137,20 +139,82 @@
137139
}
138140

139141
@media screen and (max-width: 768px) {
142+
.showcaseSection {
143+
padding: 3rem 1rem;
144+
}
145+
140146
.showcaseHeader h2 {
141147
font-size: 2rem;
142148
}
143149

144150
.showcaseSubtitle {
145151
font-size: 1rem;
152+
padding: 0 1rem;
146153
}
147154

148155
.tabs {
149156
gap: 0.25rem;
157+
flex-wrap: nowrap;
150158
}
151159

152160
.tab {
153161
padding: 0.75rem 1rem;
154162
font-size: 0.875rem;
163+
min-width: fit-content;
164+
}
165+
166+
.exampleDescription {
167+
font-size: 1rem;
168+
padding: 0 1rem;
169+
}
170+
}
171+
172+
@media screen and (max-width: 480px) {
173+
.showcaseSection {
174+
padding: 2rem 0.75rem;
175+
}
176+
177+
.showcaseHeader {
178+
margin-bottom: 2rem;
179+
}
180+
181+
.showcaseHeader h2 {
182+
font-size: 1.75rem;
183+
}
184+
185+
.showcaseSubtitle {
186+
font-size: 0.95rem;
187+
}
188+
189+
.tabs {
190+
gap: 0;
191+
margin-bottom: 1.5rem;
192+
}
193+
194+
.tab {
195+
padding: 0.625rem 0.75rem;
196+
font-size: 0.8rem;
197+
flex: 1;
198+
min-width: auto;
199+
text-align: center;
200+
}
201+
202+
.exampleDescription {
203+
font-size: 0.95rem;
204+
margin-bottom: 1rem;
205+
}
206+
207+
.codeOutputGrid {
208+
gap: 1rem;
209+
}
210+
211+
.codeBlockHeader {
212+
font-size: 0.75rem;
213+
padding: 0.5rem 0.75rem;
214+
}
215+
216+
.codeBlock pre,
217+
.outputBlock pre {
218+
font-size: 0.8rem !important;
155219
}
156220
}

src/components/FeatureGrid/styles.module.css

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.featureSection {
2-
padding: 4rem 0;
2+
padding: 4rem 1rem;
33
background: var(--ifm-background-color);
44
}
55

@@ -111,6 +111,10 @@
111111
}
112112

113113
@media screen and (max-width: 768px) {
114+
.featureSection {
115+
padding: 3rem 1rem;
116+
}
117+
114118
.grid {
115119
grid-template-columns: 1fr;
116120
gap: 1.5rem;
@@ -122,6 +126,7 @@
122126

123127
.subtitle {
124128
font-size: 1rem;
129+
padding: 0 1rem;
125130
}
126131

127132
.featureCard {
@@ -136,3 +141,49 @@
136141
font-size: 1.25rem;
137142
}
138143
}
144+
145+
@media screen and (max-width: 480px) {
146+
.featureSection {
147+
padding: 2rem 0.75rem;
148+
}
149+
150+
.header {
151+
margin-bottom: 2rem;
152+
}
153+
154+
.header h2 {
155+
font-size: 1.75rem;
156+
}
157+
158+
.subtitle {
159+
font-size: 0.95rem;
160+
}
161+
162+
.grid {
163+
gap: 1rem;
164+
}
165+
166+
.featureCard {
167+
padding: 1.25rem;
168+
}
169+
170+
.featureIcon {
171+
font-size: 2.25rem;
172+
margin-bottom: 0.75rem;
173+
}
174+
175+
.featureTitle {
176+
font-size: 1.125rem;
177+
margin-bottom: 0.5rem;
178+
}
179+
180+
.featureDescription {
181+
font-size: 0.9rem;
182+
margin-bottom: 0.75rem;
183+
}
184+
185+
.featureCode pre {
186+
font-size: 0.7rem !important;
187+
padding: 0.625rem !important;
188+
}
189+
}

src/components/GitHubStats/styles.module.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,22 @@
4444
font-size: 0.75rem;
4545
}
4646
}
47+
48+
@media screen and (max-width: 480px) {
49+
.statsContainer {
50+
gap: 0.75rem;
51+
margin: 1rem 0;
52+
}
53+
54+
.statItem {
55+
gap: 0.125rem;
56+
}
57+
58+
.statValue {
59+
font-size: 1.25rem;
60+
}
61+
62+
.statLabel {
63+
font-size: 0.65rem;
64+
}
65+
}

src/components/HeroCodePreview/styles.module.css

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
font-family: var(--ifm-font-family-monospace);
5959
flex: 1;
6060
text-align: center;
61-
margin-right: 4rem;
61+
margin-right: 2rem;
6262
}
6363

6464
.codeWrapper {
@@ -71,6 +71,7 @@
7171
margin: 0 !important;
7272
padding: 1.5rem !important;
7373
background: transparent !important;
74+
overflow-x: auto !important;
7475
}
7576

7677
@keyframes fadeInUp {
@@ -94,3 +95,44 @@
9495
max-height: 300px;
9596
}
9697
}
98+
99+
@media screen and (max-width: 768px) {
100+
.terminalTitle {
101+
font-size: 0.75rem;
102+
margin-right: 1rem;
103+
}
104+
105+
.codeWrapper {
106+
max-height: 250px;
107+
}
108+
109+
.codeWrapper pre {
110+
padding: 1rem !important;
111+
font-size: 0.875rem !important;
112+
}
113+
}
114+
115+
@media screen and (max-width: 480px) {
116+
.terminalHeader {
117+
padding: 0.5rem 0.75rem;
118+
}
119+
120+
.terminalTitle {
121+
font-size: 0.7rem;
122+
margin-right: 0.5rem;
123+
}
124+
125+
.terminalButton {
126+
width: 10px;
127+
height: 10px;
128+
}
129+
130+
.codeWrapper {
131+
max-height: 200px;
132+
}
133+
134+
.codeWrapper pre {
135+
padding: 0.75rem !important;
136+
font-size: 0.8rem !important;
137+
}
138+
}

src/components/QuickStartSteps/styles.module.css

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.quickStartSection {
2-
padding: 4rem 0;
2+
padding: 4rem 1rem;
33
background: linear-gradient(180deg, var(--ifm-background-color) 0%, var(--ifm-background-surface-color) 100%);
44
}
55

@@ -143,6 +143,23 @@
143143
}
144144

145145
@media screen and (max-width: 768px) {
146+
.quickStartSection {
147+
padding: 3rem 1rem;
148+
}
149+
150+
.header {
151+
margin-bottom: 2rem;
152+
}
153+
154+
.header h2 {
155+
font-size: 2rem;
156+
}
157+
158+
.subtitle {
159+
font-size: 1rem;
160+
padding: 0 1rem;
161+
}
162+
146163
.step {
147164
gap: 1rem;
148165
}
@@ -161,36 +178,75 @@
161178
font-size: 1.25rem;
162179
}
163180

164-
.header h2 {
165-
font-size: 2rem;
166-
}
167-
168-
.subtitle {
169-
font-size: 1rem;
170-
}
171-
172181
.stepConnector {
173182
left: 25px;
174183
}
184+
185+
.copyButton {
186+
font-size: 0.75rem;
187+
padding: 0.4rem 0.8rem;
188+
}
175189
}
176190

177191
@media screen and (max-width: 480px) {
192+
.quickStartSection {
193+
padding: 2rem 0.75rem;
194+
}
195+
196+
.header h2 {
197+
font-size: 1.75rem;
198+
}
199+
200+
.subtitle {
201+
font-size: 0.95rem;
202+
}
203+
178204
.step {
179205
flex-direction: column;
180206
gap: 1rem;
207+
margin-bottom: 1.5rem;
181208
}
182209

183210
.stepNumber {
211+
width: 45px;
212+
height: 45px;
213+
font-size: 1.375rem;
184214
align-self: flex-start;
185215
}
186216

217+
.stepContent {
218+
padding: 0.875rem;
219+
}
220+
221+
.stepTitle {
222+
font-size: 1.125rem;
223+
margin-bottom: 0.375rem;
224+
}
225+
226+
.stepDescription {
227+
font-size: 0.9rem;
228+
margin-bottom: 0.75rem;
229+
}
230+
187231
.stepConnector {
188232
display: none;
189233
}
190234

235+
.copyButton {
236+
font-size: 0.7rem;
237+
padding: 0.375rem 0.75rem;
238+
top: 0.375rem;
239+
right: 0.375rem;
240+
}
241+
242+
.codeContainer pre {
243+
font-size: 0.8rem !important;
244+
}
245+
191246
.ctaContainer {
192247
flex-direction: column;
193248
align-items: stretch;
249+
margin-top: 2rem;
194250
}
195251

196252
.ctaContainer a {

0 commit comments

Comments
 (0)