use masto display_name

This commit is contained in:
Ayo 2023-09-15 00:38:01 +02:00
parent afb7193f1a
commit dee8528b5b

View file

@ -5,10 +5,12 @@ import Footer from "../components/Footer.astro";
const response = await fetch('https://social.ayco.io/api/v1/accounts/109547735999980313') const response = await fetch('https://social.ayco.io/api/v1/accounts/109547735999980313')
let { let {
display_name,
avatar, avatar,
note note
} = await response.json(); } = await response.json();
const [first_name, last_name] = display_name.split(' ')
note = note.replace('<span class="">ayco.io/gh/', '<span class="">').replace('<span class="">ayco.io/sh/', '<span class="">') note = note.replace('<span class="">ayco.io/gh/', '<span class="">').replace('<span class="">ayco.io/sh/', '<span class="">')
--- ---
@ -24,7 +26,7 @@ note = note.replace('<span class="">ayco.io/gh/', '<span class="">').replace('<s
/> />
<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">{first_name}</span>{last_name}
</h1> </h1>
<div class="highlighted__note" set:html={note} /> <div class="highlighted__note" set:html={note} />
<a href="/now" class="now-wrapper"> <a href="/now" class="now-wrapper">