mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
Replaced nuxt-visitors module with a custom WebSocket implementation for location tracking. Removed redundant code and comments in `useVisitors` composable and introduced the `location.server` plugin to manage user location. Updated dependencies and configurations to reflect these changes, streamlining the approach.
27 lines
625 B
Vue
27 lines
625 B
Vue
<script lang="ts" setup>
|
|
const { locale } = useI18n()
|
|
|
|
const { data: page } = await useAsyncData(`/home/${locale.value}`, () => {
|
|
return queryCollection('main').path(`/home/${locale.value}`).first()
|
|
}, {
|
|
watch: [locale],
|
|
})
|
|
|
|
const { myLocation, locations } = useVisitors()
|
|
</script>
|
|
|
|
<template>
|
|
<main class="!max-w-none prose dark:prose-invert">
|
|
<ContentRenderer v-if="page" :value="page" />
|
|
<HomeStats />
|
|
<HomeActivity />
|
|
<HomeQuote />
|
|
<HomeCatchPhrase />
|
|
<HomeGlobe
|
|
:my-location
|
|
:locations
|
|
class="mt-8 mx-auto aspect-[1/1] duration-500 md:w-1/2"
|
|
/>
|
|
</main>
|
|
</template>
|