mirror of
https://github.com/sendevia/website.git
synced 2026-03-05 23:32:45 +08:00
feat(theme): register global components and restructure imports
This commit is contained in:
@@ -1,14 +1,26 @@
|
||||
import type { Theme } from "vitepress";
|
||||
|
||||
import Layout from "./layouts/Default.vue";
|
||||
import Button from "./components/Button.vue";
|
||||
import Footer from "./components/Footer.vue";
|
||||
import Header from "./components/Header.vue";
|
||||
import Layout from "./layouts/Default.vue";
|
||||
import PageIndicator from "./components/PageIndicator.vue";
|
||||
import PrevNext from "./components/PrevNext.vue";
|
||||
import ScrollToTop from "./components/ScrollToTop.vue";
|
||||
import Sidebar from "./components/Sidebar.vue";
|
||||
|
||||
import "./styles/main.scss";
|
||||
|
||||
export default {
|
||||
Layout,
|
||||
enhanceApp({ app }) {
|
||||
app.component("Footer", Footer);
|
||||
app.component("Header", Header);
|
||||
app.component("MainLayout", Layout);
|
||||
app.component("MaterialButton", Button);
|
||||
app.component("PageIndicator", PageIndicator);
|
||||
app.component("PrevNext", PrevNext);
|
||||
app.component("ScrollToTop", ScrollToTop);
|
||||
app.component("Sidebar", Sidebar);
|
||||
},
|
||||
} satisfies Theme;
|
||||
|
||||
@@ -3,9 +3,6 @@ import AllPostsLayout from "./AllPosts.vue";
|
||||
import ArticleLayout from "./Article.vue";
|
||||
import NotFoundLayout from "./NotFound.vue";
|
||||
import SearchPostsLayout from "./SearchPosts.vue";
|
||||
import Footer from "../components/Footer.vue";
|
||||
import Sidebar from "../components/Sidebar.vue";
|
||||
import ScrollToTop from "../components/ScrollToTop.vue";
|
||||
import { argbFromHex } from "@material/material-color-utilities";
|
||||
import { generateColorPalette } from "../utils/colorPalette";
|
||||
import { onMounted, nextTick, computed, ref, watch } from "vue";
|
||||
|
||||
Reference in New Issue
Block a user