create searchBox section

This commit is contained in:
HAM!DREZA
2024-06-10 13:18:04 +03:30
parent 5310ec4dbc
commit c8bfc3c177
22 changed files with 1124 additions and 596 deletions
+18 -1
View File
@@ -2,6 +2,23 @@
<NuxtLoadingIndicator color="#ffbe33" :duration="1" :throttle="0"/>
<NuxtLayout />
<NuxtPage />
<div @click="showSearchBox = false">
<NuxtPage />
</div>
<NuxtLayout name="footer"/>
</template>
<script setup>
const showSearchBox = useState("showSearchBox");
watch(showSearchBox, ()=>{
if (process.client) {
if (showSearchBox.value === true) {
document.body.classList.add('overflow-hidden')
}else{
document.body.classList.remove('overflow-hidden')
}
}
})
</script>