feat: Initial Nuxt app
Some checks failed
NuxtHub deployment / deploy (push) Failing after 21s
WordPress deployment / deploy (push) Successful in 8s

This commit is contained in:
2025-08-27 13:37:40 -04:00
parent 677d367226
commit 312a6f1b62
43 changed files with 40550 additions and 2 deletions

View File

@@ -0,0 +1,39 @@
<script setup lang="ts">
import type { SiteOptionsFragment } from "#graphql-operations";
defineProps<{ profiles: SiteOptionsFragment["profiles"] }>();
const socialIconMap = {
"facebook.com": "i-cib-facebook-f",
"twitter.com": "i-cib-twitter",
"x.com": "i-cib-twitter",
"instagram.com": "i-cib-instagram",
"youtube.com": "i-cib-youtube",
"linkedin.com": "i-cib-linkedin",
"tiktok.com": "i-cib-tiktok",
};
function getIconFromUrl(url: string): string {
try {
const domain = new URL(url).hostname.toLowerCase().replace(/^www\./, "");
return socialIconMap[domain as keyof typeof socialIconMap] || "i-lucide-globe";
}
catch {
return "i-lucide-globe";
}
}
</script>
<template>
<div class="flex gap-1">
<UButton
v-for="(profile, key) in profiles" :key="key"
:icon="getIconFromUrl(profile!.url)"
:to="profile!.url"
variant="link"
color="neutral"
external
target="_blank"
/>
</div>
</template>