share social links

This commit is contained in:
Yisroel Baum 2026-06-14 22:12:49 +03:00
parent 7b8d09a312
commit 143fae9b93
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
3 changed files with 36 additions and 35 deletions

View file

@ -1,34 +1,29 @@
<script setup lang="ts">
import { RouterLink } from 'vue-router'
import { socialLinks, type SocialLinkLabel } from '@/content/socialLinks'
interface FooterLink {
label: string
to: string
}
interface SocialLink {
label: string
href: string
glyph: string
}
const signatureImage = {
src: '/assets/signature.png',
alt: "R' Yehoshua Gerzi",
}
const socialLinks: SocialLink[] = [
{
label: 'YouTube',
href: '#',
glyph: '▶',
},
{
label: 'Spotify',
href: '#',
glyph: '♫',
},
]
const socialGlyphs: Record<SocialLinkLabel, string> = {
YouTube: '▶',
Spotify: '♫',
}
const footerSocialLinks = socialLinks.map((socialLink) => {
return {
label: socialLink.label,
href: socialLink.href,
glyph: socialGlyphs[socialLink.label],
}
})
const footerLinkColumns: FooterLink[][] = [
[
@ -49,11 +44,13 @@ const footerLinkColumns: FooterLink[][] = [
<img v-bind="signatureImage" class="site-footer__signature" />
<div class="site-footer__social">
<a
v-for="socialLink in socialLinks"
v-for="socialLink in footerSocialLinks"
:key="socialLink.label"
:href="socialLink.href"
class="site-footer__social-link"
:aria-label="socialLink.label"
target="_blank"
rel="noopener"
>
{{ socialLink.glyph }}
</a>