fix(docs): image zoom plugin (#3946)

fix: image zoom plugin

Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com>
This commit is contained in:
mffap 2022-07-14 11:52:04 +02:00 committed by GitHub
parent 0ffdc97301
commit 36d0f9668b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

View File

@ -19,7 +19,15 @@ module.exports = {
},
],
themeConfig: {
zoomSelector: ".markdown :not(em) > img",
zoom: {
selector: '.markdown :not(em) > img',
background: {
light: 'rgb(243, 244, 246)',
dark: 'rgb(55, 59, 82)'
},
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
config: {}
},
announcementBar: {
id: 'documentation',
content:
@ -170,5 +178,5 @@ module.exports = {
},
],
],
plugins: [require.resolve("plugin-image-zoom")],
plugins: [require.resolve("docusaurus-plugin-image-zoom")],
};

View File

@ -82,6 +82,7 @@
"cssnano": "5.1.7",
"cssnano-preset-advanced": "5.3.3",
"dns-packet": "5.3.1",
"docusaurus-plugin-image-zoom": "^0.1.1",
"docusaurus-plugin-plausible": "^0.0.5",
"eastasianwidth": "0.2.0",
"enhanced-resolve": "5.9.3",

View File

@ -3855,6 +3855,13 @@ dns-packet@5.3.1, dns-packet@^5.2.2:
dependencies:
"@leichtgewicht/ip-codec" "^2.0.1"
docusaurus-plugin-image-zoom@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-image-zoom/-/docusaurus-plugin-image-zoom-0.1.1.tgz#f5e16ae568f7b74e8a357ee67ea7922521f64539"
integrity sha512-cJXo5TKh9OR1gE4B5iS5ovLWYYDFwatqRm00iXFPOaShZG99l5tgkDKgbQPAwSL9wg4I+wz3aMwkOtDhMIpKDQ==
dependencies:
medium-zoom "^1.0.6"
docusaurus-plugin-plausible@^0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-plausible/-/docusaurus-plugin-plausible-0.0.5.tgz#d113f7d82c09a3945e88227265b599ba1904bfb9"
@ -5573,7 +5580,7 @@ media-typer@0.3.0:
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
medium-zoom@^1.0.4:
medium-zoom@^1.0.4, medium-zoom@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/medium-zoom/-/medium-zoom-1.0.6.tgz#9247f21ca9313d8bbe9420aca153a410df08d027"
integrity sha512-UdiUWfvz9fZMg1pzf4dcuqA0W079o0mpqbTnOz5ip4VGYX96QjmbM+OgOU/0uOzAytxC0Ny4z+VcYQnhdifimg==