File tree Expand file tree Collapse file tree 2 files changed +34
-3
lines changed
Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ const router = useRouter ()
3+ const canGoBack = useCanGoBack ()
4+
5+ withDefaults (
6+ defineProps <{
7+ class? : string
8+ }>(),
9+ {
10+ class: ' ' ,
11+ },
12+ )
13+ </script >
14+
15+ <template >
16+ <button
17+ v-if =" canGoBack"
18+ type =" button"
19+ :class =" [
20+ 'inline-flex items-center gap-2 p-1.5 -mx-1.5 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0',
21+ $props.class,
22+ ]"
23+ @click =" router.back()"
24+ >
25+ <span class =" i-lucide:arrow-left rtl-flip w-4 h-4" aria-hidden =" true" />
26+ <span class =" sr-only sm:not-sr-only" >{{ $t('nav.back') }}</span >
27+ </button >
28+ </template >
Original file line number Diff line number Diff line change @@ -21,9 +21,12 @@ useSeoMeta({
2121 <main class =" container w-full flex-1 py-12 sm:py-16 overflow-x-hidden" >
2222 <article class =" max-w-2xl mx-auto" >
2323 <header class =" mb-12" >
24- <h1 class =" font-mono text-3xl sm:text-4xl font-medium" >
25- {{ $t('blog.heading') }}
26- </h1 >
24+ <div class =" flex items-baseline justify-between gap-4 mb-4" >
25+ <h1 class =" font-mono text-3xl sm:text-4xl font-medium" >
26+ {{ $t('blog.heading') }}
27+ </h1 >
28+ <BackButton />
29+ </div >
2730 <p class =" text-fg-muted text-lg" >
2831 {{ $t('tagline') }}
2932 </p >
You can’t perform that action at this time.
0 commit comments