regenerate: true


{% capture cache %}

{% comment %}

# -----------------------------------------------------------------------------
#  ~/assets/themes/j1/core/js/adapter/lightbox.js
#  Liquid JS Template to create the J1 Adapter for J1 Lightbox
#
#  Product/Info:
#  https://jekyll.one
#
#  Copyright (C) 2019 Juergen Adams
#
#  J1 Template is licensed under the MIT License.
#  For details, see https://jekyll.one
#
# -----------------------------------------------------------------------------
# Test data:
#  {{ liquid_var | debug }}
#
# -----------------------------------------------------------------------------

{% endcomment %}

/*

# -----------------------------------------------------------------------------
#  ~/assets/themes/j1/core/js/adapter/lightbox.js
#  JS Adapter for J1 Lightbox
#
#  Product/Info:
#  https://jekyll.one
#  https://github.com/lokesh/lightbox2/
#
#  Copyright (C) 2019 Juergen Adams
#  Copyright (C) 2007, 2018 Lokesh Dhakar
#
#  J1 Template is licensed under the MIT License.
#  For details, see https://jekyll.one
#  Lightbox 2 is licensed under the MIT License.
#  For details, see https://github.com/lokesh/lightbox2/
#
# -----------------------------------------------------------------------------
#  Adapter generated: {{site.time}}
# -----------------------------------------------------------------------------

*/ 'use strict';

{% comment %} Liquid procedures ————————————————————— {% endcomment %}

{% comment %} Variables ————————————————————— {% endcomment %} {% assign config = site.data.apps.j1_lightbox.defaults %}

{% comment %} Main ————————————————————— {% endcomment %} j1.Lightbox = (function (j1, window) {

return {
  // Initialize
  init: function () {

    // Setup logger
    var logger = log4javascript.getLogger('j1.Lightbox.adapter');

    lightbox.option({
      alwaysShowNavOnTouchDevices:  {{ config.alwaysShowNavOnTouchDevices | json }},
      albumLabel:                   {{ config.albumLabel | json }},
      disableScrolling:             {{ config.disableScrolling | json }},
      fadeDuration:                 {{ config.fadeDuration | json }},
      fitImagesInViewport:          {{ config.fitImagesInViewport | json }},
      imageFadeDuration:            {{ config.imageFadeDuration | json }},
      maxWidth:                     {{ config.maxWidth | json }},
      maxHeight:                    {{ config.maxHeight | json }},
      positionFromTop:              {{ config.positionFromTop | json }},
      resizeDuration:               {{ config.resizeDuration | json }},
      showImageNumberLabel:         {{ config.showImageNumberLabel | json }},
      wrapAround:                   {{ config.wrapAround | json }}
    });

    var log_text = 'Lightbox initialized successfully'
    logger.info(log_text);

    return true;
  } // END init lightbox

}; // END return

})(j1, window);

{% endcapture %}

{{ cache | strip_empty_lines }} {% assign cache = nil %}