41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import "./custom.css";
|
|
import "./style.css";
|
|
|
|
import DefaultTheme from "vitepress/theme";
|
|
// https://vitepress.dev/guide/custom-theme
|
|
import { h } from "vue";
|
|
|
|
import AudioButton from "./components/AudioButton.vue";
|
|
import Details from "./components/Details.vue";
|
|
import SentenceQuiz from "./components/SentenceQuiz.vue";
|
|
// import PDF from "./components/PDF.vue";
|
|
import TTS from "./components/TTS.vue";
|
|
import VocabQuiz from "./components/VocabQuiz.vue";
|
|
import YouTube from "./components/YouTube.vue";
|
|
|
|
import type { Theme } from "vitepress";
|
|
import { signIn } from "./supabase.ts";
|
|
export default {
|
|
extends: DefaultTheme,
|
|
Layout: () => {
|
|
return h(DefaultTheme.Layout, null, {
|
|
// https://vitepress.dev/guide/extending-default-theme#layout-slots
|
|
});
|
|
},
|
|
enhanceApp({ app, router, siteData }) {
|
|
// ...
|
|
app.component("AudioButton", AudioButton);
|
|
app.component("Details", Details);
|
|
app.component("SentenceQuiz", SentenceQuiz);
|
|
app.component("TTS", TTS);
|
|
app.component("VocabQuiz", VocabQuiz);
|
|
app.component("YouTube", YouTube);
|
|
// app.component("PDF", PDF);
|
|
},
|
|
} satisfies Theme;
|
|
|
|
//@ts-ignore
|
|
if (import.meta.env.SSR) {
|
|
signIn();
|
|
}
|