Add blog (3)

This commit is contained in:
2025-02-10 20:00:19 +09:00
parent 32ab632f0a
commit 53c0fdfff8
2 changed files with 17 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import { page } from "$app/state";
import { limitWidth } from "$lib/constants";
import { cn } from "$lib/utils";
import LuCopyleft from "lucide-svelte/icons/copyleft";
import LuChevronsRight from "lucide-svelte/icons/chevrons-right";
let { children } = $props();
</script>
@@ -16,6 +17,21 @@ let { children } = $props();
<a href="/">cannorin.net</a>
{/if}
</div>
<nav>
<ul class="flex gap-4">
<li>
<a href="/blog" class="flex gap-1 items-end leading-5">
<LuChevronsRight
class={cn("transition-transform",
page.url.pathname === "/blog" && "rotate-90",
page.url.pathname.startsWith("/blog/") && "-rotate-90",
)}
size=16 />
blog
</a>
</li>
</ul>
</nav>
</header>
{@render children()}

View File

@@ -14,7 +14,7 @@ export async function load() {
});
}
return {
posts,
posts: posts.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()),
seo: {
title: "blog - cannorin.net",
description: "cannorin's blog",