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 {
|
return {
|
||||||
...info,
|
...info,
|
||||||
fetched: {
|
fetched: {
|
||||||
discord: await discord(info.discord),
|
discord: await discord(info.discord).catch((err) => ({
|
||||||
github: await github(7, info.github),
|
username: '',
|
||||||
blog: await blog(info.blog.api, info.blog.base),
|
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;
|
}) 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>
|
<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>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer class=" mt-8">
|
||||||
<p class="text-center mt-8">
|
<nav class="flex justify-center items-center gap-2 text-base">
|
||||||
© {new Date().getFullYear()} {data.legal}. All rights reserved.
|
|
||||||
</p>
|
|
||||||
<nav class="flex justify-center items-center gap-2">
|
|
||||||
<a class="no-underline" href={'https://nixwebr.ing/prev/'+data.nixwebring}><</a>
|
<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">nixwebr.ing</a>
|
||||||
<a class="no-underline" href="https://nixwebr.ing/rand">*</a>
|
<a class="no-underline" href="https://nixwebr.ing/rand">*</a>
|
||||||
<a class="no-underline" href={'https://nixwebr.ing/next/'+data.nixwebring}>></a>
|
<a class="no-underline" href={'https://nixwebr.ing/next/'+data.nixwebring}>></a>
|
||||||
</nav>
|
</nav>
|
||||||
|
<p class="text-center m-0">
|
||||||
|
© {new Date().getFullYear()} {data.legal}. All rights reserved.
|
||||||
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue