/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 8476: /***/ ((module) => { "use strict"; /* # ----------------------------------------------------------------------------- # ~/js/adapter/adapter.js # Provides an empty object for later loaded adapter objects # # Product/Info: # https://jekyll.one # # Copyright (C) 2023, 2024 Juergen Adams # # J1 Theme is licensed under MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # ----------------------------------------------------------------------------- */ // ----------------------------------------------------------------------------- // ESLint shimming // ----------------------------------------------------------------------------- /* eslint indent: "off" */ /* eslint no-unused-vars: "off" */ /* eslint no-undef: "off" */ // ----------------------------------------------------------------------------- module.exports = function (j1, window) { return { // ------------------------------------------------------------------------- // _init_ // Global initializer for the adapter object // ------------------------------------------------------------------------- _init_: function () { return; } // END _init_ }; // END return }(j1, window); /***/ }), /***/ 1253: /***/ (() => { /* # ----------------------------------------------------------------------------- # ~/200_theme_js/js/adoc_result_viewer/view_results.js # Provides JavaScript functions displaying results for Asciidoctor # example block # # Product/Info: # https://jekyll.one # # Copyright (C) 2023, 2024 Juergen Adams # # J1 Theme is licensed under MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # ----------------------------------------------------------------------------- # TODO: Improve lanuage settings # TODO: Improve auto-hide functionality for the results block # ----------------------------------------------------------------------------- */ // ----------------------------------------------------------------------------- // ESLint shimming // ----------------------------------------------------------------------------- /* eslint indent: "off" */ /* global $ */ // ----------------------------------------------------------------------------- var timeoutHandle; // var language = 'de'; var language = document.documentElement.lang; function toggle_result_block(result_block) { window.clearTimeout(timeoutHandle); // Clear the timeout object result_block.prev().toggleClass('stacked'); result_block.toggle(); // jadams: Improve auto-hide functionality for the results block // // timeoutHandle = window.setTimeout(function () { // result_block.hide(); // }, 5000); } function insert_result_links() { $('.result').each(function (idx, node) { var view_result_link; var result_block = $(node); var title_div = result_block.prev().find('.title'); if (language == 'en') { view_result_link = $('
elements of class "dropcap" // ------------------------------------------------------------------------- createDropCap: function () { // add class dropcap $('.paragraph.dropcap').children('p').addClass('dropcap'); // if ($('p.dropcap').length) { $('p.dropcap').each(function () { var $p = $(this); var text = $.trim($p.text()); var firstLetter = text[0]; var marginalDropCap = '' + firstLetter + ''; $p.html(text.replace(firstLetter, marginalDropCap)); }); } }, // END createDropCap // ------------------------------------------------------------------------- // Initialize Backdrops on all
elements of class "dropcap" // ------------------------------------------------------------------------- parseHeadings: function () { var headings = parseContent.selectHeadings(".js-toc-content", "h2, h3, h4, h5, h6"); return headings; } // END parseContent // parseContent.selectHeadings( // defaultOptions.contentSelector, // defaultOptions.headingSelector // ); }; // end return (object) //})( jQuery, window ); }(); // END IFFE /***/ }), /***/ 8780: /***/ ((module) => { // ----------------------------------------------------------------------------- // ESLint shimming // ----------------------------------------------------------------------------- /* eslint indent: "off" */ /* eslint no-undef: "off" */ /* eslint no-unused-vars: "off" */ // ----------------------------------------------------------------------------- module.exports = { // Where to render the table of contents. tocSelector: '.js-toc', // Where to grab the headings to build the table of contents. contentSelector: '.js-toc-content', // Which headings to grab inside of the contentSelector element. headingSelector: 'h2, h3, h4, h5, h6', // Headings that match the ignoreSelector will be skipped. ignoreSelector: '.notoc', // For headings inside relative or absolute positioned containers within content hasInnerContainers: false, // Main class to add to links. linkClass: 'toc-link', // Extra classes to add to links. extraLinkClasses: '', // Class to add to active links, // the link corresponding to the top most heading on the page. activeLinkClass: 'is-active-link', // Main class to add to lists. listClass: 'toc-list', // Extra classes to add to lists. extraListClasses: '', // Class that gets added when a list should be collapsed. isCollapsedClass: 'is-collapsed', // Class that gets added when a list should be able // to be collapsed but isn't necessarily collapsed. collapsibleClass: 'is-collapsible', // Class to add to list items. listItemClass: 'toc-list-item', // Class to add to active list items. activeListItemClass: 'is-active-li', // How many heading levels should not be collapsed. // For example, number 6 will show everything since // there are only 6 heading levels and number 0 will collapse them all. // The sections that are hidden will open // and close as you scroll to headings within them. collapseDepth: 3, // Smooth scrolling enabled. scrollSmooth: true, // Smooth scroll duration. scrollSmoothDuration: 300, // Smooth scroll offset. scrollSmoothOffset: 0, // Callback for scroll end. scrollEndCallback: function (e) {}, // Headings offset between the headings and the top of the document (this is meant for minor adjustments). headingsOffset: 1, // Timeout between events firing to make sure it's // not too rapid (for performance reasons). throttleTimeout: 150, // Element to add the positionFixedClass to. positionFixedSelector: null, // Fixed position class to add to make sidebar fixed after scrolling // down past the fixedSidebarOffset. positionFixedClass: 'is-position-fixed', // fixedSidebarOffset can be any number but by default is set // to auto which sets the fixedSidebarOffset to the sidebar // element's offsetTop from the top of the document on init. fixedSidebarOffset: 'auto', // includeHtml can be set to true to include the HTML markup from the // heading node instead of just including the textContent. includeHtml: false, // onclick function to apply to all links in toc. will be called with // the event as the first parameter, and this can be used to stop, // propagation, prevent default or perform action onClick: function (e) {}, // orderedList can be set to false to generate unordered lists (ul) // instead of ordered lists (ol) orderedList: true, // If there is a fixed article scroll container, set to calculate titles' offset scrollContainer: null, // prevent ToC DOM rendering if it's already rendered by an external system skipRendering: false, // Optional callback to change heading labels. // For example it can be used to cut down and put ellipses on multiline headings you deem too long. // Called each time a heading is parsed. Expects a string in return, the modified label to display. // function (string) => string headingLabelCallback: false, // ignore headings that are hidden in DOM ignoreHiddenElements: false, // Optional callback to modify properties of parsed headings. // The heading element is passed in node parameter and information parsed by default parser is provided in obj parameter. // Function has to return the same or modified obj. // The heading will be excluded from TOC if nothing is returned. // function (object, HTMLElement) => object | void headingObjectCallback: null, // Set the base path, useful if you use a `base` tag in `head`. basePath: '', // Only takes affect when `tocSelector` is scrolling, // keep the toc scroll position in sync with the content. disableTocScrollSync: false }; /***/ }), /***/ 7609: /***/ ((module) => { /** * This file is responsible for parsing the content from the DOM and making * sure data is nested properly. * * @author Tim Scanlin */ // ----------------------------------------------------------------------------- // ESLint shimming // ----------------------------------------------------------------------------- /* eslint indent: "off" */ /* eslint no-undef: "off" */ /* eslint semi: "off" */ // ----------------------------------------------------------------------------- module.exports = function parseContent(options) { var reduce = [].reduce; /** * Get the last item in an array and return a reference to it. * @param {Array} array * @return {Object} */ function getLastItem(array) { return array[array.length - 1]; } /** * Get heading level for a heading dom node. * @param {HTMLElement} heading * @return {Number} */ function getHeadingLevel(heading) { return +heading.nodeName.split('H').join(''); } /** * Get important properties from a heading element and store in a plain object. * @param {HTMLElement} heading * @return {Object} */ function getHeadingObject(heading) { // each node is processed twice by this method because nestHeadingsArray() and addNode() calls it // first time heading is real DOM node element, second time it is obj // that is causing problem so I am processing only original DOM node if (!(heading instanceof window.HTMLElement)) return heading; if (options.ignoreHiddenElements && (!heading.offsetHeight || !heading.offsetParent)) { return null; } var obj = { id: heading.id, children: [], nodeName: heading.nodeName, headingLevel: getHeadingLevel(heading), textContent: options.headingLabelCallback ? String(options.headingLabelCallback(heading.textContent)) : heading.textContent.trim() }; if (options.includeHtml) { obj.childNodes = heading.childNodes; } if (options.headingObjectCallback) { return options.headingObjectCallback(obj, heading); } return obj; } /** * Add a node to the nested array. * @param {Object} node * @param {Array} nest * @return {Array} */ function addNode(node, nest) { var obj = getHeadingObject(node); var level = obj.headingLevel; var array = nest; var lastItem = getLastItem(array); var lastItemLevel = lastItem ? lastItem.headingLevel : 0; var counter = level - lastItemLevel; while (counter > 0) { lastItem = getLastItem(array); if (lastItem && lastItem.children !== undefined) { array = lastItem.children; } counter--; } if (level >= options.collapseDepth) { obj.isCollapsed = true; } array.push(obj); return array; } /** * Select headings in content area, exclude any selector in options.ignoreSelector * @param {String} contentSelector * @param {Array} headingSelector * @return {Array} */ function selectHeadings(contentSelector, headingSelector) { var selectors = headingSelector; if (options.ignoreSelector) { selectors = headingSelector.split(',').map(function mapSelectors(selector) { return selector.trim() + ':not(' + options.ignoreSelector + ')'; }); } try { return document.querySelector(contentSelector).querySelectorAll(selectors); } catch (e) { console.warn('Element not found: ' + contentSelector); // eslint-disable-line return null; } } /** * Nest headings array into nested arrays with 'children' property. * @param {Array} headingsArray * @return {Object} */ function nestHeadingsArray(headingsArray) { return reduce.call(headingsArray, function reducer(prev, curr) { var currentHeading = getHeadingObject(curr); if (currentHeading) { addNode(currentHeading, prev.nest); } return prev; }, { nest: [] }); } return { nestHeadingsArray: nestHeadingsArray, selectHeadings: selectHeadings }; }; /***/ }), /***/ 1131: /***/ ((module) => { /* # ----------------------------------------------------------------------------- # ~/200_theme_js/js/lazyCss/lazyCss.js # CSS loader to speed up inital rendering # # Product/Info: # https://jekyll.one # # Copyright (C) 2023, 2024 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # ----------------------------------------------------------------------------- */ module.exports = function lazyCSS() { let options = {}; const observe = opt => { options = opt; // sessionStorage NOT used // // (('IntersectionObserver' in window && !sessionStorage[options.selector]) ? fnCssObserver : fnCssDomLink)(); ('IntersectionObserver' in window ? fnCssObserver : doNothing)(); }; const doNothing = () => { observe = false; }; const fnCssDomLink = () => { let link = document.createElement('link'); let id = 'lazy' + options.selector; link.id = id.replace('.', '_'); ; link.rel = 'stylesheet'; link.type = 'text/css'; link.href = options.src; document.head.appendChild(link); }; const fnCssObserver = () => { let selectors = document.querySelectorAll(options.selector); let observer = new IntersectionObserver((entry, observer) => { if (entry[0].intersectionRatio > 0) { fnCssDomLink(); sessionStorage[options.selector] = true; observer.disconnect(); } }, { rootMargin: options.rootMargin }); selectors.forEach(selector => { observer.observe(selector); }); }; return { observe }; }; /***/ }), /***/ 5771: /***/ (() => { /* # ----------------------------------------------------------------------------- # ~/200_theme_js/js/listen-attribute-changes/attrchange.js # A simple jQuery function that can add listeners on attribute change. # # Product/Info: # https://jekyll.one # # Copyright (C) 2013-2014 Selvakumar Arumugam # Copyright (C) 2023, 2024 Juergen Adams # # Attrchange is licensed under the MIT License. # See: https://github.com/meetselva/attrchange/blob/master/MIT-License.txt # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # ----------------------------------------------------------------------------- */ ; (function ($) { function isDOMAttrModifiedSupported() { var p = document.createElement('p'); var flag = false; if (p.addEventListener) { p.addEventListener('DOMAttrModified', function () { flag = true; }, false); } else if (p.attachEvent) { p.attachEvent('onDOMAttrModified', function () { flag = true; }); } else { return false; } p.setAttribute('id', 'target'); return flag; } function checkAttributes(chkAttr, e) { if (chkAttr) { var attributes = this.data('attr-old-value'); if (e.attributeName.indexOf('style') >= 0) { if (!attributes['style']) attributes['style'] = {}; //initialize var keys = e.attributeName.split('.'); e.attributeName = keys[0]; e.oldValue = attributes['style'][keys[1]]; //old value e.newValue = keys[1] + ':' + this.prop("style")[$.camelCase(keys[1])]; //new value attributes['style'][keys[1]] = e.newValue; } else { e.oldValue = attributes[e.attributeName]; e.newValue = this.attr(e.attributeName); attributes[e.attributeName] = e.newValue; } this.data('attr-old-value', attributes); //update the old value object } } //initialize Mutation Observer var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; $.fn.attrchange = function (a, b) { if (typeof a == 'object') { //core var cfg = { trackValues: false, callback: $.noop }; //backward compatibility if (typeof a === "function") { cfg.callback = a; } else { $.extend(cfg, a); } if (cfg.trackValues) { //get attributes old value this.each(function (i, el) { var attributes = {}; for (var attr, i = 0, attrs = el.attributes, l = attrs.length; i < l; i++) { attr = attrs.item(i); attributes[attr.nodeName] = attr.value; } $(this).data('attr-old-value', attributes); }); } if (MutationObserver) { //Modern Browsers supporting MutationObserver var mOptions = { subtree: false, attributes: true, attributeOldValue: cfg.trackValues }; var observer = new MutationObserver(function (mutations) { mutations.forEach(function (e) { var _this = e.target; //get new value if trackValues is true if (cfg.trackValues) { e.newValue = $(_this).attr(e.attributeName); } if ($(_this).data('attrchange-status') === 'connected') { //execute if connected cfg.callback.call(_this, e); } }); }); return this.data('attrchange-method', 'Mutation Observer').data('attrchange-status', 'connected').data('attrchange-obs', observer).each(function () { observer.observe(this, mOptions); }); } else if (isDOMAttrModifiedSupported()) { //Opera //Good old Mutation Events return this.data('attrchange-method', 'DOMAttrModified').data('attrchange-status', 'connected').on('DOMAttrModified', function (event) { if (event.originalEvent) { event = event.originalEvent; } //jQuery normalization is not required event.attributeName = event.attrName; //property names to be consistent with MutationObserver event.oldValue = event.prevValue; //property names to be consistent with MutationObserver if ($(this).data('attrchange-status') === 'connected') { //disconnected logically cfg.callback.call(this, event); } }); } else if ('onpropertychange' in document.body) { //works only in IE return this.data('attrchange-method', 'propertychange').data('attrchange-status', 'connected').on('propertychange', function (e) { e.attributeName = window.event.propertyName; //to set the attr old value checkAttributes.call($(this), cfg.trackValues, e); if ($(this).data('attrchange-status') === 'connected') { //disconnected logically cfg.callback.call(this, e); } }); } return this; } else if (typeof a == 'string' && $.fn.attrchange.hasOwnProperty('extensions') && $.fn.attrchange['extensions'].hasOwnProperty(a)) { //extensions/options return $.fn.attrchange['extensions'][a].call(this, b); } }; $.fn.attrchange.extensions = { /*attrchange option/extension*/ disconnect: function (o) { if (typeof o !== 'undefined' && o.isPhysicalDisconnect) { return this.each(function () { var attrchangeMethod = $(this).data('attrchange-method'); if (attrchangeMethod == 'propertychange' || attrchangeMethod == 'DOMAttrModified') { $(this).off(attrchangeMethod); } else if (attrchangeMethod == 'Mutation Observer') { $(this).data('attrchange-obs').disconnect(); } else if (attrchangeMethod == 'polling') { clearInterval($(this).data('attrchange-polling-timer')); } }).removeData(['attrchange-method', 'attrchange-status']); } else { //logical disconnect return this.data('attrchange-status', 'disconnected'); //set a flag that prevents triggering callback onattrchange } }, remove: function (o) { return $.fn.attrchange.extensions['disconnect'].call(this, { isPhysicalDisconnect: true }); }, getProperties: function (o) { var attrchangeMethod = $(this).data('attrchange-method'); var pollInterval = $(this).data('attrchange-pollInterval'); return { method: attrchangeMethod, isPolling: attrchangeMethod == 'polling', pollingInterval: typeof pollInterval === 'undefined' ? 0 : parseInt(pollInterval, 10), status: typeof attrchangeMethod === 'undefined' ? 'removed' : $(this).data('attrchange-status') }; }, reconnect: function (o) { //reconnect possible only when there is a logical disconnect return this.data('attrchange-status', 'connected'); }, polling: function (o) { if (o.hasOwnProperty('isComputedStyle') && o.isComputedStyle == 'true') { /* extensive and slow - polling to check on computed style properties */ return this.each(function (i, _this) { if (!o.hasOwnProperty('properties') || Object.prototype.toString.call(o.properties) !== '[object Array]' || o.properties.length == 0) { return false; } //return if no properties found var attributes = {}; //store computed properties for (var i = 0; i < o.properties.length; i++) { attributes[o.properties[i]] = $(this).css(o.properties[i]); } var _this = this; $(this).data('attrchange-polling-timer', setInterval(function () { var changes = {}, hasChanges = false; // attrName: { oldValue: xxx, newValue: yyy} for (var comuptedVal, i = 0; i < o.properties.length; i++) { comuptedVal = $(_this).css(o.properties[i]); if (attributes[o.properties[i]] !== comuptedVal) { hasChanges = true; changes[o.properties[i]] = { oldValue: attributes[o.properties[i]], newValue: comuptedVal }; attributes[o.properties[i]] = comuptedVal; //add the attribute to the orig } } if (hasChanges && $(_this).data('attrchange-status') === 'connected') { //disconnected logically o.callback.call(_this, changes); } }, o.pollInterval ? o.pollInterval : 1000)).data('attrchange-method', 'polling').data('attrchange-pollInterval', o.pollInterval).data('attrchange-status', 'connected'); }); } else { return this.each(function (i, _this) { /* this one is programmatic polling */ var attributes = {}; for (var attr, i = 0, attrs = _this.attributes, l = attrs.length; i < l; i++) { attr = attrs.item(i); attributes[attr.nodeName] = attr.nodeValue; } $(_this).data('attrchange-polling-timer', setInterval(function () { var changes = {}, hasChanges = false; // attrName: { oldValue: xxx, newValue: yyy} for (var attr, i = 0, attrs = _this.attributes, l = attrs.length; i < l; i++) { attr = attrs.item(i); if (attributes.hasOwnProperty(attr.nodeName) && attributes[attr.nodeName] != attr.nodeValue) { //check the values changes[attr.nodeName] = { oldValue: attributes[attr.nodeName], newValue: attr.nodeValue }; hasChanges = true; } else if (!attributes.hasOwnProperty(attr.nodeName)) { //new attribute changes[attr.nodeName] = { oldValue: '', newValue: attr.nodeValue }; hasChanges = true; } attributes[attr.nodeName] = attr.nodeValue; //add the attribute to the orig } if (hasChanges && $(_this).data('attrchange-status') === 'connected') { //disconnected logically o.callback.call(_this, changes); } }, o.pollInterval ? o.pollInterval : 1000)).data('attrchange-method', 'polling').data('attrchange-pollInterval', o.pollInterval).data('attrchange-status', 'connected'); }); } } }; })(jQuery); /***/ }), /***/ 3490: /***/ ((module) => { /* # ----------------------------------------------------------------------------- # ~/js/navigator/navigator.js # Provides all JavaScript core functions for J1 Navigator # # Product/Info: # https://jekyll.one # https://github.com/adamnurdin01/bootsnav # http://corenav.anurdin.net/ # # Copyright (C) 2023, 2024 Juergen Adams # Copyright (C) 2016 adamnurdin01 # # J1 Theme is licensed under MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # Bootsnav is licensed under MIT License. # See: https://github.com/adamnurdin01/navigator # # ----------------------------------------------------------------------------- # NOTE: # jadams, 2020-06-21: # J1 Navigator needs a general revision on BS4 code and functionalities # Current, only base function are tested with BS4 (was coded for BS3) # ----------------------------------------------------------------------------- */ // ----------------------------------------------------------------------------- // ESLint shimming // ----------------------------------------------------------------------------- /* eslint indent: "off" */ /* eslint no-unused-vars: "off" */ /* eslint no-undef: "off" */ // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // TODO: Height of dropdowns are to be limited in general // ----------------------------------------------------------------------------- // Navigator core registered as 'j1.core.navigator' // ----------------------------------------------------------------------------- module.exports = function navigator(options) { // --------------------------------------------------------------------------- // global vars // --------------------------------------------------------------------------- var message = {}; var state; var logger; var logText; // ----------------------------------------------------------------------- // default settings // ----------------------------------------------------------------------- var settings = $.extend({ foo: 'bar', bar: 'foo' }, options); // --------------------------------------------------------------------------- // main object // --------------------------------------------------------------------------- return { // ------------------------------------------------------------------------- // module initializer // ------------------------------------------------------------------------- init: function (defaultOptions, menuOptions) { logger = log4javascript.getLogger('j1.core.navigator'); logText = 'core is being initialized'; logger.info(logText); // ----------------------------------------------------------------------- // Create a Wrapper for the nav system // ----------------------------------------------------------------------- $('body').wrapInner('
'); this.manageDropdownMenu(defaultOptions, menuOptions); this.navbarSticky(); this.eventHandler(defaultOptions); // jadams, 2021-07-03: initialize events early message.type = 'command'; message.action = 'core_initialized'; message.text = 'navigator core initialized'; j1.sendMessage('j1.core.navigator', 'j1.adapter.navigator', message); return true; }, // ------------------------------------------------------------------------- // event handler // ------------------------------------------------------------------------- eventHandler: function (options) { var defaultOptions = options; var logger = log4javascript.getLogger('j1.core.navigator.eventHandler'); var $getNav = $('nav.navbar.navigator'); var scrollDuration = 300; var page_link; var img_link; var classname; var nav_link; var anchor_id; var scrollOffset; var json_data; // jadams: unused code (for now).: manages HTML5 server side events // for incoming messages from Git Server send e.g. on a 'pull request' // NOTE: used for ControlCenter (cc) functionality only !!! // ----------------------------------------------------------------------- // const seeMe = 'https://smee.io/wlNIFNiJN0GClm2'; // const middleware = 'localhost:5000/state'; // const web_server_dev = 'http://localhost:41000/status'; // const utility_server = 'http://localhost:41001/git?request=pull'; // var sender = seeMe; // var payload; // if (j1.checkUserAgent('IE') || j1.checkUserAgent('Edge')) { // logger.warn('HTML5 server side events (SSE) not supported for: ' + userAgent); // logger.warn('Middleware messages disabled'); // } else { // const middleware_status = new EventSource(sender); // // // ----------------------------------------------------------------------- // // middleware event handler ( SSE currently NOT used) // // ----------------------------------------------------------------------- // middleware_status.onmessage = (event) => { // const payload = JSON.parse(event.data); // // logger.debug('middleware: event received'); // // json_data = JSON.stringify(payload, undefined, 2); // logText = 'payload: ' + json_data; // logger.debug(logText); // // message.type = 'command'; // message.action = 'status'; // message.text = payload; // j1.sendMessage( 'j1.core.navigator', 'j1.adapter.navigator', message ); // // return true; // }; // END event onMessage // } // bind click event to all plain '#' links to prevent default action // 'scroll-to-top' // See: // https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault // https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation // https://stackoverflow.com/questions/134845/which-href-value-should-i-use-for-javascript-links-or-javascriptvoid0 // $('a[href="#"]').click(function (e) { page_link = document.querySelector('[id="' + decodeURI(anchor_id).split('#').join('') + '"]') ? true : false; anchor_id = e.target.hash ? e.target.hash : false; classname = e.target.className ? e.target.className : ''; nav_link = classname.includes('nav-'); if (nav_link || !page_link) { logger.debug('\n' + 'click event on href "#" detected: prevent default action'); e.preventDefault ? e.preventDefault() : e.returnValue = false; } }); // ----------------------------------------------------------------------- // In-page smooth scroll // ----------------------------------------------------------------------- // bind click event to all headlines generated by AsciiDoctor // for smooth-scroll (in-page) // jadams,2022-06-10: unused code - smooth scrolling managed by // (page height) observer // ----------------------------------------------------------------------- // $('.sect1, .sect2 .sect3, .sect4, .sect5, .sect6').on('click', function (e) { // img_link = (e.target.localName == 'img') ? true : false; // page_link = document.querySelector('[id="' + decodeURI(anchor_id).split('#').join('') + '"]') ? true : false; // anchor_id = e.target.hash ? e.target.hash : false; // classname = e.target.className ? e.target.className : ''; // nav_link = typeof classname == 'string' ? classname.includes('nav-link') : false; // skip BS nav links // scrollOffset = j1.getScrollOffset(); // anchorTop = $(anchor_id).offset().top ? true : false; // // if (anchor_id && anchor_id.includes('void')) anchor_id = false; // // // skip scrolling if a click on an image detected // if (img_link) { // return true; // } // // if (anchor_id && !nav_link || page_link) { // logger.debug('\n' + 'click event on headline detected: ' + anchor_id); // // $('html, body').animate({ // scrollTop: + scrollOffset // }, scrollDuration); // e.preventDefault ? e.preventDefault() : e.returnValue = false; // } // }); // bind click event to all HTML elements of class '.badge' (Bootstrap) // for smooth-scroll (in-page) to a '