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
+5 -19
View File
@@ -26,7 +26,11 @@ definePageMeta({
>
<template #header-upper>
<div class="header-upper-inner">
<NuxtLink to="/writing" class="back-link" aria-label="Back to writing">
<NuxtLink
to="/writing"
class="back-link"
aria-label="Back to writing"
>
<span class="arrow">←</span>
<span>Back</span>
</NuxtLink>
@@ -44,24 +48,6 @@ definePageMeta({
padding: 0 2rem;
}
.back-link {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: small;
color: var(--text);
text-decoration: none;
transition: opacity 0.2s ease;
}
.back-link .arrow {
transition: transform 0.2s ease;
}
.back-link:hover .arrow {
transform: translateX(-4px);
}
.writing__content {
padding: 2rem;
}