1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-28 08:37:57 +02:00
blog/src/components/Footer/Networks.astro
Matthias Kretschmann 3b25ae2282
Location fetching (#843)
* location component

* fetching with @nanostores/query

* layouts reorg

* typescript plugins cleanup

* location component unit test cases

* fetch only when visible
2023-10-04 14:45:54 +01:00

29 lines
622 B
Plaintext

---
import styles from './Networks.module.css'
import { Rss, Mastodon, Github, Jsonfeed } from '@images/components'
type Props = {
links: string[]
}
const { links } = Astro.props
---
<section class={styles.networks}>
{
links.map((link: string) => (
<a class={styles.link} href={link} title={link} rel="me">
{link.includes('mas.to') ? (
<Mastodon />
) : link.includes('github') ? (
<Github />
) : link.includes('feed.xml') ? (
<Rss />
) : link.includes('feed.json') ? (
<Jsonfeed />
) : null}
</a>
))
}
</section>