feat(backstage.io): Allow to zoom images like Medium

This commit is contained in:
Himanshu Mishra
2020-11-29 13:35:38 +01:00
parent 74175b988e
commit 4122b3031f
6 changed files with 29 additions and 3 deletions
+5
View File
@@ -1094,3 +1094,8 @@ code {
margin: 0 1.5em;
}
}
/* Zoomed images using the medium-zoom library should be on top of screen. */
.medium-zoom-image {
z-index: 10000;
}
+11
View File
@@ -0,0 +1,11 @@
// Ref: https://github.com/francoischalifour/medium-zoom#options
window.addEventListener(
'load',
() => {
mediumZoom('[data-zoomable]', {
margin: 20,
background: '#000',
});
},
false,
);