error handling and minor changes
This commit is contained in:
parent
2a9b1216e6
commit
7d50a6da87
2 changed files with 23 additions and 8 deletions
|
|
@ -7,9 +7,24 @@ export const load = (async () => {
|
|||
return {
|
||||
...info,
|
||||
fetched: {
|
||||
discord: await discord(info.discord),
|
||||
github: await github(7, info.github),
|
||||
blog: await blog(info.blog.api, info.blog.base),
|
||||
discord: await discord(info.discord).catch((err) => ({
|
||||
username: '',
|
||||
status: '',
|
||||
activity: [],
|
||||
spotify: {
|
||||
song: '',
|
||||
art: '',
|
||||
link: '',
|
||||
artist: '',
|
||||
},
|
||||
})),
|
||||
github: await github(7, info.github).catch((err) => ([])),
|
||||
blog: await blog(info.blog.api, info.blog.base).catch((err) => ({
|
||||
title: 'Error',
|
||||
desc: err,
|
||||
url: info.blog.base,
|
||||
created: new Date(),
|
||||
})),
|
||||
},
|
||||
};
|
||||
}) satisfies LayoutLoad;
|
||||
|
|
@ -108,14 +108,14 @@
|
|||
<h3 class="italic my-0 font-normal text-xl">@<span class="underline">{data.fetched.discord.username}</span> is <span class="data-[status=idle]:text-yellow-200 data-[status=dnd]:text-red-200 data-[status=online]:text-green-200" data-status={data.fetched.discord.status}>{data.fetched.discord.status}</span> in discord</h3>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<p class="text-center mt-8">
|
||||
© {new Date().getFullYear()} {data.legal}. All rights reserved.
|
||||
</p>
|
||||
<nav class="flex justify-center items-center gap-2">
|
||||
<footer class=" mt-8">
|
||||
<nav class="flex justify-center items-center gap-2 text-base">
|
||||
<a class="no-underline" href={'https://nixwebr.ing/prev/'+data.nixwebring}><</a>
|
||||
<a class="no-underline" href="https://nixwebr.ing">nixwebr.ing</a>
|
||||
<a class="no-underline" href="https://nixwebr.ing/rand">*</a>
|
||||
<a class="no-underline" href={'https://nixwebr.ing/next/'+data.nixwebring}>></a>
|
||||
</nav>
|
||||
<p class="text-center m-0">
|
||||
© {new Date().getFullYear()} {data.legal}. All rights reserved.
|
||||
</p>
|
||||
</footer>
|
||||
Loading…
Add table
Add a link
Reference in a new issue