How to use blueimp-gallery - 5 common examples

To help you get started, we’ve selected a few blueimp-gallery examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngld / knossos / html / templates / kn-details-page.vue View on Github external
showVideos(videos) {
            let ytids = [];
            for(let link of this.mod.videos) {
                let id = /[\?&]v=([^&]+)/.exec(link);

                if(id) {
                    ytids.push({
                        type: 'text/html',
                        youtube: id[1],
                        poster: 'https://img.youtube.com/vi/' + id[1] + '/maxresdefault.jpg',
                        href: 'https://www.youtube.com/watch?v=' + id[1]
                    });
                }
            }

            this.lightbox = Gallery(ytids, {
                youTubeClickToPlay: false,
                youTubePlayerVars: {
                    fs: 0,
                    vq: 'hd720'
                },
                toggleControlsOnSlideClick: false,
                onslideend: (idx, el) => {
                    // Make sure the videos start automatically.
                    let link = el.querySelector('.video-content a');
                    if(link) link.click();
                }
            });
        },
github TerryZ / vue-plugins / src / components / v-gallery / Gallery.vue View on Github external
enableKeyboardNavigation : true,//是否打开键盘导航
                        toggleControlsOnReturn : false,//是否允许回车,显示/隐藏控制按钮
                        toggleControlsOnSlideClick : false,//是否允许鼠标点击图片,显示/隐藏控制按钮
                        startSlideshow : false,//是否自动开始播放图片轮播
                        onslide: function (index) {
                            that.showed(index);
                        },
                        onclosed: function () {
                            that.showed(-1);
                        }
                    },
                    main = custom ? that.$refs.links : that.$refs.innerLinks,
                    links = main.getElementsByTagName('a');
                //console.log(e);
                //console.log(link.tagName);
                gallery(links, options);
            },
            openCarousel(){
github RobinCK / vue-gallery / src / component / gallery.vue View on Github external
open(index = 0) {
        const instance = typeof blueimp.Gallery !== 'undefined' ? blueimp.Gallery : blueimp;

        const options = Object.assign({
          toggleControlsOnReturn: false,
          toggleControlsOnSlideClick: false,
          closeOnSlideClick: false,
          carousel: this.carousel,
          container: `#${this.id}`,
          index,
          onopen: () => this.$emit('onopen'),
          onopened: () => this.$emit('onopened'),
          onslide: this.onSlideCustom,
          onslideend: (index, slide) => this.$emit('onslideend', { index, slide }),
          onslidecomplete: (index, slide) => this.$emit('onslidecomplete', { index, slide }),
          onclose: () => this.$emit('close'),
          onclosed: () => this.$emit('onclosed'),
        }, this.options);
github TerryZ / vue-plugins / src / components / v-gallery / Gallery.vue View on Github external
this.$nextTick(()=> {
                    gallery(that.list, {
                        container: that.$refs.container,
                        carousel: true,
                        toggleControlsOnSlideClick : false,
                        onslide: function (index) {
                            that.showed(index);
                        }
                    });
                });
            },
github ngld / knossos / html / templates / kn-details-page.vue View on Github external
showScreens(screens) {
            this.lightbox = Gallery(this.mod.screenshots);
        },

blueimp-gallery

blueimp Gallery is a touch-enabled, responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionali

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis