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