Skip to content

Commit

Permalink
feat: ✨ added zoom to pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
miggi92 committed Aug 22, 2024
1 parent 24ad157 commit d683c1a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import DefaultTheme from 'vitepress/theme';
import Mermaid from './Mermaid.vue';
import imageViewer from 'vitepress-plugin-image-viewer';
import vImageViewer from 'vitepress-plugin-image-viewer/lib/vImageViewer.vue';
import type { EnhanceAppContext } from 'vitepress';
import { useRoute } from 'vitepress';

export default {
...DefaultTheme,
enhanceApp({ app }: EnhanceAppContext) {
// register global components
app.component('Mermaid', Mermaid);
// Register global components, if you don't want to use it, you don't need to add it
app.component('vImageViewer', vImageViewer);
},
setup() {
// Get route
const route = useRoute();
// Using
imageViewer(route);
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"@abaplint/transpiler": "^2.10.5",
"@abaplint/transpiler-cli": "^2.10.5",
"vitepress": "^1.3.0"

},
"dependencies": {
"mermaid": "^10.9.1",
"vitepress-plugin-image-viewer": "^1.1.5",
"vitepress-plugin-mermaid": "^2.0.16"
}
}
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d683c1a

Please sign in to comment.