|
1 | 1 | <script setup lang="ts">
|
2 | 2 | import { DISCORD_URL, GITHUB_URL, INSTAGRAM_URL, LINKEDIN_URL, TWITTER_URL, WHATSAPP_URL } from '@/constants'
|
| 3 | +
|
| 4 | +const socialMediaPlatforms: Record<string, string> = { |
| 5 | + discord: DISCORD_URL, |
| 6 | + github: GITHUB_URL, |
| 7 | + whatsapp: WHATSAPP_URL, |
| 8 | + twitter: TWITTER_URL, |
| 9 | + instagram: INSTAGRAM_URL, |
| 10 | + linkedin: LINKEDIN_URL, |
| 11 | +} |
3 | 12 | </script>
|
4 | 13 |
|
5 | 14 | <template>
|
6 |
| - <nav |
7 |
| - class="fixed bottom-[50px] gap-4 flex-col pl-4 justify-end w-10 hidden xl:flex z-30" |
8 |
| - > |
9 |
| - <a |
10 |
| - target="_blank" |
11 |
| - :href="DISCORD_URL" |
12 |
| - rel="noopener noreferrer nofollow" |
13 |
| - class="text-verse-500 dark:text-verse-200 text-sm md:text-normal hover:animate-bounce hover:ease-in-out hover:delay-200" |
14 |
| - > |
15 |
| - <IconDiscord class="w-6" /> |
16 |
| - </a> |
17 |
| - |
18 |
| - <a |
19 |
| - target="_blank" |
20 |
| - :href="GITHUB_URL" |
21 |
| - rel="noopener noreferrer nofollow" |
22 |
| - class="text-verse-500 dark:text-verse-200 text-sm md:text-normal hover:animate-bounce hover:ease-in-out hover:delay-200" |
23 |
| - > |
24 |
| - <IconGithub class="w-6" /> |
25 |
| - </a> |
26 |
| - |
27 |
| - <a |
28 |
| - target="_blank" |
29 |
| - :href="WHATSAPP_URL" |
30 |
| - rel="noopener noreferrer nofollow" |
31 |
| - class="text-verse-500 dark:text-verse-200 text-sm md:text-normal hover:animate-bounce hover:ease-in-out hover:delay-200" |
32 |
| - > |
33 |
| - <IconWhatsappCommunity class="w-6" /> |
34 |
| - </a> |
35 |
| - |
36 |
| - <a |
37 |
| - target="_blank" |
38 |
| - :href="TWITTER_URL" |
39 |
| - rel="noopener noreferrer nofollow" |
40 |
| - class="text-verse-500 dark:text-verse-200 text-sm md:text-normal hover:animate-bounce hover:ease-in-out hover:delay-200" |
41 |
| - > |
42 |
| - <IconSocialTwitter class="w-6" /> |
43 |
| - </a> |
44 |
| - |
45 |
| - <a |
46 |
| - target="_blank" |
47 |
| - :href="INSTAGRAM_URL" |
48 |
| - rel="noopener noreferrer nofollow" |
49 |
| - class="text-verse-500 dark:text-verse-200 text-sm md:text-normal hover:animate-bounce hover:ease-in-out hover:delay-200" |
50 |
| - > |
51 |
| - <IconInstagram class="w-6" /> |
52 |
| - </a> |
53 |
| - |
| 15 | + <nav class="fixed bottom-[50px] gap-4 flex-col pl-4 justify-end w-10 hidden xl:flex z-30"> |
54 | 16 | <a
|
| 17 | + v-for="(url, platform) in socialMediaPlatforms" |
| 18 | + :key="platform" |
| 19 | + :href="url" |
| 20 | + :aria-label="platform" |
55 | 21 | target="_blank"
|
56 |
| - :href="LINKEDIN_URL" |
57 | 22 | rel="noopener noreferrer nofollow"
|
58 | 23 | class="text-verse-500 dark:text-verse-200 text-sm md:text-normal hover:animate-bounce hover:ease-in-out hover:delay-200"
|
59 | 24 | >
|
60 |
| - <IconLinkedin class="w-6" /> |
| 25 | + <IconDiscord v-if="platform === 'discord'" class="w-6" /> |
| 26 | + <IconGithub v-if="platform === 'github'" class="w-6" /> |
| 27 | + <IconWhatsappCommunity v-if="platform === 'whatsapp'" class="w-6" /> |
| 28 | + <IconSocialTwitter v-if="platform === 'twitter'" class="w-6" /> |
| 29 | + <IconInstagram v-if="platform === 'instagram'" class="w-6" /> |
| 30 | + <IconLinkedin v-if="platform === 'linkedin'" class="w-6" /> |
61 | 31 | </a>
|
62 | 32 | </nav>
|
63 | 33 | </template>
|
0 commit comments