-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-templates-blog-tsx-fcbb8d954bb6b50ad543.js
2 lines (2 loc) · 9.41 KB
/
component---src-pages-templates-blog-tsx-fcbb8d954bb6b50ad543.js
1
2
(self.webpackChunkcode_cave=self.webpackChunkcode_cave||[]).push([[926],{6488:function(e,t,l){var a=l(9720).w_;e.exports.p=function(e){return a({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M6.5 4a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v5a.5.5 0 01-1 0V4.5H7a.5.5 0 01-.5-.5z",clipRule:"evenodd"}},{tag:"path",attr:{fillRule:"evenodd",d:"M12.354 3.646a.5.5 0 010 .708l-9 9a.5.5 0 01-.708-.708l9-9a.5.5 0 01.708 0z",clipRule:"evenodd"}}]})(e)}},1929:function(e,t,l){"use strict";l.d(t,{Z:function(){return d}});var a=l(7294),n=l(8032),r=l(4471),s=l.n(r),i=l(1164),o=l(917);var c=e=>{let{className:t}=e;return(0,o.tZ)("div",{className:`flex justify-center items-center h-full w-full ${t}`},(0,o.tZ)("svg",{"aria-hidden":"true",className:"w-8 h-8 mr-2 text-main-10 animate-spin dark:text-secondary-10 fill-main-100",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.tZ)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,o.tZ)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})))};var u=()=>{const{0:e,1:t}=(0,a.useState)(!1),n=(0,a.useRef)(!0),r=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(!n.current||!r.current||"undefined"==typeof window)return;n.current=!1;const e=new Worker(new URL(l.p+l.u(475),l.b),{type:void 0});e.onmessage=e=>{let{data:l}=e;"ready"===l&&t(!0)};const a=r.current;a.width=a.clientWidth,a.height=a.clientHeight;const s=a.transferControlToOffscreen();e.postMessage({canvas:s},[s]);const i=()=>{e.postMessage({width:a.clientWidth,height:a.clientHeight})};window.addEventListener("resize",i,{passive:!0});const o=t=>{t.preventDefault(),e.postMessage({wheel:t.deltaY})};a.addEventListener("wheel",o);const c=t=>{e.postMessage({x:t.movementX,y:t.movementY})};a.addEventListener("mousedown",(e=>{e.preventDefault(),window.addEventListener("mousemove",c,{passive:!0}),window.addEventListener("mouseup",(()=>window.removeEventListener("mousemove",c)),{once:!0,passive:!0})}));let u;return a.addEventListener("touchstart",(t=>{if(1!==t.touches.length)return;const l=t.touches[0];t.preventDefault();const a={x:l.screenX,y:l.screenY};u=t=>{const{newX:l,newY:n}=((t,l)=>{const a=t.touches[0];return e.postMessage({x:a.screenX-l.x,y:a.screenY-l.y}),{newX:a.screenX,newY:a.screenY}})(t,a);a.x=l,a.y=n},window.addEventListener("touchmove",u,{passive:!0}),window.addEventListener("touchend",(()=>{window.removeEventListener("touchmove",u)}),{passive:!0})}),{passive:!0}),()=>{window&&(window.removeEventListener("resize",i),window.removeEventListener("mousemove",c),window.removeEventListener("touchmove",u),a&&a.removeEventListener("wheel",o),e.terminate())}}),[]),(0,o.tZ)("div",{className:"h-full w-full relative"},(0,o.tZ)("canvas",{ref:r,className:"bg-main-100 h-91 w-full flex items-center justify-center cursor-pointer"}),e?null:(0,o.tZ)(c,{className:"absolute top-0 left-0 right-0 bottom-0 z-10"}))};var d=e=>{let{heightClass:t="lg:min-h-[396px]",title:l,className:r,borderBottom:c,borderTop:d,babylon:m,image:f,titleBlockClassName:g,childrenBlockClassName:h,children:p}=e;const{0:v,1:w}=(0,a.useState)("translate-y-full");return(0,a.useEffect)((()=>{w("translate-y-0")}),[]),(0,o.tZ)("div",{className:`w-full flex items-center bg-main-100 relative overflow-hidden ${t} ${r}`},d?(0,o.tZ)(s(),{className:"absolute top-0 left-0 right-0 w-full"}):null,(0,o.tZ)(i.Z,{className:"h-full flex flex-col lg:flex-row py-12 lg:py-0 items-center justify-between text-secondary-100 flex-grow gap-y-8"},(0,o.tZ)("div",{className:`flex flex-col overflow-hidden items-left h-full justify-center text-secondary-100 h-full w-full ${g||"lg:w-1/2"} bg-main-100`},(0,o.tZ)("h1",{className:"overflow-hidden w-full"},(0,o.tZ)("span",{className:`banner-title inline-block text-3xl lg:text-4xl w-full text-center lg:text-start transition-all duration-1000 font-light ${v}`,dangerouslySetInnerHTML:{__html:`${l}`}}))),m?(0,o.tZ)("div",{className:"w-[85%] lg:w-1/2 lg:h-full hidden md:flex -order-1 lg:order-none"},(0,o.tZ)(u,null)):null,f?(0,o.tZ)("div",{className:"w-[220px] lg:w-1/2 lg:h-full flex justify-center lg:justify-end items-center -order-1 lg:order-none"},(0,o.tZ)(n.G,{image:f,alt:"cover",className:"object-contain aspect-square"})):null,p?(0,o.tZ)("div",{className:`w-full lg:h-full flex justify-center lg:justify-start items-center ${h}`},p):null),c?(0,o.tZ)(s(),{className:"absolute bottom-0 left-0 right-0 w-full"}):null)}},1434:function(e,t,l){"use strict";var a=l(7462),n=l(8322),r=l(917);t.Z=e=>{const{theme:t,onClick:l,className:s,children:i,border:o,...c}=e,u=""+(t===n.Q.dark?"bg-main-100 text-secondary-100 border-secondary-100 hover:bg-main-70":"bg-secondary-100 text-main-100 border-main-100 hover:bg-secondary-30");return(0,r.tZ)("button",(0,a.Z)({onClick:l,className:`flex min-w-10 items-center justify-center rounded-lg border-solid ${o?"border":""} ${u} ${s}`},c),i)}},4568:function(e,t,l){"use strict";var a=l(4160),n=l(8322),r=l(1434),s=l(917);t.Z=e=>{let{section:t,pagesQuantity:l,currentPage:i,nextPageTitle:o,className:c}=e;const u=Array.from({length:l},((e,t)=>t+1)),d=i+1;return(0,s.tZ)("div",{className:`flex justify-center w-full gap-6 ${c}`},i<l?(0,s.tZ)(a.rU,{to:`/${t}/page/${d}`,className:"w-max shrink-0"},(0,s.tZ)(r.Z,{theme:n.Q.light,border:!0,"aria-label":null!=o?o:"Next page",className:"whitespace-nowrap h-10 px-5 font-bold"},null!=o?o:"Next page")):null,(0,s.tZ)("nav",{className:"shrink-0 flex gap-2"},l>1?u.map((e=>(0,s.tZ)(a.rU,{key:`pagination-link-${e}`,to:`/${t}/page/${e}`},(0,s.tZ)(r.Z,{theme:n.Q.light,border:e===i,"aria-label":"view page",className:"h-10 font-bold"},e)))):null))}},3793:function(e,t,l){"use strict";var a=l(4160),n=l(6488),r=l(9165),s=l(8322),i=l(8032),o=l(917);t.Z=e=>{let{post:t,theme:l,className:c,markupData:u,lang:d}=e;const{date:m,title:f,text:g}=t.frontmatter,h=Math.floor(t.wordCount.words/200),p=h||1,v=l===s.Q.light?"text-main-100":"text-secondary-100",w=l===s.Q.light?"text-main-70":"text-secondary-70",x=l===s.Q.light?"hover:text-main-10":"hover:text-secondary-10",Z=(0,i.c)(t.frontmatter.cover);return(0,o.tZ)(a.rU,{to:`/blog/${t.id}`,className:`flex flex-col sm:flex-row w-full justify-center gap-5 md:gap-14 ${v} ${x} ${c}`,itemScope:!0,itemType:"https://schema.org/Article"},Z&&(0,o.tZ)(i.G,{image:Z,alt:"",className:"object-cover rounded-full mr-3.5 grayscale"}),(0,o.tZ)("div",{className:"flex flex-col w-full max-w-[400px] gap-2.5"},(0,o.tZ)("p",{itemProp:"dateCreated",className:`text-lg ${w}`},m),(0,o.tZ)("h2",{itemProp:"headline",className:`text-3xl font-semibold ${v}`},f)),(0,o.tZ)("div",{className:"flex flex-col w-full max-w-[500px] gap-5"},(0,o.tZ)("p",{className:`font-normal text-base ${v}`,itemProp:"abstract"},g.split(" ").slice(0,70).join(" "),"..."),(0,o.tZ)("div",{className:"flex w-full items-center justify-between"},(0,o.tZ)("div",{className:"flex items-center gap-3 text-sm font-bold"},(0,o.tZ)("span",null,null==u?void 0:u.readPostLink),(0,o.tZ)(n.p,{size:14})),(0,o.tZ)("p",{className:`text-sm ${w}`},`${p} ${null==u?void 0:u.readingTimeUnits} ${null==u?void 0:u.readingTimeTitle}`))),(0,o.tZ)(r.Lx,{itemProp:"copyrightHolder",lang:d}))}},6906:function(e,t,l){"use strict";l.r(t),l.d(t,{Head:function(){return m}});var a=l(7294),n=l(8032),r=l(8322),s=l(1929),i=l(1164),o=l(3793),c=l(4568),u=l(9165),d=l(917);t.default=e=>{let{data:t,pageContext:l}=e;const u=t.allMarkdownRemark.nodes,{currentPage:m,pagesQuantity:f,markupData:g,lang:h}=l,p=(0,n.c)(g.image);return(0,d.tZ)(a.Fragment,null,(0,d.tZ)(s.Z,{heightClass:"lg:h-99",title:g.bannerTitle.toUpperCase(),image:p,borderBottom:!0}),(0,d.tZ)(i.Z,{className:"flex-col items-center p-6 md:p-12 bg-secondary-100 gap-14"},u?u.map((e=>(0,d.tZ)(o.Z,{theme:r.Q.light,key:e.id,post:e,markupData:g,lang:h}))):null,(0,d.tZ)(c.Z,{section:"blog",pagesQuantity:f,currentPage:m,nextPageTitle:l.pagination.next})))};const m=e=>{let{pageContext:{markupData:t,currentPage:l,site:a,lang:n},location:r}=e;return(0,d.tZ)(u.Ag,{title:`${t.head} | ${t.bannerTitle.toUpperCase()} | ${l}`,description:a.description,siteUrl:a.siteUrl,path:r.pathname,lang:n})}},8322:function(e,t,l){"use strict";l.d(t,{Q:function(){return a}});let a=function(e){return e.dark="dark",e.light="light",e}({})},4471:function(e,t,l){var a=l(7294);function n(e){return a.createElement("svg",e,[a.createElement("line",{width:"800",height:"8",stroke:"#f9f9f9",strokeWidth:"8",strokeDasharray:"8 8",x1:"0",x2:"100%",y1:"4",y2:"4",key:0}),a.createElement("line",{width:"800",height:"8",stroke:"#111111",strokeWidth:"8",strokeDasharray:"8 8",x1:"8",x2:"100%",y1:"4",y2:"4",key:1})])}n.defaultProps={height:"8"},e.exports=n,n.default=n}}]);
//# sourceMappingURL=component---src-pages-templates-blog-tsx-fcbb8d954bb6b50ad543.js.map