-
Notifications
You must be signed in to change notification settings - Fork 0
/
Layout.vue
35 lines (33 loc) · 1.04 KB
/
Layout.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<script setup lang="ts">
import { useData } from "vitepress";
import { Content } from "vitepress";
import NotFound from "./components/404View.vue";
import SiteFooter from "./components/Footer.vue";
import Navigation from "./components/Navigation.vue";
import BlogHead from "./components/BlogHead.vue";
import BlogFooter from "./components/BlogFooter.vue";
import SimpleLayout from "./components/SimpleLayout.vue";
import BlogList from "./components/BlogList.vue";
const { site, frontmatter, page } = useData();
</script>
<template>
<Navigation />
<main>
<div v-if="frontmatter.home">
<h1>{{ site.title }}</h1>
</div>
<div v-if="frontmatter.layout == 'blog'">
<BlogHead />
</div>
<NotFound v-if="page.isNotFound" />
<div v-else :class="frontmatter.pageClass">
<Content />
</div>
<BlogList v-if="frontmatter.layout == 'blog-list'" />
<SimpleLayout v-if="frontmatter.layout == 'simple'" />
<div v-if="frontmatter.layout == 'blog'">
<BlogFooter />
</div>
</main>
<SiteFooter />
</template>