mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
1. 修復2.1.0 medium-zoom 無法使用的bug
This commit is contained in:
parent
eae694806c
commit
e77ab81941
@ -247,19 +247,17 @@ $(function () {
|
||||
* fancybox和 mediumZoom
|
||||
*/
|
||||
|
||||
var mediumZoom = GLOBAL_CONFIG.mediumZoom
|
||||
var fancybox = GLOBAL_CONFIG.fancybox
|
||||
if (fancybox) {
|
||||
var isMediumZoom = GLOBAL_CONFIG.medium_zoom
|
||||
var isFancybox = GLOBAL_CONFIG.fancybox
|
||||
if (isFancybox) {
|
||||
$().fancybox({
|
||||
selector: '[data-fancybox]',
|
||||
loop: true,
|
||||
transitionEffect: 'slide',
|
||||
protect: true,
|
||||
// wheel: false,
|
||||
buttons: ['slideShow', 'fullScreen', 'thumbs', 'close']
|
||||
})
|
||||
}
|
||||
if (mediumZoom) {
|
||||
} else if (isMediumZoom) {
|
||||
const zoom = mediumZoom(document.querySelectorAll('.mediumZoom'))
|
||||
zoom.on('open', event => {
|
||||
const photoBg = $(document.documentElement).attr('data-theme') === 'dark' ? '#121212' : '#fff'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user