added web and split CLAUDs

This commit is contained in:
johba 2025-07-24 16:08:17 +02:00
parent 8ee33e4f5a
commit 8a82d10a7e
59 changed files with 15083 additions and 740 deletions

View file

@ -0,0 +1,30 @@
import { ref, onMounted, onUnmounted } from "vue";
// by convention, composable function names start with "use"
export function useMobile() {
const isMobile = ref<boolean>(false);
const handleWindowSizeChange = () => {
isMobile.value = isMobileFunc();
};
isMobile.value = isMobileFunc();
function isMobileFunc() {
if (screen.width <= 768) {
return true;
} else {
return false;
}
}
onMounted(async () => {
window.addEventListener("resize", handleWindowSizeChange);
handleWindowSizeChange();
});
onUnmounted(() => {
window.removeEventListener("resize", handleWindowSizeChange);
});
return isMobile;
}