mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-04-25 10:56:40 +07:00

Author: Fedor Katurov <gotham48@gmail.com> Date: Thu Nov 10 14:25:54 2022 +0600 fixed images on landings
1 line
4.4 KiB
JavaScript
1 line
4.4 KiB
JavaScript
import T from"./LayoutMainMenuToggle.7976e57d.js";import $ from"./LayoutMainMenu.d22a8656.js";import{k as M,a as B,q as P,J as L,aa as V,y as A,ab as z,o as k,e as C,i as v,h as d,f as y,w as E,r as H,ac as I}from"./entry.15ae7dfb.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./navigation.671e519e.js";function D(o){if(Array.isArray(o)){for(var e=0,t=Array(o.length);e<o.length;e++)t[e]=o[e];return t}else return Array.from(o)}var h=!1;if(typeof window<"u"){var g={get passive(){h=!0}};window.addEventListener("testPassive",null,g),window.removeEventListener("testPassive",null,g)}var u=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),r=[],c=!1,p=-1,l=void 0,s=void 0,a=void 0,w=function(e){return r.some(function(t){return!!(t.options.allowTouchMove&&t.options.allowTouchMove(e))})},f=function(e){var t=e||window.event;return w(t.target)||t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)},O=function(e){if(a===void 0){var t=!!e&&e.reserveScrollBarGap===!0,i=window.innerWidth-document.documentElement.clientWidth;if(t&&i>0){var n=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);a=document.body.style.paddingRight,document.body.style.paddingRight=n+i+"px"}}l===void 0&&(l=document.body.style.overflow,document.body.style.overflow="hidden")},F=function(){a!==void 0&&(document.body.style.paddingRight=a,a=void 0),l!==void 0&&(document.body.style.overflow=l,l=void 0)},R=function(){return window.requestAnimationFrame(function(){if(s===void 0){s={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,i=e.scrollX,n=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-i,setTimeout(function(){return window.requestAnimationFrame(function(){var m=n-window.innerHeight;m&&t>=n&&(document.body.style.top=-(t+m))})},300)}})},Y=function(){if(s!==void 0){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=s.position,document.body.style.top=s.top,document.body.style.left=s.left,window.scrollTo(t,e),s=void 0}},q=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},N=function(e,t){var i=e.targetTouches[0].clientY-p;return w(e.target)?!1:t&&t.scrollTop===0&&i>0||q(t)&&i<0?f(e):(e.stopPropagation(),!0)},W=function(e,t){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!r.some(function(n){return n.targetElement===e})){var i={targetElement:e,options:t||{}};r=[].concat(D(r),[i]),u?R():O(t),u&&(e.ontouchstart=function(n){n.targetTouches.length===1&&(p=n.targetTouches[0].clientY)},e.ontouchmove=function(n){n.targetTouches.length===1&&N(n,e)},c||(document.addEventListener("touchmove",f,h?{passive:!1}:void 0),c=!0))}},J=function(){u&&(r.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),c&&(document.removeEventListener("touchmove",f,h?{passive:!1}:void 0),c=!1),p=-1),u?Y():F(),r=[]};const U="_grid_zdoth_1",X="_main_zdoth_17",j="_sidebar_zdoth_39",x="_active_zdoth_52",G="_menu_zdoth_58",K="_menu_toggle_zdoth_78",Q="_shifted_zdoth_95",Z="_footer_zdoth_102",ee={grid:U,main:X,sidebar:j,active:x,menu:G,menu_toggle:K,shifted:Q,footer:Z},oe=B({setup(){const o=P(0),e=()=>{o.value=window.scrollY};return L(()=>addEventListener("scroll",e)),V(()=>removeEventListener("scroll",e)),{menuShifted:A(()=>o.value>60),scrollTop:o}},data(){return{menuVisible:!1}},methods:{toggleMenu(){this.$data.menuVisible=!this.$data.menuVisible}},watch:{$route(){!this.menuVisible||z(()=>this.toggleMenu())},menuVisible(o){o&&W(this.$refs.sidebar),J()}}});function te(o,e,t,i,n,m){const _=T,b=$,S=I;return k(),C("div",{class:d(o.$style.grid)},[v(_,{active:o.menuVisible,class:d([o.$style.menu_toggle,{[o.$style.shifted]:o.menuShifted,[o.$style.active]:o.menuVisible}]),onClick:o.toggleMenu},null,8,["active","class","onClick"]),y("div",{class:d([o.$style.sidebar,{[o.$style.active]:o.menuVisible}]),ref:"sidebar"},[y("div",{class:d(o.$style.menu)},[v(b)],2)],2),y("div",{class:d(o.$style.main)},[v(S,{name:"content"},{default:E(()=>[H(o.$slots,"default")]),_:3})],2)],2)}const ne={$style:ee},ae=M(oe,[["render",te],["__cssModules",ne]]);export{ae as default};
|