fix: add back home button on about page
This commit is contained in:
@@ -5,6 +5,7 @@ import PageFooter from '@components/PageFooter.vue'
|
||||
import { onBeforeMount, onMounted, onUpdated, ref } from 'vue'
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import { updateDynamicContent } from '@/lib/articles'
|
||||
import BackHomeButton from '@/components/BackHomeButton.vue'
|
||||
|
||||
const html = ref<string>('')
|
||||
|
||||
@@ -23,6 +24,7 @@ onUpdated(updateDynamicContent)
|
||||
<main class="article">
|
||||
<NavBar />
|
||||
<div v-html="html"></div>
|
||||
<BackHomeButton />
|
||||
<PageFooter />
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -5,10 +5,11 @@ import { loadArticle, updateDynamicContent } from '@lib/articles'
|
||||
import { useRoute, onBeforeRouteUpdate, type RouteLocation } from 'vue-router'
|
||||
import NotFoundView from './NotFoundView.vue'
|
||||
import { simpleDateFormat } from '@lib/dates'
|
||||
import { BACK_LINK, PUBLISHED_ON, SIGNATURE, TITLE } from '@lib/config'
|
||||
import { PUBLISHED_ON, SIGNATURE, TITLE } from '@lib/config'
|
||||
import PageFooter from '@components/PageFooter.vue'
|
||||
import { stripHTML } from '@lib/strings'
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import BackHomeButton from '@/components/BackHomeButton.vue'
|
||||
|
||||
const article = ref<Article | null>(null)
|
||||
const loading = ref<boolean>(true)
|
||||
@@ -40,7 +41,6 @@ onUpdated(updateDynamicContent)
|
||||
<main class="article">
|
||||
<NavBar />
|
||||
<div class="article-header">
|
||||
<RouterLink class="link-home" to="/"><i icon="undo-2">↑</i></RouterLink>
|
||||
<h1 class="article-title" v-html="article.metadata.title"></h1>
|
||||
<div class="article-published">
|
||||
<span v-html="PUBLISHED_ON"></span> {{ simpleDateFormat(article.metadata.date) }}
|
||||
@@ -54,9 +54,7 @@ onUpdated(updateDynamicContent)
|
||||
</div>
|
||||
<div class="article-text" v-html="article.html"></div>
|
||||
<div class="article-signature" v-html="SIGNATURE"></div>
|
||||
<template v-if="$route.fullPath != '/'">
|
||||
<RouterLink class="link-back" to="/"><span v-html="BACK_LINK"></span></RouterLink>
|
||||
</template>
|
||||
<BackHomeButton />
|
||||
<PageFooter />
|
||||
</main>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user