added date of latest feed post to main page
This commit is contained in:
@@ -6,14 +6,29 @@
|
|||||||
import { posts as blogPosts } from "./blog/posts";
|
import { posts as blogPosts } from "./blog/posts";
|
||||||
import IndieButton from "$lib/components/indie-button.svelte";
|
import IndieButton from "$lib/components/indie-button.svelte";
|
||||||
import { buttons } from "$lib/components/indie-button";
|
import { buttons } from "$lib/components/indie-button";
|
||||||
import { onMount } from "svelte";
|
import { getContext, onMount, setContext } from "svelte";
|
||||||
|
import { getLatestFeedItem } from "./feed/feed";
|
||||||
|
|
||||||
let latestDevlogDate = devlogPosts[0].post.date;
|
let latestDevlogDate = devlogPosts[0].post.date;
|
||||||
let latestBlogDate = blogPosts[0].post.date;
|
let latestBlogDate = blogPosts[0].post.date;
|
||||||
|
let latestFeedDate = $state("a");
|
||||||
|
|
||||||
let latestStatusContent = $state("fetching status...");
|
let latestStatusContent = $state("fetching status...");
|
||||||
let latestStatusTimestamp = $state("?");
|
let latestStatusTimestamp = $state("?");
|
||||||
|
|
||||||
|
async function getLatestFeedDate() {
|
||||||
|
await getLatestFeedItem(
|
||||||
|
).then((response) => {
|
||||||
|
// remove time, only keep date. thanks again sweden
|
||||||
|
latestFeedDate = new Date(
|
||||||
|
response.metadata.posted
|
||||||
|
).toLocaleString("sv-SE").substring(
|
||||||
|
0,
|
||||||
|
response.metadata.posted.indexOf("T")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function getLatestStatus() {
|
async function getLatestStatus() {
|
||||||
await fetch(`https://back.natconf.dev/netstatus/latestStatus`, {
|
await fetch(`https://back.natconf.dev/netstatus/latestStatus`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
@@ -31,49 +46,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
getLatestFeedDate();
|
||||||
getLatestStatus();
|
getLatestStatus();
|
||||||
})
|
})
|
||||||
|
|
||||||
const galleryTopRow: GalleryRowEntry[] = [
|
|
||||||
{
|
|
||||||
title: "Homesick – devlog",
|
|
||||||
description: `my active Godot game project about finding yourself in an unfamiliar future. <i>latest update: ${latestDevlogDate}</i>`,
|
|
||||||
img: "projects/projectn5/banner2.webp",
|
|
||||||
altText: "The protagonist Laura standing on a floating platform in the purple test level. Ziplines are all around her and the text 'When this text is spinning, the game is not paused' is frozen in the sky.",
|
|
||||||
link: "projects/projectn5",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Projects",
|
|
||||||
description: "<b>[updated]</b> an overview of all my projects!",
|
|
||||||
img: "projects/banner.webp",
|
|
||||||
altText: "An upside-down New 3DS XL lying open on a desk with a small USB-C breakout board attached to it, and a USB-C cable plugged in. The 3DS is glowing to indicate that it is charging.",
|
|
||||||
link: "projects",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const galleryBottomRow: GalleryRowEntry[] = [
|
|
||||||
{
|
|
||||||
title: "Creative Feed",
|
|
||||||
description: `the small things I make find a home here.`,
|
|
||||||
img: "feed/banner.webp",
|
|
||||||
altText: "A blue screen with the text 'how do you do art ? 1. face your fears 2. become your heroes'. The 'art' looks to have been edited in. The music artist Porter Robinson is standing in the bottom right corner.",
|
|
||||||
link: "feed",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Blog",
|
|
||||||
description: `a place where I write about random things. <i>latest post: ${latestBlogDate}</i>`,
|
|
||||||
img: "blog/robert.webp",
|
|
||||||
altText: "View at a tram bridge rising and then curving to the left.",
|
|
||||||
link: "blog",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Files",
|
|
||||||
description: "find things I've put for download on my copyparty instance.",
|
|
||||||
img: "main/hypertext.webp",
|
|
||||||
altText: "Screenshot of Hypertext Unity level. Crates are strewn across the floor, Waluigi is flying in front of the camera, and text such as 'COME AND TRY OUR ALL-NEW BLENDER' and 'omg! it's the brandenbur ger tor!' is displayed.",
|
|
||||||
link: "https://files.natconf.dev/public/",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -98,6 +73,8 @@
|
|||||||
<p>I listen to <b>a lot</b> of music. My favourite artists are <a href="https://acloudyskye.bandcamp.com/">acloudyskye</a>, <a href="https://jaronsteele.bandcamp.com/">Jaron</a>, <a href="https://janeremover.bandcamp.com/">Jane Remover</a>, but you can <a href="/meta/music-rotation">find my current rotation here</a>. I also enjoy dabbling around in cool FOSS tools like <a href="https://godotengine.org/">Godot</a>, <a href="https://blender.org/">Blender</a>, and <a href="https://krita.org/">Krita</a> which I use under <a href="https://fedoraproject.org/">Fedora KDE</a>. If you want to know more about me and this website, <a href="/meta/about">go here</a>!</p>
|
<p>I listen to <b>a lot</b> of music. My favourite artists are <a href="https://acloudyskye.bandcamp.com/">acloudyskye</a>, <a href="https://jaronsteele.bandcamp.com/">Jaron</a>, <a href="https://janeremover.bandcamp.com/">Jane Remover</a>, but you can <a href="/meta/music-rotation">find my current rotation here</a>. I also enjoy dabbling around in cool FOSS tools like <a href="https://godotengine.org/">Godot</a>, <a href="https://blender.org/">Blender</a>, and <a href="https://krita.org/">Krita</a> which I use under <a href="https://fedoraproject.org/">Fedora KDE</a>. If you want to know more about me and this website, <a href="/meta/about">go here</a>!</p>
|
||||||
|
|
||||||
<p>irl I am from 🇩🇪 Northern Germany and studying to become a secondary school teacher, but between you and me; I may end up doing something else :).</p>
|
<p>irl I am from 🇩🇪 Northern Germany and studying to become a secondary school teacher, but between you and me; I may end up doing something else :).</p>
|
||||||
|
|
||||||
|
<p>{latestFeedDate}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -124,8 +101,48 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<GalleryRow entries={galleryTopRow} />
|
<GalleryRow entries={
|
||||||
<GalleryRow entries={galleryBottomRow} />
|
[
|
||||||
|
{
|
||||||
|
title: "Homesick – devlog",
|
||||||
|
description: `my active Godot game project about finding yourself in an unfamiliar future. <i>latest update: ${latestDevlogDate}</i>`,
|
||||||
|
img: "projects/projectn5/banner2.webp",
|
||||||
|
altText: "The protagonist Laura standing on a floating platform in the purple test level. Ziplines are all around her and the text 'When this text is spinning, the game is not paused' is frozen in the sky.",
|
||||||
|
link: "projects/projectn5",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Projects",
|
||||||
|
description: "<b>[updated]</b> an overview of all my projects!",
|
||||||
|
img: "projects/banner.webp",
|
||||||
|
altText: "An upside-down New 3DS XL lying open on a desk with a small USB-C breakout board attached to it, and a USB-C cable plugged in. The 3DS is glowing to indicate that it is charging.",
|
||||||
|
link: "projects",
|
||||||
|
},
|
||||||
|
]} />
|
||||||
|
|
||||||
|
<GalleryRow entries={
|
||||||
|
[
|
||||||
|
{
|
||||||
|
title: "Creative Feed",
|
||||||
|
description: `the small things I make find a home here. <i>latest post: ${latestFeedDate}</i>`,
|
||||||
|
img: "feed/banner.webp",
|
||||||
|
altText: "A blue screen with the text 'how do you do art ? 1. face your fears 2. become your heroes'. The 'art' looks to have been edited in. The music artist Porter Robinson is standing in the bottom right corner.",
|
||||||
|
link: "feed",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Blog",
|
||||||
|
description: `a place where I write about random things. <i>latest post: ${latestBlogDate}</i>`,
|
||||||
|
img: "blog/robert.webp",
|
||||||
|
altText: "View at a tram bridge rising and then curving to the left.",
|
||||||
|
link: "blog",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Files",
|
||||||
|
description: "find things I've put for download on my copyparty instance.",
|
||||||
|
img: "main/hypertext.webp",
|
||||||
|
altText: "Screenshot of Hypertext Unity level. Crates are strewn across the floor, Waluigi is flying in front of the camera, and text such as 'COME AND TRY OUR ALL-NEW BLENDER' and 'omg! it's the brandenbur ger tor!' is displayed.",
|
||||||
|
link: "https://files.natconf.dev/public/",
|
||||||
|
},
|
||||||
|
]} />
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|||||||
@@ -2,4 +2,8 @@ export let entries: string[] = [
|
|||||||
"electronics/nintendo-repairs",
|
"electronics/nintendo-repairs",
|
||||||
"electronics/trans-phone",
|
"electronics/trans-phone",
|
||||||
"drawings/lecturer-gender",
|
"drawings/lecturer-gender",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export function getLatestFeedItem(): Promise<any> {
|
||||||
|
return import(`./${entries[0]}.md`);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user