-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script setup lang="ts"> | ||
import { onMounted, watch, nextTick } from 'vue' | ||
import { useRoute } from 'vitepress' | ||
import mediumZoom from 'medium-zoom' | ||
// https://bddxg.top/article/note/vitepress%E4%BC%98%E5%8C%96/%E7%82%B9%E5%87%BB%E5%9B%BE%E7%89%87%E6%94%BE%E5%A4%A7.html | ||
const route = useRoute() | ||
const initZoom = () => { | ||
mediumZoom('.doc-content-image', { background: 'var(--vp-c-bg-soft)' }) | ||
} | ||
onMounted(() => { | ||
initZoom() | ||
}) | ||
watch( | ||
() => route.path, | ||
() => nextTick(() => initZoom()) | ||
) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
import { h } from 'vue' | ||
import { h } from "vue" | ||
|
||
import DefaultTheme from 'vitepress/theme' | ||
import type { Theme } from 'vitepress' | ||
import DefaultTheme from "vitepress/theme" | ||
import type { Theme } from "vitepress" | ||
|
||
import Home from './components/Home.vue' | ||
import CreatorsHome from './components/CreatorsHome.vue' | ||
import RegisterSW from './components/RegisterSW.vue' | ||
import ToOfficialDocs from './components/ToOfficialDocs.vue' | ||
import Home from "./components/Home.vue" | ||
import CreatorsHome from "./components/CreatorsHome.vue" | ||
import RegisterSW from "./components/RegisterSW.vue" | ||
import ToOfficialDocs from "./components/ToOfficialDocs.vue" | ||
import ImagePreviewRegister from "./components/ImagePreviewRegister.vue" | ||
|
||
import './css/theme.css' | ||
import './css/components.css' | ||
import "./css/theme.css" | ||
import "./css/components.css" | ||
import "vue-draggable-resizable/style.css" | ||
|
||
const customTheme: Theme = { | ||
extends: DefaultTheme, | ||
enhanceApp({ app }) { | ||
app.component('Home', Home) | ||
app.component('CreatorsHome', CreatorsHome) | ||
}, | ||
Layout() { | ||
return h(DefaultTheme.Layout, null, { | ||
'layout-bottom': () => h(RegisterSW), | ||
'aside-outline-after': () => h(ToOfficialDocs) | ||
}) | ||
} | ||
extends: DefaultTheme, | ||
enhanceApp({ app }) { | ||
app.component("Home", Home) | ||
app.component("CreatorsHome", CreatorsHome) | ||
}, | ||
Layout() { | ||
return h(DefaultTheme.Layout, null, { | ||
"layout-bottom": () => h(RegisterSW), | ||
"aside-outline-after": () => h(ToOfficialDocs), | ||
"doc-bottom": () => h(ImagePreviewRegister), | ||
}) | ||
}, | ||
} | ||
|
||
export default customTheme; | ||
export default customTheme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"@mdit/plugin-align": "^0.8.0", | ||
"@mdit/plugin-figure": "^0.8.0", | ||
"@tsconfig/node18": "^18.2.4", | ||
"@types/imagemin-gifsicle": "^7.0.4", | ||
"@types/imagemin-svgo": "^10.0.5", | ||
|
@@ -30,9 +29,11 @@ | |
"markdown-it-abbr": "^2.0.0", | ||
"markdown-it-block-embed": "^0.0.3", | ||
"markdown-it-footnote": "^4.0.0", | ||
"markdown-it-image-figures": "^2.1.1", | ||
"markdown-it-mark": "^4.0.0", | ||
"markdown-it-sub": "^2.0.0", | ||
"markdown-it-sup": "^2.0.0", | ||
"medium-zoom": "^1.1.0", | ||
"sharp": "^0.33.3", | ||
"svgo": "^3.2.0", | ||
"vite-plugin-pwa": "^0.19.7", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters