lock scroll when mobile nav is opened

This commit is contained in:
jc 2023-10-25 13:18:52 -04:00
commit 9e5a5927f1
No known key found for this signature in database

View file

@ -144,7 +144,7 @@
<div class="ml-auto block lg:hidden"> <div class="ml-auto block lg:hidden">
<button <button
aria-label="Open mobile navigation menu" aria-label="Open mobile navigation menu"
_="on click remove .translate-x-full from #mobileNav" _="on click remove .translate-x-full from #mobileNav then add .overflow-hidden to <body />"
> >
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -170,7 +170,7 @@
<div class="flex items-center justify-end"> <div class="flex items-center justify-end">
<button <button
aria-label="Close mobile navigation menu" aria-label="Close mobile navigation menu"
_="on click add .translate-x-full to mobileNav" _="on click add .translate-x-full to mobileNav then remove .overflow-hidden from <body />"
> >
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"