-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-templates-blog-by-author-tsx-49fcd2cadfb1dce7ab9e.js
2 lines (2 loc) · 10.3 KB
/
component---src-pages-templates-blog-by-author-tsx-49fcd2cadfb1dce7ab9e.js
1
2
(self.webpackChunkcode_cave=self.webpackChunkcode_cave||[]).push([[748],{6488:function(e,t,a){var l=a(9720).w_;e.exports.p=function(e){return l({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,a){"use strict";a.d(t,{Z:function(){return d}});var l=a(7294),n=a(8032),s=a(4471),r=a.n(s),o=a(1164),i=a(917);var c=e=>{let{className:t}=e;return(0,i.tZ)("div",{className:`flex justify-center items-center h-full w-full ${t}`},(0,i.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,i.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,i.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,l.useState)(!1),n=(0,l.useRef)(!0),s=(0,l.useRef)(null);return(0,l.useEffect)((()=>{if(!n.current||!s.current||"undefined"==typeof window)return;n.current=!1;const e=new Worker(new URL(a.p+a.u(475),a.b),{type:void 0});e.onmessage=e=>{let{data:a}=e;"ready"===a&&t(!0)};const l=s.current;l.width=l.clientWidth,l.height=l.clientHeight;const r=l.transferControlToOffscreen();e.postMessage({canvas:r},[r]);const o=()=>{e.postMessage({width:l.clientWidth,height:l.clientHeight})};window.addEventListener("resize",o,{passive:!0});const i=t=>{t.preventDefault(),e.postMessage({wheel:t.deltaY})};l.addEventListener("wheel",i);const c=t=>{e.postMessage({x:t.movementX,y:t.movementY})};l.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 l.addEventListener("touchstart",(t=>{if(1!==t.touches.length)return;const a=t.touches[0];t.preventDefault();const l={x:a.screenX,y:a.screenY};u=t=>{const{newX:a,newY:n}=((t,a)=>{const l=t.touches[0];return e.postMessage({x:l.screenX-a.x,y:l.screenY-a.y}),{newX:l.screenX,newY:l.screenY}})(t,l);l.x=a,l.y=n},window.addEventListener("touchmove",u,{passive:!0}),window.addEventListener("touchend",(()=>{window.removeEventListener("touchmove",u)}),{passive:!0})}),{passive:!0}),()=>{window&&(window.removeEventListener("resize",o),window.removeEventListener("mousemove",c),window.removeEventListener("touchmove",u),l&&l.removeEventListener("wheel",i),e.terminate())}}),[]),(0,i.tZ)("div",{className:"h-full w-full relative"},(0,i.tZ)("canvas",{ref:s,className:"bg-main-100 h-91 w-full flex items-center justify-center cursor-pointer"}),e?null:(0,i.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:a,className:s,borderBottom:c,borderTop:d,babylon:m,image:f,titleBlockClassName:h,childrenBlockClassName:g,children:p}=e;const{0:v,1:w}=(0,l.useState)("translate-y-full");return(0,l.useEffect)((()=>{w("translate-y-0")}),[]),(0,i.tZ)("div",{className:`w-full flex items-center bg-main-100 relative overflow-hidden ${t} ${s}`},d?(0,i.tZ)(r(),{className:"absolute top-0 left-0 right-0 w-full"}):null,(0,i.tZ)(o.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,i.tZ)("div",{className:`flex flex-col overflow-hidden items-left h-full justify-center text-secondary-100 h-full w-full ${h||"lg:w-1/2"} bg-main-100`},(0,i.tZ)("h1",{className:"overflow-hidden w-full"},(0,i.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:`${a}`}}))),m?(0,i.tZ)("div",{className:"w-[85%] lg:w-1/2 lg:h-full hidden md:flex -order-1 lg:order-none"},(0,i.tZ)(u,null)):null,f?(0,i.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,i.tZ)(n.G,{image:f,alt:"cover",className:"object-contain aspect-square"})):null,p?(0,i.tZ)("div",{className:`w-full lg:h-full flex justify-center lg:justify-start items-center ${g}`},p):null),c?(0,i.tZ)(r(),{className:"absolute bottom-0 left-0 right-0 w-full"}):null)}},1434:function(e,t,a){"use strict";var l=a(7462),n=a(8322),s=a(917);t.Z=e=>{const{theme:t,onClick:a,className:r,children:o,border:i,...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,s.tZ)("button",(0,l.Z)({onClick:a,className:`flex min-w-10 items-center justify-center rounded-lg border-solid ${i?"border":""} ${u} ${r}`},c),o)}},4568:function(e,t,a){"use strict";var l=a(4160),n=a(8322),s=a(1434),r=a(917);t.Z=e=>{let{section:t,pagesQuantity:a,currentPage:o,nextPageTitle:i,className:c}=e;const u=Array.from({length:a},((e,t)=>t+1)),d=o+1;return(0,r.tZ)("div",{className:`flex justify-center w-full gap-6 ${c}`},o<a?(0,r.tZ)(l.rU,{to:`/${t}/page/${d}`,className:"w-max shrink-0"},(0,r.tZ)(s.Z,{theme:n.Q.light,border:!0,"aria-label":null!=i?i:"Next page",className:"whitespace-nowrap h-10 px-5 font-bold"},null!=i?i:"Next page")):null,(0,r.tZ)("nav",{className:"shrink-0 flex gap-2"},a>1?u.map((e=>(0,r.tZ)(l.rU,{key:`pagination-link-${e}`,to:`/${t}/page/${e}`},(0,r.tZ)(s.Z,{theme:n.Q.light,border:e===o,"aria-label":"view page",className:"h-10 font-bold"},e)))):null))}},4404:function(e,t,a){"use strict";var l=a(4160),n=a(8032),s=a(917);t.Z=e=>{let{authorAlias:t,author:a,authorPosition:r,authorPhoto:o}=e;const i=(0,n.c)(o);return(0,s.tZ)(l.rU,{to:`/blog/${t.split(" ").join("-").toLowerCase()}`,title:`${a}'s blog`,itemProp:"author",itemScope:!0,itemType:"https://schema.org/Person",className:"flex items-center gap-4 mb-8 sm:mb-12 text-secondary-100 text-lg"},i?(0,s.tZ)(n.G,{image:i,alt:"avatar",itemProp:"image",className:"object-contain aspect-square rounded-full w-16 grayscale"}):null,(0,s.tZ)("div",{className:"flex-1 w-max"},(0,s.tZ)("p",{itemProp:"name",className:"font-semibold whitespace-nowrap"},a),(0,s.tZ)("p",{itemProp:"jobTitle",className:"text-secondary-30"},r)))}},3793:function(e,t,a){"use strict";var l=a(4160),n=a(6488),s=a(9165),r=a(8322),o=a(917);t.Z=e=>{let{post:t,theme:a,className:i,markupData:c,lang:u}=e;const{date:d,title:m,text:f}=t.frontmatter,h=Math.floor(t.wordCount.words/200),g=h||1,p=a===r.Q.light?"text-main-100":"text-secondary-100",v=a===r.Q.light?"text-main-70":"text-secondary-70",w=a===r.Q.light?"hover:text-main-10":"hover:text-secondary-10";return(0,o.tZ)(l.rU,{to:`/blog/${t.id}`,className:`flex flex-col sm:flex-row w-full justify-center gap-5 md:gap-14 ${p} ${w} ${i}`,itemScope:!0,itemType:"https://schema.org/Article"},(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 ${v}`},d),(0,o.tZ)("h2",{itemProp:"headline",className:`text-3xl font-semibold ${p}`},m)),(0,o.tZ)("div",{className:"flex flex-col w-full max-w-[500px] gap-5"},(0,o.tZ)("p",{className:`font-normal text-base ${p}`,itemProp:"abstract"},f.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==c?void 0:c.readPostLink),(0,o.tZ)(n.p,{size:14})),(0,o.tZ)("p",{className:`text-sm ${v}`},`${g} ${null==c?void 0:c.readingTimeUnits} ${null==c?void 0:c.readingTimeTitle}`))),(0,o.tZ)(s.Lx,{itemProp:"copyrightHolder",lang:u}))}},1655:function(e,t,a){"use strict";a.r(t),a.d(t,{Head:function(){return m}});var l=a(7294),n=a(8322),s=a(1929),r=a(1164),o=a(3793),i=a(4568),c=a(9165),u=a(4404),d=a(917);t.default=e=>{let{data:t,pageContext:a}=e;const c=t.posts.nodes,{authorAlias:m,author:f,authorPhoto:h,authorPosition:g,authorDescription:p}=t.author.frontmatter,{currentPage:v,pagesQuantity:w,markupData:x,lang:Z}=a;return(0,d.tZ)(l.Fragment,null,(0,d.tZ)(s.Z,{heightClass:"lg:h-99",titleBlockClassName:"lg:w-72 shrink-0 lg:mr-28",title:x.blogByAuthorBannerTitle.toUpperCase(),borderBottom:!0},(0,d.tZ)("div",{className:"text-secondary-30 text-lg"},(0,d.tZ)(u.Z,{authorAlias:m,author:f,authorPhoto:h,authorPosition:g}),(0,d.tZ)("p",{className:"w-full"},p))),(0,d.tZ)(r.Z,{className:"flex-col items-center p-6 md:p-12 bg-secondary-100 gap-14"},c?c.map((e=>(0,d.tZ)(o.Z,{theme:n.Q.light,key:e.id,post:e,markupData:x,lang:Z}))):null,(0,d.tZ)(i.Z,{section:`blog/${m.split(" ").join("-").toLowerCase()}`,pagesQuantity:w,currentPage:v,nextPageTitle:a.pagination.next})))};const m=e=>{let{pageContext:{markupData:t,currentPage:a,site:l,lang:n},data:{author:{frontmatter:{author:s}}},location:r}=e;return(0,d.tZ)(c.Ag,{title:`${t.head} | ${s} | ${a}`,description:l.description,siteUrl:l.siteUrl,path:r.pathname,lang:n})}},8322:function(e,t,a){"use strict";a.d(t,{Q:function(){return l}});let l=function(e){return e.dark="dark",e.light="light",e}({})},4471:function(e,t,a){var l=a(7294);function n(e){return l.createElement("svg",e,[l.createElement("line",{width:"800",height:"8",stroke:"#f9f9f9",strokeWidth:"8",strokeDasharray:"8 8",x1:"0",x2:"100%",y1:"4",y2:"4",key:0}),l.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-by-author-tsx-49fcd2cadfb1dce7ab9e.js.map