Repository: incubator-netbeans-website Updated Branches: refs/heads/asf-site e478a6afe -> cca1b5172
Commented search logic out. Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/commit/67041bce Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/tree/67041bce Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/diff/67041bce Branch: refs/heads/asf-site Commit: 67041bcecf0181a724117f1d85efdfd16e03bd77 Parents: e478a6a Author: Chris2011 <[email protected]> Authored: Thu Feb 9 00:32:45 2017 +0100 Committer: Chris2011 <[email protected]> Committed: Thu Feb 9 00:32:45 2017 +0100 ---------------------------------------------------------------------- content/scripts/onepager.js | 10 +++++----- content/scripts/onepager.min.js | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/blob/67041bce/content/scripts/onepager.js ---------------------------------------------------------------------- diff --git a/content/scripts/onepager.js b/content/scripts/onepager.js index 3d89297..8619558 100644 --- a/content/scripts/onepager.js +++ b/content/scripts/onepager.js @@ -78,11 +78,11 @@ }, true); }); - document.querySelector('div.search').addEventListener('click', function() { - var searchField = document.querySelector('.search-field'); - - toggle(searchField, searchField.className.indexOf('active') === -1 , 'active'); - }); +// document.querySelector('div.search').addEventListener('click', function() { +// var searchField = document.querySelector('.search-field'); +// +// toggle(searchField, searchField.className.indexOf('active') === -1 , 'active'); +// }); var animForward = function (startPos, endPos) { var incrementer = .1, http://git-wip-us.apache.org/repos/asf/incubator-netbeans-website/blob/67041bce/content/scripts/onepager.min.js ---------------------------------------------------------------------- diff --git a/content/scripts/onepager.min.js b/content/scripts/onepager.min.js index 1fc19c2..3aa8410 100644 --- a/content/scripts/onepager.min.js +++ b/content/scripts/onepager.min.js @@ -1,2 +1 @@ - -(function(){var k=document.querySelector("#burger-menu"),i=[].slice.call(document.querySelectorAll(".nav-link")),d=document.querySelector("body"),f=function(m,l){if(m.className.indexOf(l)===-1){m.className+=" "+l}},h=function(n,m){var l=n.className.replace(" "+m,"");n.className=l},c=function(m,n,l){if(n){f(m,l)}else{h(m,l)}},a=function(l){window.history.pushState(null,l.text,l)};if(!window.location.hostname==="localhost"){var j=window.location.pathname.replace("/","");if(j){window.scrollTo(0,document.querySelector("#"+j).offsetTop)}}[].slice.call(document.querySelectorAll(".ripple-btn")).forEach(function(l){l.addEventListener("mousedown",function(n){var m=this.querySelector(".ripple");f(m,"visible");m.style.transform="translate(-50%, -50%) translate("+n.layerX+"px, "+n.layerY+"px) scale(0.0001, 0.0001)";setTimeout(function(){m.style.transform=m.style.transform.replace(" scale(0.0001, 0.0001)","")},200)},true);l.addEventListener("mouseup",function(){var m=this.querySelector(".ripple" );h(m,"visible")},true)});i.forEach(function(l){l.addEventListener("click",function(p){var o=document.querySelector("#"+this.getAttribute("href")),n=o.offsetTop,m=window.scrollY;p.preventDefault();window.removeEventListener("scroll",e);a(this);if(m<=n){g(m,n)}else{b(m,n)}window.addEventListener("scroll",e)},true)});document.querySelector("div.search").addEventListener("click",function(){var l=document.querySelector(".search-field");c(l,l.className.indexOf("active")===-1,"active")});var g=function(m,l){var o=0.1,n=function(){var p=(l-m);o+=1.25;if(p<40){m+=p}else{m+=(1*o)}window.scrollTo(0,m);if(m<l){window.requestAnimationFrame(n)}};window.requestAnimationFrame(n)};var b=function(m,l){var o=0.1,n=function(){var p=(m-l);o+=1.25;if(p<40){m-=p}else{m-=(1*o)}window.scrollTo(0,m);if(m>l){window.requestAnimationFrame(n)}};window.requestAnimationFrame(n)};document.querySelector(".back-to-top").addEventListener("click",function(){window.history.replaceState(null,null,"/");b(window.scrollY,0 )},true);k.addEventListener("click",function(){if(d.className.indexOf("active")===-1){f(d,"active")}else{h(d,"active");d.removeEventListener("click",this)}},true);var e=function(){c(document.querySelector("header"),document.body.scrollTop>=100,"active");c(document.querySelector("body"),document.body.scrollTop>=280,"scrolled")};window.addEventListener("scroll",e)}()); \ No newline at end of file +(function(){var k=document.querySelector("#burger-menu"),i=[].slice.call(document.querySelectorAll(".nav-link")),d=document.querySelector("body"),f=function(m,l){if(m.className.indexOf(l)===-1){m.className+=" "+l}},h=function(n,m){var l=n.className.replace(" "+m,"");n.className=l},c=function(m,n,l){if(n){f(m,l)}else{h(m,l)}},a=function(l){window.history.pushState(null,l.text,l)};if(!window.location.hostname==="localhost"){var j=window.location.pathname.replace("/","");if(j){window.scrollTo(0,document.querySelector("#"+j).offsetTop)}}[].slice.call(document.querySelectorAll(".ripple-btn")).forEach(function(l){l.addEventListener("mousedown",function(n){var m=this.querySelector(".ripple");f(m,"visible");m.style.transform="translate(-50%, -50%) translate("+n.layerX+"px, "+n.layerY+"px) scale(0.0001, 0.0001)";setTimeout(function(){m.style.transform=m.style.transform.replace(" scale(0.0001, 0.0001)","")},200)},true);l.addEventListener("mouseup",function(){var m=this.querySelector(".ripple" );h(m,"visible")},true)});i.forEach(function(l){l.addEventListener("click",function(p){var o=document.querySelector("#"+this.getAttribute("href")),n=o.offsetTop,m=window.scrollY;p.preventDefault();window.removeEventListener("scroll",e);a(this);if(m<=n){g(m,n)}else{b(m,n)}window.addEventListener("scroll",e)},true)});var g=function(m,l){var o=0.1,n=function(){var p=(l-m);o+=1.25;if(p<40){m+=p}else{m+=(1*o)}window.scrollTo(0,m);if(m<l){window.requestAnimationFrame(n)}};window.requestAnimationFrame(n)};var b=function(m,l){var o=0.1,n=function(){var p=(m-l);o+=1.25;if(p<40){m-=p}else{m-=(1*o)}window.scrollTo(0,m);if(m>l){window.requestAnimationFrame(n)}};window.requestAnimationFrame(n)};document.querySelector(".back-to-top").addEventListener("click",function(){window.history.replaceState(null,null,"/");b(window.scrollY,0)},true);k.addEventListener("click",function(){if(d.className.indexOf("active")===-1){f(d,"active")}else{h(d,"active");d.removeEventListener("click",this)}},true);var e=f unction(){c(document.querySelector("header"),document.body.scrollTop>=100,"active");c(document.querySelector("body"),document.body.scrollTop>=280,"scrolled")};window.addEventListener("scroll",e)}()); \ No newline at end of file
