Add blog (3)
This commit is contained in:
@@ -3,6 +3,7 @@ import { page } from "$app/state";
|
|||||||
import { limitWidth } from "$lib/constants";
|
import { limitWidth } from "$lib/constants";
|
||||||
import { cn } from "$lib/utils";
|
import { cn } from "$lib/utils";
|
||||||
import LuCopyleft from "lucide-svelte/icons/copyleft";
|
import LuCopyleft from "lucide-svelte/icons/copyleft";
|
||||||
|
import LuChevronsRight from "lucide-svelte/icons/chevrons-right";
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
</script>
|
</script>
|
||||||
@@ -16,6 +17,21 @@ let { children } = $props();
|
|||||||
<a href="/">cannorin.net</a>
|
<a href="/">cannorin.net</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</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>
|
</header>
|
||||||
|
|
||||||
{@render children()}
|
{@render children()}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export async function load() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
posts,
|
posts: posts.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()),
|
||||||
seo: {
|
seo: {
|
||||||
title: "blog - cannorin.net",
|
title: "blog - cannorin.net",
|
||||||
description: "cannorin's blog",
|
description: "cannorin's blog",
|
||||||
|
|||||||
Reference in New Issue
Block a user