import { defineComponent, computed, ref, type Ref } from "vue"; import useHead from "@/useHead.ts"; import DJTooltip, { setupTooltip } from "@/DJTooltip.tsx"; import DJEmail from "@/DJEmail.tsx"; export default defineComponent({ name: "app-root", setup() { useHead({ title: "DJ Ledda's Homepage" }); const tooltipCarrier = ref(null); setupTooltip({ carrier: tooltipCarrier }); const dude1Spinning = ref(false); const dude2Spinning = ref(false); function toggleDude(event: MouseEvent, dudeRef: Ref) { const dude = event.target as HTMLImageElement; if (dudeRef.value) { dude.addEventListener("animationiteration", function listener() { dudeRef.value = false; dude.removeEventListener("animationiteration", listener as EventListenerOrEventListenerObject); }); } else { dudeRef.value = true; } } const shaking = computed(() => dude1Spinning.value || dude2Spinning.value); return () => <>
; }, });