-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-templates-project-tsx-64eed449e2c049361b4e.js
2 lines (2 loc) · 8.11 KB
/
component---src-pages-templates-project-tsx-64eed449e2c049361b4e.js
1
2
"use strict";(self.webpackChunkcode_cave=self.webpackChunkcode_cave||[]).push([[147],{1880:function(t,e,n){n.r(e),n.d(e,{Head:function(){return b},default:function(){return h}});var l=n(8032),a=n(1164),o=n(7294),i=n(1312),s=n(7451),r=n(917);const c=t=>{let{selected:e,onClick:n}=t;return(0,r.tZ)("button",{"aria-label":"view image",className:"bg-transparent touch-manipulation inline-flex w-12 h-12 after:rounded-sm flex items-center mx-1.5 md:mx-3 after:bg-main-10 after:w-full after:h-1.5 after:content-['']".concat(e?" after:bg-secondary-100":""),type:"button",onClick:n})},m=t=>{let{enabled:e,onClick:n}=t;return(0,r.tZ)("button",{"aria-label":"previous image",className:"bg-transparent touch-manipulation flex z-10 text-main-70 absolute flex items-center justify-center top-1/2 -translate-y-1/2 w-10 md:w-16 h-10 md:h-16 left-0 disabled:opacity-30",onClick:n,disabled:!e},(0,r.tZ)("svg",{className:"w-2/3 h-2/3",viewBox:"137.718 -1.001 366.563 644"},(0,r.tZ)("path",{fill:"#f9f9f9",d:"M428.36 12.5c16.67-16.67 43.76-16.67 60.42 0 16.67 16.67 16.67 43.76 0 60.42L241.7 320c148.25 148.24 230.61 230.6 247.08 247.08 16.67 16.66 16.67 43.75 0 60.42-16.67 16.66-43.76 16.67-60.42 0-27.72-27.71-249.45-249.37-277.16-277.08a42.308 42.308 0 0 1-12.48-30.34c0-11.1 4.1-22.05 12.48-30.42C206.63 234.23 400.64 40.21 428.36 12.5z"})))},p=t=>{let{enabled:e,onClick:n}=t;return(0,r.tZ)("button",{"aria-label":"next image",className:"bg-transparent touch-manipulation flex z-10 text-main-70 absolute flex items-center justify-center top-1/2 -translate-y-1/2 w-10 md:w-16 h-10 md:h-16 right-0 disabled:opacity-30",onClick:n,disabled:!e},(0,r.tZ)("svg",{className:"w-2/3 h-2/3",viewBox:"0 0 238.003 238.003"},(0,r.tZ)("path",{fill:"#f9f9f9",d:"M181.776 107.719L78.705 4.648c-6.198-6.198-16.273-6.198-22.47 0s-6.198 16.273 0 22.47l91.883 91.883-91.883 91.883c-6.198 6.198-6.198 16.273 0 22.47s16.273 6.198 22.47 0l103.071-103.039a15.741 15.741 0 0 0 4.64-11.283c0-4.13-1.526-8.199-4.64-11.313z"})))};var u=t=>{let{screenshots:e}=t;const[n,a]=(0,i.Z)({loop:!0},[(0,s.Z)({stopOnInteraction:!1,stopOnMouseEnter:!0})]),{0:u,1:d}=(0,o.useState)(!1),{0:f,1:x}=(0,o.useState)(!1),{0:g,1:h}=(0,o.useState)(0),{0:b,1:w}=(0,o.useState)([]),Z=(0,o.useCallback)((()=>a&&a.scrollPrev()),[a]),y=(0,o.useCallback)((()=>a&&a.scrollNext()),[a]),v=(0,o.useCallback)((t=>a&&a.scrollTo(t)),[a]),N=(0,o.useCallback)((t=>{w(t.scrollSnapList())}),[]),k=(0,o.useCallback)((t=>{h(t.selectedScrollSnap()),d(t.canScrollPrev()),x(t.canScrollNext())}),[]);return(0,o.useEffect)((()=>{a&&(N(a),k(a),a.on("reInit",N),a.on("reInit",k),a.on("select",k))}),[a,N,k]),(0,r.tZ)("div",{className:"h-full overflow-hidden relative",ref:n},(0,r.tZ)("div",{className:"h-full flex items-center "},e.map((t=>{let{id:e,childImageSharp:n}=t;const a=(0,l.c)(n);return(0,r.tZ)("div",{key:e,className:"h-full shrink-0 min-w-0 basis-full px-12 md:px-20 pt-2.5 pb-8 md:py-8 cursor-pointer flex items-center justify-center"},a?(0,r.tZ)(l.G,{image:a,alt:"logo",className:"object-contain rounded-xl max-h-[424px]"}):null)}))),(0,r.tZ)(m,{onClick:Z,enabled:u}),(0,r.tZ)(p,{onClick:y,enabled:f}),(0,r.tZ)("div",{className:"z-10 absolute bottom-1 left-0 right-0 flex justify-center items-center"},b.map(((t,e)=>(0,r.tZ)(c,{key:e,selected:e===g,onClick:()=>v(e)})))))},d=n(9165),f=n(7462);var x=t=>{let{title:e,text:n,className:l,children:a,textAttr:o,...i}=t;return(0,r.tZ)("section",(0,f.Z)({},i,{className:"w-full"}),(0,r.tZ)("h2",{className:"text-[24px] md:text-4xl text-secondary-100 uppercase w-full max-w-[320px] mb-2"},e),null!=o&&o.dangerouslySetInnerHTML?(0,r.tZ)("div",(0,f.Z)({},o,{className:`text-base md:text-lg w-full max-w-[544px] float-right ${l}`})):(0,r.tZ)("p",(0,f.Z)({},o,{className:`text-base md:text-lg w-full max-w-[544px] float-right ${l}`}),a||n))};var g=t=>{let{text:e,...n}=t;return(0,r.tZ)("span",(0,f.Z)({},n,{className:"bg-main-70 px-5 h-10 md:h-16 whitespace-nowrap text-sm md:text-lg font-medium rounded-lg flex items-center"}),e)};var h=t=>{let{data:{markdownRemark:{frontmatter:e,html:n}},pageContext:{markupData:o,lang:i}}=t;const{title:s,description:c,challenge:m,clientDescription:p,team:f,screenshots:h,stack:b}=e,w=(0,l.c)(e.logo);return(0,r.tZ)("div",{itemScope:!0,itemType:"https://schema.org/CreativeWork",className:"flex bg-main-100"},(0,r.tZ)(a.Z,{maxWidthClass:"max-w-4.5xl",className:"flex-col text-secondary-70 py-6 md:py-16 lg:!px-0 gap-7 sm:gap-5 md:gap-8"},(0,r.tZ)("div",{className:"flex flex-col flex-col-reverse items-center md:items-start md:flex-row justify-between gap-x-16 gap-y-2.5 pb-10 gradient-border border-b border-solid"},(0,r.tZ)("div",{className:"flex-1 w-full md:max-w-[528px]"},(0,r.tZ)("h1",{itemProp:"name",className:"w-full text-[24px] md:text-4xl font-semibold text-secondary-100 mb-5 uppercase"},s),(0,r.tZ)("p",{itemProp:"description",className:"w-full text-base font-light"},c)),w?(0,r.tZ)("div",{className:"w-28 md:w-48 h-28 md:h-48 flex items-center justify-center"},(0,r.tZ)(l.G,{image:w,imgStyle:{objectFit:"contain"},alt:"logo",itemProp:"image",className:"max-h-full max-w-full"})):null),(0,r.tZ)(x,{title:o.clientSectionTitle,text:p,itemProp:"sourceOrganization",itemScope:!0,itemType:"https://schema.org/Organization",textAttr:{itemProp:"description"}}),(0,r.tZ)(x,{title:o.challengeSectionTitle,text:m,textAttr:{itemProp:"about"}}),n?(0,r.tZ)(x,{title:o.solutionSectionTitle,text:m,className:"project-solution",textAttr:{itemProp:"text",dangerouslySetInnerHTML:{__html:n}}}):null,null!=f&&f.length?(0,r.tZ)(x,{title:o.teamSectionTitle,className:"flex gap-2.5 flex-wrap pt-2 md:pt-0"},f.map((t=>(0,r.tZ)(g,{key:t,id:t,text:t,itemProp:"contributor"})))):null,null!=b&&b.length?(0,r.tZ)(x,{title:o.techSectionTitle,className:"flex gap-2.5 flex-wrap pt-2 md:pt-0"},b.map((t=>(0,r.tZ)(g,{key:t,id:t,text:t,itemProp:"keywords"})))):null,null!=h&&h.length?(0,r.tZ)("section",{className:"w-full mb-8"},(0,r.tZ)("h2",{className:"text-[24px] md:text-4xl text-secondary-100 uppercase w-full max-w-[320px]"},o.resultSectionTitle),(0,r.tZ)(u,{screenshots:h})):null,(0,r.tZ)(d.Lx,{itemProp:"author",lang:i})))};const b=t=>{var e;let{data:{markdownRemark:{frontmatter:{title:n,description:a,cover:o}}},pageContext:{markupData:i,site:s,lang:c},location:m}=t;const p=(0,l.c)(o);return(0,r.tZ)(d.Ag,{title:`${i.head} | ${n.toUpperCase()}`,siteUrl:s.siteUrl,description:`${a.split(" ").slice(0,22).join(" ")}...`,path:m.pathname,img:null==p||null===(e=p.images.fallback)||void 0===e?void 0:e.src,lang:c})}},7451:function(t,e,n){n.d(e,{Z:function(){return a}});const l={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function a(t={}){let e,n,o,i=!1,s=!0,r=!1,c=0;function m(){if(o)return;if(!s)return;i||n.emit("autoplay:play");const{ownerWindow:t}=n.internalEngine();t.clearInterval(c),c=t.setInterval(x,e.delay),i=!0}function p(){if(o)return;i&&n.emit("autoplay:stop");const{ownerWindow:t}=n.internalEngine();t.clearInterval(c),c=0,i=!1}function u(){if(d())return s=i,p();s&&m()}function d(){const{ownerDocument:t}=n.internalEngine();return"hidden"===t.visibilityState}function f(t){void 0!==t&&(r=t),s=!0,m()}function x(){const{index:t}=n.internalEngine(),l=t.clone().add(1).get(),a=n.scrollSnapList().length-1;e.stopOnLastSnap&&l===a&&p(),n.canScrollNext()?n.scrollNext(r):n.scrollTo(0,r)}return{name:"autoplay",options:t,init:function(i,c){n=i;const{mergeOptions:f,optionsAtMedia:x}=c,g=f(l,a.globalOptions),h=f(g,t);if(e=x(h),n.scrollSnapList().length<=1)return;r=e.jump,o=!1;const{eventStore:b,ownerDocument:w}=n.internalEngine(),Z=n.rootNode(),y=e.rootNode&&e.rootNode(Z)||Z,v=n.containerNode();n.on("pointerDown",p),e.stopOnInteraction||n.on("pointerUp",m),e.stopOnMouseEnter&&(b.add(y,"mouseenter",(()=>{s=!1,p()})),e.stopOnInteraction||b.add(y,"mouseleave",(()=>{s=!0,m()}))),e.stopOnFocusIn&&(b.add(v,"focusin",p),e.stopOnInteraction||b.add(v,"focusout",m)),b.add(w,"visibilitychange",u),e.playOnInit&&!d()&&m()},destroy:function(){n.off("pointerDown",p).off("pointerUp",m),p(),o=!0,i=!1},play:f,stop:function(){i&&p()},reset:function(){i&&f()},isPlaying:function(){return i}}}a.globalOptions=void 0}}]);
//# sourceMappingURL=component---src-pages-templates-project-tsx-64eed449e2c049361b4e.js.map