Odstranit assets/js/scripts.min.js
This commit is contained in:
parent
ca6b27e9ea
commit
2054f3f17a
1 changed files with 0 additions and 11 deletions
11
assets/js/scripts.min.js
vendored
11
assets/js/scripts.min.js
vendored
|
@ -1,11 +0,0 @@
|
||||||
let container=document.querySelector('.js-container')
|
|
||||||
let toggleButton=document.querySelector('.js-menu-toggle')
|
|
||||||
toggleButton.addEventListener('click',(e)=>{e.preventDefault();container.classList.toggle('is-menu');document.body.classList.toggle("no-scroll");toggleButton.classList.toggle('is-active');if(toggleButton.getAttribute("aria-expanded")=="false"){toggleButton.setAttribute("aria-expanded","true");}else{toggleButton.setAttribute("aria-expanded","false");}});(function(){let shareButton=document.querySelector('.js-post__share-button');let sharePopup=document.querySelector('.js-post__share-popup');if(shareButton){sharePopup.addEventListener('click',function(e){e.stopPropagation();});shareButton.addEventListener('click',function(e){e.preventDefault();e.stopPropagation();sharePopup.classList.toggle('is-visible');});document.body.addEventListener('click',function(){sharePopup.classList.remove('is-visible');});}
|
|
||||||
var Config={Link:".js-share",Width:500,Height:500};var slink=document.querySelectorAll(Config.Link);for(var a=0;a<slink.length;a++){slink[a].onclick=PopupHandler;}
|
|
||||||
function PopupHandler(e){e=(e?e:window.event);var t=(e.target?e.target:e.srcElement);if(sharePopup){sharePopup.classList.remove('is-visible');}
|
|
||||||
var px=Math.floor(((screen.availWidth||1024)-Config.Width)/2),py=Math.floor(((screen.availHeight||700)-Config.Height)/2);var link_href=t.href?t.href:t.parentNode.href;var popup=window.open(link_href,"social","width="+Config.Width+",height="+Config.Height+",left="+px+",top="+py+",location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1");if(popup){popup.focus();if(e.preventDefault)e.preventDefault();e.returnValue=false;}
|
|
||||||
return!!popup;}})();(function(){let wrappers=document.querySelectorAll('.post__video, .post__iframe');for(let i=0;i<wrappers.length;i++){let embed=wrappers[i].querySelector('iframe, embed, video, object');if(!embed){continue;}
|
|
||||||
if(embed.getAttribute('data-responsive')==='false'){continue;}
|
|
||||||
let w=embed.getAttribute('width');let h=embed.getAttribute('height');let ratio=false;if(!w||!h){continue;}
|
|
||||||
if(w.indexOf('%')>-1&&h.indexOf('%')>-1){w=parseFloat(w.replace('%',''));h=parseFloat(h.replace('%',''));ratio=h/w;}else if(w.indexOf('%')===-1&&h.indexOf('%')===-1){w=parseInt(w,10);h=parseInt(h,10);ratio=h/w;}
|
|
||||||
if(ratio!==false){let ratioValue=(ratio*100)+'%';wrappers[i].setAttribute('style','--embed-aspect-ratio:'+ratioValue);}}})();
|
|
Loading…
Reference in a new issue