feat: intégrer les informations de contact et ajuster les priorités des liens sociaux

This commit is contained in:
2025-12-23 23:34:07 +01:00
parent 466baf1eb8
commit 9ee02a36a3
5 changed files with 26 additions and 30 deletions

View File

@@ -1,9 +1,12 @@
<script setup lang="ts">
import { socials } from '~~/types'
const { contact } = await useContent()
</script>
<template>
<footer class="my-16">
<footer
v-if="contact"
class="my-16"
>
<div class="flex justify-center mb-16">
<USeparator
class="md:w-2/3"
@@ -16,11 +19,11 @@ import { socials } from '~~/types'
<h1>Find me on:</h1>
<div class="flex gap-2 flex-wrap">
<HomeLink
v-for="social in [...socials].sort((a, b) => a.label.localeCompare(b.label))"
:key="social.label"
:href="social.to"
v-for="social in contact.body.filter(item => item.priority === 1)"
:key="social.name"
:href="social.value"
:icon="social.icon"
:label="social.label"
:label="social.name"
target="_blank"
/>
</div>

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { navs, socials } from '~~/types'
import { navs } from '~~/types'
const openContactDrawer = ref(false)
const router = useRouter()
@@ -8,14 +8,7 @@ defineShortcuts({
backspace: () => router.back()
})
const socialsList = [
{
label: 'Email',
icon: 'i-ph-envelope-duotone',
to: 'mailto:arthurdanjou@outlook.fr'
},
...socials
]
const { contact } = await useContent()
</script>
<template>
@@ -61,8 +54,14 @@ const socialsList = [
class="h-6"
/>
<UDropdownMenu
v-if="contact"
v-model:open="openContactDrawer"
:items="socialsList"
:items="contact.body.filter(item => item.priority === 1).map(item => ({
label: item.name,
icon: item.icon,
href: item.value,
target: '_blank'
}))"
:content="{
align: 'center',
side: 'bottom',