From 36d0f9668b4fcaa29130908ab1a1f2021bf62e52 Mon Sep 17 00:00:00 2001 From: mffap Date: Thu, 14 Jul 2022 11:52:04 +0200 Subject: [PATCH] fix(docs): image zoom plugin (#3946) fix: image zoom plugin Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> --- docs/docusaurus.config.js | 12 ++++++++++-- docs/package.json | 1 + docs/yarn.lock | 9 ++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index cd85593451..d05787361c 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -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")], }; diff --git a/docs/package.json b/docs/package.json index f5632fe653..8be38247f6 100644 --- a/docs/package.json +++ b/docs/package.json @@ -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", diff --git a/docs/yarn.lock b/docs/yarn.lock index 6fc2a6ed38..0aba367184 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -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==