Skip to content

Commit 2492c16

Browse files
committed
improve responsiveness
1 parent 739ed5d commit 2492c16

5 files changed

Lines changed: 170 additions & 9 deletions

File tree

website/src/components/Header.astro

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ import { REPO_URL, DOCS_URL, SITE_URL } from '../constants';
156156
border-color: rgba(0, 165, 184, 0.5);
157157
}
158158

159-
@media (max-width: 640px) {
159+
@media (max-width: 768px) {
160160
.header-nav {
161-
gap: 12px;
161+
gap: 10px;
162162
}
163163

164164
.header-link span,
@@ -167,16 +167,37 @@ import { REPO_URL, DOCS_URL, SITE_URL } from '../constants';
167167
}
168168

169169
.header-link--submit {
170-
padding: 5px 8px;
170+
display: none;
171+
}
172+
173+
.header-link--cta {
174+
font-size: 0.8rem;
175+
padding: 5px 10px;
176+
}
177+
}
178+
179+
@media (max-width: 480px) {
180+
.header-inner {
181+
padding: 0 16px;
182+
}
183+
184+
.header-brand {
185+
gap: 8px;
186+
font-size: 0.95rem;
171187
}
172188

173-
.header-link--submit span {
189+
.header-nav {
190+
gap: 6px;
191+
}
192+
193+
/* Hide "How plugins work" entirely — no icon fallback */
194+
.header-link:not(.header-link--submit):not(.header-link--cta):not([href*="github"]) {
174195
display: none;
175196
}
176197

177198
.header-link--cta {
178-
padding: 5px 10px;
179-
font-size: 0.8rem;
199+
padding: 5px 8px;
200+
font-size: 0.75rem;
180201
}
181202
}
182203
</style>

website/src/components/Hero.astro

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ const { pluginCount } = Astro.props;
271271

272272
@media (max-width: 640px) {
273273
.hero {
274-
padding: 56px 0 36px;
274+
padding: 48px 0 32px;
275275
}
276276

277277
.hero-title {
@@ -280,10 +280,44 @@ const { pluginCount } = Astro.props;
280280

281281
.hero-subtitle {
282282
font-size: 0.95rem;
283+
margin-bottom: 28px;
284+
}
285+
286+
.hero-search-input {
287+
padding: 13px 18px 13px 46px;
288+
font-size: 0.95rem;
289+
}
290+
291+
.hero-search-icon {
292+
left: 16px;
293+
}
294+
295+
/* Kbd hint is useless on touch devices */
296+
.hero-search-kbd {
297+
display: none;
298+
}
299+
300+
.hero-badge {
301+
margin-bottom: 20px;
283302
}
284303

285304
.hero-contribute {
286305
font-size: 0.8rem;
287306
}
288307
}
308+
309+
@media (max-width: 380px) {
310+
.hero {
311+
padding: 40px 0 28px;
312+
}
313+
314+
.hero-title {
315+
font-size: 1.55rem;
316+
}
317+
318+
.hero-subtitle {
319+
font-size: 0.88rem;
320+
margin-bottom: 24px;
321+
}
322+
}
289323
</style>

website/src/components/PluginGrid.astro

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const categories = ['All', ...new Set(plugins.map(p => p.category))];
183183

184184
.plugin-grid {
185185
display: grid;
186-
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
186+
grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
187187
gap: 20px;
188188
}
189189

@@ -213,11 +213,40 @@ const categories = ['All', ...new Set(plugins.map(p => p.category))];
213213
@media (max-width: 720px) {
214214
.plugin-grid {
215215
grid-template-columns: 1fr;
216+
gap: 16px;
216217
}
217218

218219
.grid-controls {
219220
flex-direction: column;
220-
align-items: flex-start;
221+
align-items: stretch;
222+
gap: 12px;
223+
}
224+
225+
.filter-bar {
226+
overflow-x: auto;
227+
flex-wrap: nowrap;
228+
-webkit-overflow-scrolling: touch;
229+
scrollbar-width: none;
230+
padding-bottom: 4px;
231+
max-width: 100%;
232+
}
233+
234+
.filter-bar::-webkit-scrollbar {
235+
display: none;
236+
}
237+
238+
.filter-pill {
239+
flex-shrink: 0;
240+
}
241+
242+
.grid-count {
243+
font-size: 0.8rem;
244+
}
245+
}
246+
247+
@media (max-width: 480px) {
248+
.grid-section {
249+
padding: 0 0 56px;
221250
}
222251
}
223252
</style>

website/src/pages/plugins/[name].astro

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,5 +502,46 @@ const configSnippet = `{
502502
.detail-name {
503503
font-size: 1.4rem;
504504
}
505+
506+
.detail-description {
507+
font-size: 0.9rem;
508+
}
509+
510+
.detail-install {
511+
padding: 16px;
512+
}
513+
514+
.detail-info {
515+
padding: 16px;
516+
}
517+
518+
.detail-code {
519+
font-size: 0.75rem;
520+
padding: 12px;
521+
}
522+
523+
.detail-readme-content :global(pre) {
524+
padding: 12px;
525+
font-size: 0.78rem;
526+
}
527+
528+
.detail-readme-content :global(ul),
529+
.detail-readme-content :global(ol) {
530+
padding-left: 18px;
531+
}
532+
}
533+
534+
@media (max-width: 380px) {
535+
.detail-name {
536+
font-size: 1.25rem;
537+
}
538+
539+
.detail-icon {
540+
font-size: 2.5rem;
541+
}
542+
543+
.back-link {
544+
margin-bottom: 24px;
545+
}
505546
}
506547
</style>

website/src/styles/global.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ code {
124124
padding: 0 24px;
125125
}
126126

127+
@media (max-width: 380px) {
128+
.container {
129+
padding: 0 16px;
130+
}
131+
}
132+
127133
.sr-only {
128134
position: absolute;
129135
width: 1px;
@@ -180,6 +186,36 @@ code {
180186
50% { box-shadow: 0 0 16px rgba(0, 165, 184, 0.5); }
181187
}
182188

189+
/* --- Mobile touch & overflow safety --- */
190+
html {
191+
overflow-x: hidden;
192+
}
193+
194+
body {
195+
overscroll-behavior-x: none;
196+
-webkit-tap-highlight-color: transparent;
197+
}
198+
199+
/* Minimum touch target for interactive elements */
200+
@media (pointer: coarse) {
201+
button,
202+
a,
203+
input,
204+
select,
205+
textarea {
206+
min-height: 44px;
207+
min-width: 44px;
208+
}
209+
210+
/* Let inline links stay natural size */
211+
p a,
212+
li a,
213+
span a {
214+
min-height: unset;
215+
min-width: unset;
216+
}
217+
}
218+
183219
@media (prefers-reduced-motion: reduce) {
184220
*,
185221
*::before,

0 commit comments

Comments
 (0)