Skip to content

Commit 5cc240d

Browse files
committed
fix: docs
1 parent e5107b4 commit 5cc240d

File tree

3 files changed

+36
-8
lines changed

3 files changed

+36
-8
lines changed

docs-v3/components/SearchInput.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<div class="relative w-full lg:max-w-md">
33
<button
44
@click="openSearchModal"
5-
class="flex items-center w-full px-3 py-2 text-left border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700/50 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-colors group"
5+
@touchstart="handleTouchStart"
6+
class="flex items-center w-full px-3 py-2 text-left border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700/50 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-colors group cursor-pointer"
7+
style="-webkit-tap-highlight-color: transparent;"
68
>
79
<svg class="h-5 w-5 text-gray-400 group-hover:text-gray-500 dark:group-hover:text-gray-300 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
810
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
@@ -37,4 +39,11 @@ const isMac = computed(() => {
3739
const openSearchModal = () => {
3840
openModal()
3941
}
42+
43+
// Handle touch start for iOS devices
44+
const handleTouchStart = (event: TouchEvent) => {
45+
// Prevent default behavior and ensure the click event fires
46+
event.preventDefault()
47+
openSearchModal()
48+
}
4049
</script>

docs-v3/components/TheSidebar.vue

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@
5151
v-if="isMobileMenuOpen"
5252
class="fixed inset-0 z-50 lg:hidden"
5353
@click="toggleMobileMenu"
54+
@touchmove.prevent
5455
>
5556
<div class="absolute inset-0 bg-gray-600 opacity-75"></div>
5657

57-
<nav class="relative max-w-xs w-full bg-white dark:bg-gray-900 h-full shadow-xl">
58-
<div class="flex items-center justify-between px-4 py-4 border-b border-gray-200 dark:border-gray-700">
58+
<nav
59+
class="relative max-w-xs w-full bg-white dark:bg-gray-900 h-full shadow-xl flex flex-col"
60+
@click.stop
61+
@touchmove.stop
62+
>
63+
<div class="flex items-center justify-between px-4 py-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0">
5964
<h2 class="text-lg font-semibold text-gray-900 dark:text-white">Navigation</h2>
6065
<button
6166
@click.stop="toggleMobileMenu"
@@ -67,7 +72,7 @@
6772
</button>
6873
</div>
6974

70-
<div class="px-4 py-6 overflow-y-auto">
75+
<div class="flex-1 overflow-y-auto px-4 py-6" style="-webkit-overflow-scrolling: touch;">
7176
<div class="space-y-6">
7277
<div
7378
v-for="section in navigationSections"
@@ -122,6 +127,23 @@ const { navigationSections } = useNavigation()
122127
const isMobileMenuOpen = inject('isMobileMenuOpen', ref(false))
123128
const toggleMobileMenu = inject('toggleMobileMenu', () => {})
124129
130+
// Handle body scroll locking for mobile menu
131+
watch(isMobileMenuOpen, (isOpen) => {
132+
if (process.client) {
133+
if (isOpen) {
134+
// Lock body scroll when mobile menu is open
135+
document.body.style.overflow = 'hidden'
136+
document.body.style.position = 'fixed'
137+
document.body.style.width = '100%'
138+
} else {
139+
// Restore body scroll when mobile menu is closed
140+
document.body.style.overflow = ''
141+
document.body.style.position = ''
142+
document.body.style.width = ''
143+
}
144+
}
145+
})
146+
125147
// Collapsible sections state
126148
const collapsedSections = ref<Set<string>>(new Set())
127149

docs-v3/content/index.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,4 @@ You can find a playground in the [Restify Demo GitHub repository](https://github
2929

3030
## Videos
3131

32-
You can find the [full course here](https://www.binarcode.com/learn/restify) with many useful features and insights on how Laravel Restify works.
33-
34-
<iframe src="https://player.vimeo.com/video/501764861" width="640" height="480">
35-
</iframe>
32+
You can find the [full course here](https://www.binarcode.com/learn/restify) with many useful features and insights on how Laravel Restify works. Note that the videos are from a previous version of Restify and may not reflect the latest features.

0 commit comments

Comments
 (0)