Skip to content

Commit 84d0693

Browse files
committed
Dynamic social links
1 parent a7e2cbd commit 84d0693

File tree

1 file changed

+30
-23
lines changed

1 file changed

+30
-23
lines changed

src/components/shared/Footer.vue

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,17 @@
1111
</p>
1212
<ul class="flex gap-4 sm:gap-8">
1313
<a
14-
href="https://github.com/NangialaiStoman"
15-
target="__blank"
16-
class="text-gray-400 hover:text-indigo-500 dark:hover:text-indigo-400 cursor-pointer rounded-lg bg-gray-50 dark:bg-ternary-dark hover:bg-gray-100 shadow-sm∫ p-4"
17-
>
18-
<i data-feather="github" class="w-6 sm:w-8 h-6 sm:h-8"></i>
19-
</a>
20-
<a
21-
href="https://twitter.com/NangialaiStoman"
22-
target="__blank"
23-
class="text-gray-400 hover:text-indigo-500 dark:hover:text-indigo-400 cursor-pointer rounded-lg bg-gray-50 dark:bg-ternary-dark hover:bg-gray-100 shadow-sm∫ p-4"
24-
>
25-
<i data-feather="twitter" class="w-6 sm:w-8 h-6 sm:h-8"></i>
26-
</a>
27-
<a
28-
href="https://instagram.com/NangialaiStoman"
14+
v-for="social in socials"
15+
:key="social.id"
16+
:href="social.url"
2917
target="__blank"
3018
class="text-gray-400 hover:text-indigo-500 dark:hover:text-indigo-400 cursor-pointer rounded-lg bg-gray-50 dark:bg-ternary-dark hover:bg-gray-100 shadow-sm∫ p-4"
3119
>
3220
<i
33-
data-feather="instagram"
21+
:data-feather="social.icon"
3422
class="w-6 sm:w-8 h-6 sm:h-8"
3523
></i>
3624
</a>
37-
<a
38-
href="https://behance.net/NangialaiStoman"
39-
target="__blank"
40-
class="text-gray-400 hover:text-indigo-500 dark:hover:text-indigo-400 cursor-pointer rounded-lg bg-gray-50 dark:bg-ternary-dark hover:bg-gray-100 shadow-sm∫ p-4"
41-
>
42-
<i data-feather="feather" class="w-6 sm:w-8 h-6 sm:h-8"></i>
43-
</a>
4425
</ul>
4526
</div>
4627
<!-- Footer social links end -->
@@ -68,6 +49,32 @@ export default {
6849
data() {
6950
return {
7051
copyrightDate: new Date().getFullYear(),
52+
socials: [
53+
{
54+
id: 1,
55+
name: 'GitHub',
56+
icon: 'github',
57+
url: 'https://github.com/NangialaiStoman',
58+
},
59+
{
60+
id: 2,
61+
name: 'Twitter',
62+
icon: 'twitter',
63+
url: 'https://twitter.com/NangialaiStoman',
64+
},
65+
{
66+
id: 3,
67+
name: 'Instagram',
68+
icon: 'instagram',
69+
url: 'https://instagram.com/NangialaiStoman',
70+
},
71+
{
72+
id: 4,
73+
name: 'Behance',
74+
icon: 'feather',
75+
url: 'https://behance.net/NangialaiStoman',
76+
},
77+
],
7178
};
7279
},
7380
mounted() {

0 commit comments

Comments
 (0)