Sha256: feaaba8eb051a8019de665f151d3d993d7ee873233b746ad71b53ac9af9c64ec
Contents?: true
Size: 955 Bytes
Versions: 3
Compression:
Stored size: 955 Bytes
Contents
(function() { var SOURCES = window.TEXT_VARIABLES.sources; window.Lazyload.js(SOURCES.jquery, function() { $(function() { var $this ,$scroll; var $articleContent = $('.js-article-content'); var hasSidebar = $('.js-page-root').hasClass('layout--page--sidebar'); var scroll = hasSidebar ? '.js-page-main' : 'html, body'; $scroll = $(scroll); $articleContent.find('.highlight').each(function() { $this = $(this); $this.attr('data-lang', $this.find('code').attr('data-lang')); }); $articleContent.find('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]').each(function() { $this = $(this); $this.append($('<a class="anchor d-print-none" aria-hidden="true"></a>').html('<i class="fas fa-anchor"></i>')); }); $articleContent.on('click', '.anchor', function() { $scroll.scrollToAnchor('#' + $(this).parent().attr('id'), 400); }); }); }); })();
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
jekyll-text-theme-fork-2.2.6 | _includes/scripts/article.js |
jekyll-text-theme-2.2.6 | _includes/scripts/article.js |
jekyll-text-theme-2.2.5 | _includes/scripts/article.js |