--- regenerate: true --- {% capture cache %} {% comment %} # ----------------------------------------------------------------------------- # ~/assets/themes/j1/extentions/light_gallery/js/j1_adapter_lightgallery.js # Liquid JS Template to create the J1 Adapter for LightGallery # # Product/Info: # https://jekyll.one # # Copyright (C) 2019 Juergen Adams # # J1 Template is licensed under the MIT License. # For details, see https://jekyll.one # # ----------------------------------------------------------------------------- # {{ config | debug }} # ----------------------------------------------------------------------------- {% endcomment %} /* # ----------------------------------------------------------------------------- # ~/assets/themes/j1/extentions/light_gallery/js/j1_adapter_lightgallery.js # JS Adapter for LightGallery # # Product/Info: # https://jekyll.one # https://sachinchoolur.github.io/lightGallery # https://github.com/sachinchoolur/lightGallery # # Copyright (C) 2019 Juergen Adams # Copyright (C) 2016 Sachin Choolur # # J1 Template is licensed under the MIT License. # For details, see https://jekyll.one # LightGallery FREE for PERSONAL use is licensed under the GNU AGPLv3 # For details, see https://sachinchoolur.github.io/lightGallery # LightGallery COMMERCIAL for BUSINESS use is licensed under LG Commercial License # For details, see: https://site.uplabs.com/posts/lightgallery-plugin # # ----------------------------------------------------------------------------- # Adapter generated: {{site.time}} # ----------------------------------------------------------------------------- */ 'use strict'; {% comment %} Liquid procedures --------------------------------------------------------------- {% endcomment %} {% comment %} Variables --------------------------------------------------------------- {% endcomment %} {% assign environment = site.environment %} {% assign config = site.data.apps.j1_bootstrap_gallery %} {% comment %} Main --------------------------------------------------------------- {% endcomment %} j1.BsGallery = (function (j1, window) { var environment = '{{environment}}'; // Set environment var state = 'not_started'; var logger; var logText; return { // Initialize init: function ( options ) { logger = log4javascript.getLogger("j1.BSGallery.adapter"); this.settings = $.extend({}, options); {% if environment == 'development' %} logText = 'start gallery initialization'; logger.info(logText); state = 'started'; logger.info('state: ' + state); // Set|Log status {% endif %} this.lgInit(); return; }, // END init // --------------------------------------------------------------------- // Load AJAX data and initialize the gallery // --------------------------------------------------------------------- // ToDo: lgInit: function () { logger = log4javascript.getLogger("j1.LightGallery.lgInit"); {% for item in config.galleries %} {% if item.gallery.enabled %} {% comment %} Set (
|
'; {% elsif gallery_type == "video-html5" or gallery_type == "video-online" %} var play_button = '/assets/themes/j1/extensions/light_gallery/img/icons/play-button.png'; // Collect html5 video gallery data from data file (jsonPath) $.getJSON( '{{config.jsonPath}}', function (data) { {% if gallery_type == "video-html5" %} var hidden_video_div = ''; for ( var i in data["{{item.gallery.id}}"] ) { var video = data["{{item.gallery.id}}"][i].video_path + '/' + data["{{item.gallery.id}}"][i].video; var poster = data["{{item.gallery.id}}"][i].image_path + '/' + data["{{item.gallery.id}}"][i].poster; var caption = data["{{item.gallery.id}}"][i].captions_lightbox; var video_id = data["{{item.gallery.id}}"][i].video_id; var video_type = video.substr(video.lastIndexOf('.') + 1); hidden_video_div += '' + '\n'; } $('#{{ container_id }}').before( hidden_video_div ); {% endif %} //var content = '