jekyll-theme-consulting 0.10.14 → 0.10.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/js/main.js +10 -2
- data/assets/js/main.min.js +1 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2683e7af02add503c0af2483d1bebc1cac0cd647a1787dc0437767ea524e2c3
|
4
|
+
data.tar.gz: daec6ceb61fac92502ba321d4914488d3237b64c7906e68a0bc0abd3f3d660ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03cebe0e7e5373020ca7f0b7796fbe3f8f99dd86b252ba3b8fea0975dfcbd616a034e4c58730cfb441dcb4b108ddc9e51d57f41832bc22f5e93e8215c6619713
|
7
|
+
data.tar.gz: 7c9d5a77fe31a868e7407499df8bfb8dfc830ab84f21296c355e53889150c9baabe5d511af46e51ee138b10062ad7ec0686adb4d419e07555bfb06ef2a70428f
|
data/assets/js/main.js
CHANGED
@@ -127,6 +127,8 @@
|
|
127
127
|
var $a = $(this),
|
128
128
|
href = $a.attr('href'),
|
129
129
|
target = $a.attr('target');
|
130
|
+
pathname = $a.length > 0 ? $a[0].pathname : "";
|
131
|
+
hash = href.split('#').length > 1 ? href.split("#")[1] : "";
|
130
132
|
|
131
133
|
// Prevent default.
|
132
134
|
event.preventDefault();
|
@@ -144,8 +146,14 @@
|
|
144
146
|
|
145
147
|
if (target == '_blank')
|
146
148
|
window.open(href);
|
147
|
-
else
|
148
|
-
|
149
|
+
else {
|
150
|
+
// Prevent reloading if the page is the same
|
151
|
+
if (pathname && hash && pathname == window.location.pathname) {
|
152
|
+
document.getElementById(hash).scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"});
|
153
|
+
}
|
154
|
+
else
|
155
|
+
window.location.href = href;
|
156
|
+
}
|
149
157
|
|
150
158
|
}, 500);
|
151
159
|
|
data/assets/js/main.min.js
CHANGED
@@ -1,6 +1 @@
|
|
1
|
-
(function($){var $window=$(window),$head=$(
|
2
|
-
$('.image.object').each(function(){var $this=$(this),$img=$this.children('img');$img.css('opacity','0');$this.css('background-image','url("'+$img.attr('src')+'")').css('background-size',$img.css('object-fit')?$img.css('object-fit'):'cover').css('background-position',$img.css('object-position')?$img.css('object-position'):'center');});var $sidebar=$('#sidebar'),$sidebar_inner=$sidebar.children('.inner');$sidebar.addClass('inactive');if(browser.os=='android'&&browser.name=='chrome')
|
3
|
-
$('<style>#sidebar .inner::-webkit-scrollbar { display: none; }</style>').appendTo($head);$('#sidebar-toggle-button').on('click',function(event){event.preventDefault();event.stopPropagation();$sidebar.toggleClass('inactive');});$('#sidebar-search-button').on('click',function(event){event.preventDefault();event.stopPropagation();$sidebar.toggleClass('inactive');});$('.scrolly-middle').scrolly({speed:1000,anchor:'middle'});$('.scrolly').scrolly({speed:3000,offset:function(){return(breakpoints.active('<=mobile')?70:190);}});$sidebar.on('click','a',function(event){var $a=$(this),href=$a.attr('href'),target=$a.attr('target');event.preventDefault();event.stopPropagation();if(!href||href=='#'||href=='')
|
4
|
-
return;$sidebar.addClass('inactive');setTimeout(function(){if(target=='_blank')
|
5
|
-
window.open(href);else
|
6
|
-
window.location.href=href;},500);});$sidebar.on('click touchend touchstart touchmove',function(event){event.stopPropagation();});$body.on('click touchend',function(event){$sidebar.addClass('inactive');});$sidebar_inner.data('locked',0).css('position','').css('top','');var $menu=$('#menu'),$menu_openers=$menu.children('ul').find('.opener');$menu_openers.each(function(){var $this=$(this);$this.on('click',function(event){event.preventDefault();$menu_openers.not($this).removeClass('active');$this.toggleClass('active');$window.triggerHandler('resize.sidebar-lock');});});})(jQuery);
|
1
|
+
(function($){var $window=$(window),$head=$("head"),$body=$("body");breakpoints({xlarge:["1281px","1680px"],large:["981px","1280px"],medium:["737px","980px"],small:["481px","736px"],xsmall:["361px","480px"],xxsmall:[null,"360px"],"xlarge-to-max":"(min-width: 1681px)","small-to-xlarge":"(min-width: 481px) and (max-width: 1680px)"});$window.on("load",function(){window.setTimeout(function(){$body.removeClass("is-preload")},100)});var resizeTimeout;$window.on("resize",function(){$body.addClass("is-resizing");clearTimeout(resizeTimeout);resizeTimeout=setTimeout(function(){$body.removeClass("is-resizing")},100)});if(!browser.canUse("object-fit")||browser.name=="safari")$(".image.object").each(function(){var $this=$(this),$img=$this.children("img");$img.css("opacity","0");$this.css("background-image",'url("'+$img.attr("src")+'")').css("background-size",$img.css("object-fit")?$img.css("object-fit"):"cover").css("background-position",$img.css("object-position")?$img.css("object-position"):"center")});var $sidebar=$("#sidebar"),$sidebar_inner=$sidebar.children(".inner");$sidebar.addClass("inactive");if(browser.os=="android"&&browser.name=="chrome")$("<style>#sidebar .inner::-webkit-scrollbar { display: none; }</style>").appendTo($head);$("#sidebar-toggle-button").on("click",function(event){event.preventDefault();event.stopPropagation();$sidebar.toggleClass("inactive")});$("#sidebar-search-button").on("click",function(event){event.preventDefault();event.stopPropagation();$sidebar.toggleClass("inactive")});$(".scrolly-middle").scrolly({speed:1e3,anchor:"middle"});$(".scrolly").scrolly({speed:3e3,offset:function(){return breakpoints.active("<=mobile")?70:190}});$sidebar.on("click","a",function(event){var $a=$(this),href=$a.attr("href"),target=$a.attr("target");pathname=$a.length>0?$a[0].pathname:"";hash=href.split("#").length>1?href.split("#")[1]:"";event.preventDefault();event.stopPropagation();if(!href||href=="#"||href=="")return;$sidebar.addClass("inactive");setTimeout(function(){if(target=="_blank")window.open(href);else{if(pathname&&hash&&pathname==window.location.pathname){document.getElementById(hash).scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}else window.location.href=href}},500)});$sidebar.on("click touchend touchstart touchmove",function(event){event.stopPropagation()});$body.on("click touchend",function(event){$sidebar.addClass("inactive")});$sidebar_inner.data("locked",0).css("position","").css("top","");var $menu=$("#menu"),$menu_openers=$menu.children("ul").find(".opener");$menu_openers.each(function(){var $this=$(this);$this.on("click",function(event){event.preventDefault();$menu_openers.not($this).removeClass("active");$this.toggleClass("active");$window.triggerHandler("resize.sidebar-lock")})})})(jQuery);
|