-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Zooming to enlarge images on click (#106)
* add lightbox code from old ui, tweak css a little * use the zooming lib instead, its better * use background body for backdrop
- Loading branch information
1 parent
7c6af8a
commit 07ccace
Showing
4 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
;(function () { | ||
'use strict' | ||
|
||
const Zooming = require('zooming') | ||
|
||
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches | ||
|
||
const zooming = new Zooming({ | ||
bgColor: 'var(--ds-background-body)', | ||
bgOpacity: 0.9, | ||
scaleBase: 0.8, | ||
transitionDuration: prefersReducedMotion ? 0.01 : 0.3, | ||
}) | ||
|
||
zooming.listen('.doc .imageblock img, .doc .image img') | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters