Skip to content

Commit 183ff17

Browse files
✨ Enhance mobile menu layout and styling for better usability and accessibility
1 parent 347a56e commit 183ff17

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

resources/css/docsearch.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
}
3030

3131
.DocSearch-Button-Placeholder {
32-
@apply px-1 text-sm text-black/60 transition duration-300 xl:pr-5 dark:text-white/60;
32+
@apply pr-2 pl-1 text-sm text-black/60 transition duration-300 xl:pr-5 dark:text-white/60;
3333
}
3434

3535
.DocSearch-Button-Keys {

resources/views/components/navbar/mobile-menu.blade.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ class="-ml-2.5 h-5 w-0.5 -rotate-45 rounded-full bg-current transition duration-
7070
aria-label="Site menu"
7171
class="fixed top-20 right-3 bottom-3.5 left-3 w-auto origin-top -translate-y-2 scale-y-90 overflow-y-scroll overscroll-contain rounded-2xl bg-gray-200/50 opacity-0 ring-1 ring-gray-200/80 backdrop-blur-2xl transition transition-discrete duration-300 open:translate-y-0 open:scale-y-100 open:opacity-100 min-[500px]:right-3.5 min-[500px]:left-3.5 dark:bg-black/50 dark:text-white dark:ring-gray-700/70 starting:open:-translate-y-2 starting:open:scale-y-0 starting:open:opacity-0"
7272
>
73-
<div class="flex flex-col overflow-hidden px-6 pt-4 pb-6">
73+
<div class="@container flex flex-col overflow-hidden px-6 pt-4 pb-6">
7474
<nav
75-
class="grid grid-cols-2 text-xl"
75+
class="@md:grid-cols-3 grid grid-cols-2 text-xl"
7676
aria-label="Primary"
7777
>
7878
@php
@@ -230,12 +230,10 @@ class="size-4 shrink-0"
230230
</nav>
231231

232232
<div
233-
class="mt-6 mb-2 flex w-full items-center justify-between gap-2 pb-2"
233+
class="mt-6 mb-2 flex w-full flex-wrap items-center justify-between gap-2 pb-2"
234234
>
235235
{{-- Doc search --}}
236-
<div
237-
class="transition-all duration-200 ease-in-out will-change-transform"
238-
>
236+
<div class="contrast-150 dark:contrast-100">
239237
<div
240238
id="docsearch-mobile"
241239
x-on:click="
@@ -247,7 +245,7 @@ class="transition-all duration-200 ease-in-out will-change-transform"
247245
</div>
248246

249247
<div
250-
class="flex h-10 items-center gap-0.5 rounded-full bg-gray-100 p-1 text-sm ring-1 ring-black/5 dark:bg-black/20 dark:ring-white/10"
248+
class="flex h-10 items-center rounded-full bg-gray-100/90 p-1 text-sm ring-1 ring-black/5 dark:bg-black/20 dark:ring-white/10"
251249
role="radiogroup"
252250
aria-label="Theme preference"
253251
>
@@ -256,7 +254,7 @@ class="flex h-10 items-center gap-0.5 rounded-full bg-gray-100 p-1 text-sm ring-
256254
role="radio"
257255
:aria-checked="themePreference === 'light'"
258256
x-on:click="themePreference = 'light'; showMobileMenu = false"
259-
class="rounded-full px-3 py-1.5 transition duration-300 ease-in-out"
257+
class="rounded-full px-2.5 py-1.5 transition duration-300 ease-in-out"
260258
:class="{
261259
'bg-zinc-300/70': themePreference === 'light',
262260
}"
@@ -269,7 +267,7 @@ class="rounded-full px-3 py-1.5 transition duration-300 ease-in-out"
269267
role="radio"
270268
:aria-checked="themePreference === 'system'"
271269
x-on:click="themePreference = 'system'; showMobileMenu = false"
272-
class="rounded-full px-3 py-1.5 transition duration-300 ease-in-out"
270+
class="rounded-full px-2.5 py-1.5 transition duration-300 ease-in-out"
273271
:class="{
274272
'bg-zinc-300/50 dark:bg-gray-200/10': themePreference === 'system',
275273
}"
@@ -282,7 +280,7 @@ class="rounded-full px-3 py-1.5 transition duration-300 ease-in-out"
282280
role="radio"
283281
:aria-checked="themePreference === 'dark'"
284282
x-on:click="themePreference = 'dark'; showMobileMenu = false"
285-
class="rounded-full px-3 py-1.5 transition duration-300 ease-in-out"
283+
class="rounded-full px-2.5 py-1.5 transition duration-300 ease-in-out"
286284
:class="{
287285
'bg-gray-200/10': themePreference === 'dark',
288286
}"
@@ -302,7 +300,9 @@ class="h-0.5 w-full rounded-full bg-current opacity-5"
302300
class="mx-auto mt-4 flex"
303301
aria-label="Social media"
304302
>
305-
<div class="grid grid-cols-4 justify-items-center gap-4">
303+
<div
304+
class="flex flex-wrap justify-center-safe gap-4 contrast-120"
305+
>
306306
<x-social-networks-all />
307307
</div>
308308
</nav>

0 commit comments

Comments
 (0)