regenerate: true


{% capture cache %}

{% comment %}

# -----------------------------------------------------------------------------
#  ~/assets/themes/j1/core/js/adapter/stickybits.js
#  Liquid template to create the Template Adapter for Stickybits
#
#  Product/Info:
#  https://jekyll.one
#  http://dynamicdrive.com/dynamicindex3/scrolltop.htm
#
#  Copyright (C) 2019 Juergen Adams
#  Copyright (C) 2009 dynamicdrive.com
#
#  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/stickybits.js
#  JS Adapter for J1 Stickybits
#
#  Product/Info:
#  https://jekyll.one
#  https://github.com/dollarshaveclub/stickybits
#
#  Copyright (C) 2019 Juergen Adams
#  Copyright (C) 2016 Dollar Shave Club, Inc.
#
#  J1 Template is licensed under the MIT License.
#  For details, see https://jekyll.one
#
# -----------------------------------------------------------------------------
#  Adapter generated: {{site.time}}
# -----------------------------------------------------------------------------

*/ 'use strict';

{% comment %} Variables ——————————————————————————– {% endcomment %} {% assign environment = site.environment %} {% assign stickybits_config = site.data.modules.j1_stickybits.default %}

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

var environment = '{{environment}}'; // Set environment
var state       = 'not_started';
var logger;
var logText;
var stickybitsInstance;

return {

  // Initialize
  init: function () {
    // Setup logger
    logger = log4javascript.getLogger("j1.Stickybits.adapter");
    state = 'started';
    logger.info('state: ' + state);

    stickybitsInstance = stickybits('{{stickybits_config.selector}}', {
      useStickyClasses:       {{site.data.modules.j1_stickybits.default.useStickyClasses}},
      stickyBitStickyOffset:  "{{site.data.modules.j1_stickybits.default.offset}}px"
    });

    state = 'finished';
    logger.info('state: ' + state); // Set|Log status
    logger.info("J1 Stickybits successfully initialized");

    return true;
  }, // END init

  // -------------------------------------------------------------------------
  //  returns the current (processing) state of the module
  // -------------------------------------------------------------------------
  state: function () {
    return state;
  } // END init

}; // end return

})(j1, window);

{% endcapture %}

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