mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Merge pull request #2260 from servedsmart/use-pure-version-medium-zoom
🔒 Use pure version of medium-zoom to avoid inline style and simplify CSP usage
This commit is contained in:
1
assets/lib/zoom/style.css
Normal file
1
assets/lib/zoom/style.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}
|
||||||
2
assets/lib/zoom/zoom.min.js
vendored
2
assets/lib/zoom/zoom.min.js
vendored
File diff suppressed because one or more lines are too long
2
assets/lib/zoom/zoom.min.umd.js
Normal file
2
assets/lib/zoom/zoom.min.umd.js
Normal file
File diff suppressed because one or more lines are too long
@@ -50,6 +50,10 @@
|
|||||||
{{ if $cssCustom }}
|
{{ if $cssCustom }}
|
||||||
{{ $assets.Add "css" (slice $cssCustom) }}
|
{{ $assets.Add "css" (slice $cssCustom) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if not .Site.Params.disableImageZoom | default true }}
|
||||||
|
{{ $cssZoom := resources.Get "lib/zoom/style.css" }}
|
||||||
|
{{ $assets.Add "css" (slice $cssZoom) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ $images := slice }}
|
{{ $images := slice }}
|
||||||
{{ $backgroundAndFeaturedImages := slice }}
|
{{ $backgroundAndFeaturedImages := slice }}
|
||||||
@@ -143,7 +147,7 @@
|
|||||||
data-copied="{{ i18n "code.copied" }}"></script>
|
data-copied="{{ i18n "code.copied" }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if not .Site.Params.disableImageZoom | default true }}
|
{{ if not .Site.Params.disableImageZoom | default true }}
|
||||||
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.umd.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
|
||||||
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
|
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|||||||
@@ -113,8 +113,12 @@
|
|||||||
"to": "assets/lib/lite-youtube-embed/lite-yt-embed.css"
|
"to": "assets/lib/lite-youtube-embed/lite-yt-embed.css"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": "node_modules/medium-zoom/dist/medium-zoom.min.js",
|
"from": "node_modules/medium-zoom/dist/pure/medium-zoom.min.umd.js",
|
||||||
"to": "assets/lib/zoom/zoom.min.js"
|
"to": "assets/lib/zoom/zoom.min.umd.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "node_modules/medium-zoom/dist/style.css",
|
||||||
|
"to": "assets/lib/zoom/style.css"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Reference in New Issue
Block a user