refactor: extract back-link component, update scroll behavior, and implement writing index page layout

This commit is contained in:
Jaron
2026-04-30 09:27:19 -05:00
parent b1cab54c3c
commit 0d492560d2
4 changed files with 54 additions and 23 deletions
+28 -1
View File
@@ -5,5 +5,32 @@ const { data: pages } = await useAsyncData('writing-pages', () =>
</script>
<template>
<NuxtLayout name="main"> </NuxtLayout>
<NuxtLayout
name="main"
title="Writing"
description="Some thoughts I've had over the years. Not all of them are good, but here we are."
>
<template #header-upper>
<div class="header-upper-inner">
<NuxtLink to="/" class="back-link" aria-label="Back to Home">
<span class="arrow">←</span>
<span>Home</span>
</NuxtLink>
</div>
</template>
<section>
<a v-for="page in pages" :href="page.path" :key="page.path">
{{ page.title }}
</a>
</section>
</NuxtLayout>
</template>
<style scoped>
.header-upper-inner {
display: flex;
align-items: center;
height: 100%;
padding: 0 2rem;
}
</style>