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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db25e5cef05fc96e5bb18414c475162dc07b5bb9f757324c4692683089621e69
4
- data.tar.gz: 6202c9eca845df9415943b78534dbd4e1b06c50bd5a8cce77545090fa11af2cd
3
+ metadata.gz: c2683e7af02add503c0af2483d1bebc1cac0cd647a1787dc0437767ea524e2c3
4
+ data.tar.gz: daec6ceb61fac92502ba321d4914488d3237b64c7906e68a0bc0abd3f3d660ad
5
5
  SHA512:
6
- metadata.gz: 9cd500b39213619950c855573df722052b42b52d49bd862c9d1ac539bd7cf2657b1c987ee7d2472d53ab8c56df25328e65197652bb725867b36a2c4ffab3a7a0
7
- data.tar.gz: 2364c49d866cdaf3c9edf9362d6a5ef6e632c64d1500bb0e8c9beea3edd327f37ef79143e4ab32489bbfc47b2fb3aadf431b088eb31e8b71f8ef46d49a0e4e4c
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
- window.location.href = href;
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
 
@@ -1,6 +1 @@
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')
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);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-consulting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.14
4
+ version: 0.10.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moodule