forked from systeminit/si
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request systeminit#4258 from systeminit/adamhjk/lightbox-docs
docs: add zoom to images on the docs site
- Loading branch information
Showing
5 changed files
with
73 additions
and
1 deletion.
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
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,37 @@ | ||
<script setup lang="ts"> | ||
import DefaultTheme from "vitepress/theme"; | ||
import { onMounted } from "vue"; | ||
import { useRouter } from "vitepress"; | ||
import mediumZoom from "medium-zoom"; | ||
const { Layout } = DefaultTheme; | ||
const router = useRouter(); | ||
// Setup medium zoom with the desired options | ||
const setupMediumZoom = () => { | ||
mediumZoom("[data-zoomable]", { | ||
background: "transparent", | ||
}); | ||
}; | ||
// Apply medium zoom on load | ||
onMounted(setupMediumZoom); | ||
// Subscribe to route changes to re-apply medium zoom effect | ||
router.onAfterRouteChanged = setupMediumZoom; | ||
</script> | ||
|
||
<template> | ||
<Layout /> | ||
</template> | ||
|
||
<style> | ||
.medium-zoom-overlay { | ||
backdrop-filter: blur(5rem); | ||
} | ||
.medium-zoom-overlay, | ||
.medium-zoom-image--opened { | ||
z-index: 999; | ||
} | ||
</style> |
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,7 @@ | ||
import DefaultTheme from "vitepress/theme"; | ||
import Layout from "./Layout.vue"; | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
Layout, | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.