feat: initial icons for social links

This commit is contained in:
Ayo Ayco 2025-04-12 11:48:09 +02:00
parent ad982fcdae
commit db710d5d9a
2 changed files with 24 additions and 9 deletions

View file

@ -1,10 +1,11 @@
---
import Icon from 'astro-iconify'
import { footerLinks as links } from '../constants/links'
const year = new Date().getFullYear()
---
<footer>
<ul>
<ul id="internal-links">
<li>
<a href="/about">About me</a>
</li>
@ -28,7 +29,9 @@ const year = new Date().getFullYear()
{
links.map((linkObj) => (
<li>
<a href={linkObj.url}>{linkObj.text}</a>
<a href={linkObj.url}>
<Icon pack={linkObj.set ?? 'mdi'} name={linkObj.icon} />
</a>
</li>
))
}
@ -45,9 +48,6 @@ const year = new Date().getFullYear()
<style>
footer {
margin-top: 2em;
/* grid-template-columns: auto auto;
display: grid;
gap: 1rem; */
padding: 0;
ul {
@ -55,13 +55,20 @@ const year = new Date().getFullYear()
padding: 0;
li {
display: inline;
display: inline-block;
a svg {
width: 1.5rem;
margin-right: 1em;
}
}
}
#internal-links li {
&:not(:last-child)::after {
content: ' • ';
}
}
}
p,
ul {

View file

@ -35,37 +35,45 @@ export const links: Link[] = [
export default links
export const footerLinks = [
export const footerLinks: Link[] = [
{
text: 'SourceHut',
url: 'https://sr.ht/~ayoayco',
icon: 'sourcehut',
},
{
text: 'GitHub',
url: 'https://github.com/ayoayco',
icon: 'github',
},
{
text: 'LinkedIn',
url: 'https://www.linkedin.com/in/ayoayco',
icon: 'linkedin',
},
{
text: 'Pixelfed',
url: 'https://metapixl.com/@ayo',
icon: 'pixelfed',
},
{
text: 'SoundCloud',
url: 'https://SoundCloud.com/ayoayco',
icon: 'soundcloud',
},
{
text: 'NPM',
url: 'https://www.npmjs.com/~aayco',
icon: 'npm',
},
{
text: 'Instagram',
url: 'https://instagram.com/ayoayco',
icon: 'instagram',
},
{
text: 'Mastodon',
url: 'https://main.elk.zone/social.ayco.io/@ayo',
icon: 'mastodon',
},
]