feat: slap public mastodon data

This commit is contained in:
Ayo 2023-09-02 21:38:27 +02:00
parent 50fc277205
commit fd20e55cd4

View file

@ -2,6 +2,14 @@
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro"; import Card from "../components/Card.astro";
import Footer from "../components/Footer.astro"; import Footer from "../components/Footer.astro";
const response = await fetch('https://social.ayco.io/api/v1/accounts/109547735999980313')
const {
avatar,
followers_count,
following_count,
note
} = await response.json();
--- ---
<Layout> <Layout>
@ -10,18 +18,17 @@ import Footer from "../components/Footer.astro";
<img <img
class="highlighted-section__content__profile-picture" class="highlighted-section__content__profile-picture"
alt="Ayo Ayco's picture" alt="Ayo Ayco's picture"
src="/ayo.png" src={avatar}
width="150" width="150"
/> />
<div class="highlighted-section__content__text"> <div class="highlighted-section__content__text">
<h1 title="Ayo Ayco | Software Engineer + Web Developer"> <h1 title="Ayo Ayco | Software Engineer + Web Developer">
<span class="heavy-text">Ayo</span>Ayco <span class="heavy-text">Ayo</span>Ayco
</h1> </h1>
<div class="highlighted__note" set:html={note} />
<ul role="list"> <ul role="list">
<li>🧸 Creator of <a href="https://cozy-reader.netlify.app/">Cozy</a></li> <li>{followers_count} Followers</li>
<li>🦌 Contributor to <a href="https://elk.zone">Elk</a></li> <li>{following_count} Following</li>
<li>👨🏻‍💻 Software Extraordinaire</li>
<li>🕵🏻‍♂️ Frontend Detective</li>
</ul> </ul>
<a href="/now" class="now-wrapper"> <a href="/now" class="now-wrapper">
<span class="now-label">Now</span> <span class="now-label">Now</span>
@ -193,3 +200,9 @@ import Footer from "../components/Footer.astro";
} }
} }
</style> </style>
<style is:inline>
.highlighted__note a {
color: white;
}
</style>