feat: updated on and better vue layout
This commit is contained in:
+6
-10
@@ -1,19 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import { ABOUT_LINK, TITLE } from '@lib/config'
|
||||
import { stripHTML } from '@lib/strings'
|
||||
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'
|
||||
import { updateDynamicContent } from '@lib/articles'
|
||||
import BackHomeButton from '@components/BackHomeButton.vue'
|
||||
|
||||
const loading = ref<boolean>(true)
|
||||
const html = ref<string>('')
|
||||
|
||||
onBeforeMount(async () => {
|
||||
window.document.title = stripHTML(TITLE) + ' — ' + stripHTML(ABOUT_LINK)
|
||||
|
||||
html.value = (await import('@articles/about.md')).html
|
||||
|
||||
loading.value = false
|
||||
await updateDynamicContent()
|
||||
})
|
||||
onMounted(updateDynamicContent)
|
||||
@@ -21,10 +19,8 @@ onUpdated(updateDynamicContent)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="article">
|
||||
<NavBar />
|
||||
<div v-if="!loading" class="article">
|
||||
<div v-html="html"></div>
|
||||
<BackHomeButton />
|
||||
<PageFooter />
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user