Fix dependencies: Add flag-icons, tailwind directives, and postcss config

This commit is contained in:
MivoDev
2026-01-18 11:16:21 +07:00
commit 266a4b1296
10758 changed files with 1547435 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { useRoute } from 'vitepress';
import { ref, watch } from 'vue';
export function useNav() {
const isScreenOpen = ref(false);
function openScreen() {
isScreenOpen.value = true;
window.addEventListener('resize', closeScreenOnTabletWindow);
}
function closeScreen() {
isScreenOpen.value = false;
window.removeEventListener('resize', closeScreenOnTabletWindow);
}
function toggleScreen() {
isScreenOpen.value ? closeScreen() : openScreen();
}
/**
* Close screen when the user resizes the window wider than tablet size.
*/
function closeScreenOnTabletWindow() {
window.outerWidth >= 768 && closeScreen();
}
const route = useRoute();
watch(() => route.path, closeScreen);
return {
isScreenOpen,
openScreen,
closeScreen,
toggleScreen
};
}