fix: add back home button on about page
This commit is contained in:
@@ -22,7 +22,8 @@ https://www.joshwcomeau.com/css/custom-css-reset/
|
|||||||
3. Allow percentage-based heights in the application
|
3. Allow percentage-based heights in the application
|
||||||
*/
|
*/
|
||||||
html,
|
html,
|
||||||
body, div#app {
|
body,
|
||||||
|
div#app {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -178,15 +179,9 @@ nav .nav-title {
|
|||||||
|
|
||||||
nav .nav-items {
|
nav .nav-items {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: .5em;
|
gap: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-published {
|
.article-published {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-home {
|
|
||||||
text-decoration: none;
|
|
||||||
float: right;
|
|
||||||
line-height: 2.4;
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "md-blog",
|
"name": "md-blog",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": "https://github.com/klemek/md-blog",
|
"repository": "https://github.com/klemek/md-blog",
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { BACK_LINK } from '@lib/config'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<template v-if="$route.fullPath != '/'">
|
||||||
|
<RouterLink class="link-back" to="/"><span v-html="BACK_LINK"></span></RouterLink>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
@@ -5,6 +5,7 @@ import PageFooter from '@components/PageFooter.vue'
|
|||||||
import { onBeforeMount, onMounted, onUpdated, ref } from 'vue'
|
import { onBeforeMount, onMounted, onUpdated, ref } from 'vue'
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import { updateDynamicContent } from '@/lib/articles'
|
import { updateDynamicContent } from '@/lib/articles'
|
||||||
|
import BackHomeButton from '@/components/BackHomeButton.vue'
|
||||||
|
|
||||||
const html = ref<string>('')
|
const html = ref<string>('')
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ onUpdated(updateDynamicContent)
|
|||||||
<main class="article">
|
<main class="article">
|
||||||
<NavBar />
|
<NavBar />
|
||||||
<div v-html="html"></div>
|
<div v-html="html"></div>
|
||||||
|
<BackHomeButton />
|
||||||
<PageFooter />
|
<PageFooter />
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -5,10 +5,11 @@ import { loadArticle, updateDynamicContent } from '@lib/articles'
|
|||||||
import { useRoute, onBeforeRouteUpdate, type RouteLocation } from 'vue-router'
|
import { useRoute, onBeforeRouteUpdate, type RouteLocation } from 'vue-router'
|
||||||
import NotFoundView from './NotFoundView.vue'
|
import NotFoundView from './NotFoundView.vue'
|
||||||
import { simpleDateFormat } from '@lib/dates'
|
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 PageFooter from '@components/PageFooter.vue'
|
||||||
import { stripHTML } from '@lib/strings'
|
import { stripHTML } from '@lib/strings'
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
|
import BackHomeButton from '@/components/BackHomeButton.vue'
|
||||||
|
|
||||||
const article = ref<Article | null>(null)
|
const article = ref<Article | null>(null)
|
||||||
const loading = ref<boolean>(true)
|
const loading = ref<boolean>(true)
|
||||||
@@ -40,7 +41,6 @@ onUpdated(updateDynamicContent)
|
|||||||
<main class="article">
|
<main class="article">
|
||||||
<NavBar />
|
<NavBar />
|
||||||
<div class="article-header">
|
<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>
|
<h1 class="article-title" v-html="article.metadata.title"></h1>
|
||||||
<div class="article-published">
|
<div class="article-published">
|
||||||
<span v-html="PUBLISHED_ON"></span> {{ simpleDateFormat(article.metadata.date) }}
|
<span v-html="PUBLISHED_ON"></span> {{ simpleDateFormat(article.metadata.date) }}
|
||||||
@@ -54,9 +54,7 @@ onUpdated(updateDynamicContent)
|
|||||||
</div>
|
</div>
|
||||||
<div class="article-text" v-html="article.html"></div>
|
<div class="article-text" v-html="article.html"></div>
|
||||||
<div class="article-signature" v-html="SIGNATURE"></div>
|
<div class="article-signature" v-html="SIGNATURE"></div>
|
||||||
<template v-if="$route.fullPath != '/'">
|
<BackHomeButton />
|
||||||
<RouterLink class="link-back" to="/"><span v-html="BACK_LINK"></span></RouterLink>
|
|
||||||
</template>
|
|
||||||
<PageFooter />
|
<PageFooter />
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user