docs: add zoom functionality on images (#2403)

* Add zoom functionality on images

* Fixes in zooming images

* yarn.lock issue fix
This commit is contained in:
Aniketh Varma authored and GitHub committed 2022-11-01 10:25:08 +02:00
1 parent 7fdced0225
commit 096425f7db
6 files changed
+35854 -2618

No files matched your search

Binary file not shown.
+9 -1
View File
@@ -32,7 +32,8 @@ const config = {
{ {
apiKey: process.env.SEGMENT_API_KEY || "temp" apiKey: process.env.SEGMENT_API_KEY || "temp"
} }
] ],
require.resolve("docusaurus-plugin-image-zoom")
], ],
themeConfig: { themeConfig: {
colorMode: { colorMode: {
@@ -54,6 +55,13 @@ const config = {
theme: require("prism-react-renderer/themes/vsDark"), theme: require("prism-react-renderer/themes/vsDark"),
darkTheme: require("prism-react-renderer/themes/vsDark"), darkTheme: require("prism-react-renderer/themes/vsDark"),
}, },
zoom: {
selector: '.markdown img',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
}
},
navbar: { navbar: {
hideOnScroll: true, hideOnScroll: true,
logo: { logo: {
+34802
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -23,6 +23,7 @@
"@svgr/webpack": "6.2.1", "@svgr/webpack": "6.2.1",
"algoliasearch-helper": "^3.8.2", "algoliasearch-helper": "^3.8.2",
"clsx": "^1.1.1", "clsx": "^1.1.1",
"docusaurus-plugin-image-zoom": "^0.1.1",
"docusaurus-plugin-segment": "^1.0.3", "docusaurus-plugin-segment": "^1.0.3",
"docusaurus2-dotenv": "^1.4.0", "docusaurus2-dotenv": "^1.4.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
+8
View File
@@ -196,6 +196,14 @@ article {
font-weight: 400; font-weight: 400;
} }
.medium-zoom-overlay {
z-index: var(--ifm-z-index-overlay);
}
.medium-zoom-image--opened {
z-index: var(--ifm-z-index-overlay);
}
/* Medusa logo */ /* Medusa logo */
.sidebar-bg img { .sidebar-bg img {
width: 100px; width: 100px;
+1034 -2617
View File
File diff suppressed because it is too large. Load diff