2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
(this["webpackJsonpreact-page"]=this["webpackJsonpreact-page"]||[]).push([[0],{103:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(0),a=n.n(o),c=n(11),i=n.n(c),l=n(49),s=n(28),d=n(153),b=n(150),j=n(140),u={MuiAlert:{root:{fontSize:"16px",borderRadius:0},standardError:{color:"#A72121",fontWeight:300,backgroundColor:"#FFA9A9"},standardWarning:{color:"rgba(0, 0, 0, 0.5)",fontWeight:300,backgroundColor:"#FFDDA9"},standardInfo:{color:"#2176A7",fontWeight:300,backgroundColor:"#A9E5FF"},standardSuccess:{color:"#059346",fontWeight:300,backgroundColor:"#BFFFA9"},icon:{display:"flex",opacity:1,fontsize:"16px",marginLeft:"3rem",marginRight:"1rem"},message:{padding:"16px 0 8px 0"}},MuiInputBase:{input:{height:"1.3rem","&:disabled":{background:x,color:x}}},MuiMenuItem:{root:{fontFamily:"Poppins",fontSize:"14px",lineHeight:"19px",textAlign:"left",color:x,padding:".5rem"}},MuiOutlinedInput:{root:{position:"relative","&:hover:not($disabled):not($focused):not($error) $notchedOutline":{border:"1px solid ".concat(x),"@media (hover: none)":{borderColor:x}},"&$focused $notchedOutline":{borderColor:x},"&$disabled $notchedOutline":{background:x,borderColor:"#E5E5E5",opacity:.8,color:x}},notchedOutline:{borderColor:x},input:{background:"#FFFFFF",padding:".5rem",borderRadius:"3px",fontFamily:"Poppins",fontSize:" 14px",lineHeight:"19px",color:x,"&:disabled":{background:x,opacity:.8,color:x},notchedOutline:{border:"transparent"}},multiline:{padding:".5rem !important",border:"0px",margin:0}},MuiSelect:{root:{background:"#FFFFFF",padding:".5rem",borderRadius:"3px",fontFamily:"Poppins",fontSize:"14px",lineHeight:"19px",textAlign:"left",color:x,border:"1px solid ".concat(x),"&:focus":{borderRadius:"3px",borderColor:"transparent",background:"#FFFFFF"}},select:{minWidth:"5.5rem",borderRadius:"3px",border:"1px solid ".concat(x),fontSize:"16px",lineHeight:"19px","&:focus":{borderRadius:"3px",borderColor:x,background:"#FFFFFF"}},selectMenu:{background:"#FFFFFF",color:x,"&:notchedOutline":{borderColor:"transparent !important"}},outlined:{color:"".concat(x," !important"),borderColor:"transparent",fontSize:"14px",lineHeight:"19px","&:hover ":{borderColor:"transparent",outline:"none"},"&:focus":{background:"#FFFFFF",borderColor:"transparent"}},iconOutlined:{color:x},icon:{color:x}},MuiSwitch:{root:{overflow:"visible",width:"4rem"},switchBase:{background:"transparent","&$checked":{transform:"translateX(26px)","&$checked + $track":{backgroundColor:x,border:"none",boxShadow:"none",width:36},"& $thumb":{backgroundColor:x,boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.25)"}}},thumb:{backgroundColor:x,boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.25)",width:20,height:20},track:{backgroundColor:x,width:36},checked:{}}},p="#004d40",h="#a5d6a7",x=Object(j.a)({palette:{common:{},primary:{main:p,contrastText:h},secondary:{main:h,contrastText:p},contrastThreshold:3},typography:{fontFamily:"Chilanka"},overrides:u}),m=n(12),O=n(151),f=n(75),g=n(76),k=n(84),v=n(83),F=function(e){Object(k.a)(n,e);var t=Object(v.a)(n);function n(e){var r;return Object(f.a)(this,n),(r=t.call(this,e)).state={error:null,errorInfo:null},r}return Object(g.a)(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.errorInfo?Object(r.jsxs)("div",{children:[Object(r.jsx)("h2",{children:"Something went wrong."}),Object(r.jsxs)("details",{style:{whiteSpace:"pre-wrap"},children:[this.state.error&&this.state.error.toString(),Object(r.jsx)("br",{}),this.state.errorInfo.componentStack]})]}):this.props.children}}]),n}(o.Component),y=n(47),w=function(e){var t=e.layout,n=e.component;return Object(r.jsx)(m.a,{render:function(e){return Object(r.jsx)(t,{children:Object(r.jsx)(n,Object(y.a)({},e))})}})},C=n(108),I=n(86),S=n(143),z=n(144),D=n(145),M=n(141),H=n(142),T=function(e){var t=e.children,n=Object(M.a)();return Object(r.jsx)(H.a,{appear:!1,direction:"down",in:!n,children:t})},A=n(70),P=Object(I.a)((function(e){return{appBar:{position:"fixed",zIndex:1301}}})),B=function(){var e=P();return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(S.a,{}),Object(r.jsx)(T,{children:Object(r.jsx)(z.a,{className:e.appBar,elevation:0,children:Object(r.jsx)(D.a,{children:Object(r.jsx)(A.a,{})})})}),Object(r.jsx)(D.a,{})]})},N=n(146),R=n(50),$=function(){return Object(r.jsx)(N.a,{container:!0,style:{marginTop:"auto",zIndex:1300},justify:"center",children:Object(r.jsx)(N.a,{item:!0,children:Object(r.jsx)(R.a,{inline:"true",variant:"body1",children:"Dan Dobos \xa9 2021 Build with passion"})})})},E=Object(I.a)((function(e){return{container:{minHeight:"calc(100vh-128px)",paddingTop:"2rem",paddingBottom:"2rem",fallbacks:[{minHeight:"-moz-calc(100% - 128px)"},{minHeight:"-webkit-calc(100% - 128px)"},{minHeight:"-o-calc(100% - 128px)"}]}}})),W=function(e){var t=e.children,n=E();return Object(r.jsx)(r.Fragment,{children:Object(r.jsxs)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column"},children:[Object(r.jsx)(B,{}),Object(r.jsx)(C.a,{className:n.container,children:t}),Object(r.jsx)($,{})]})})},q=n(147),L=n(57),J=n(30),V=n(79),G=n.n(V),U=n(148),X=Object(q.a)((function(e){return{icon:Object(J.a)({width:"5rem",height:"5rem"},e.breakpoints.down("md"),{width:"3rem",height:"3rem"})}}));function Y(e){var t=e.children,n=e.window,o=Object(M.a)({target:document.querySelector("#footer")?n:void 0});return Object(r.jsx)(U.a,{in:o,children:Object(r.jsx)("div",{onClick:function(e){var t=(e.target.ownerDocument||document).querySelector("#back-to-top-anchor");t&&t.scrollIntoView({behavior:"smooth",block:"center"})},role:"presentation",children:t})})}var K=function(e){var t=X();return Object(r.jsx)(N.a,{container:!0,justify:"center",alignItems:"center",id:"footer",children:Object(r.jsx)(Y,Object(y.a)(Object(y.a)({},e),{},{children:Object(r.jsx)(G.a,{className:t.icon})}))})},Q=n(152),Z=n(149),_=n(109),ee=n(80),te=n.n(ee),ne=n(81),re=n.n(ne),oe=function(){var e=Object(o.useContext)(Oe),t=e.darkMode,n=e.setDarkMode,a=t?Object(r.jsx)(te.a,{}):Object(r.jsx)(re.a,{});return Object(r.jsx)(_.a,{disableRipple:!0,onClick:function(){return n(!t)},children:a})},ae=n(82),ce=n.n(ae),ie=Object(I.a)((function(e){return{appBar:Object(J.a)({position:"fixed",zIndex:1301,background:"transparent"},e.breakpoints.down("lg"),{backgroundColor:e.palette.background.default}),name:{textTransform:"uppercase",letterSpacing:".5rem"}}})),le=function(e){e.preventDefault();var t=(e.target.ownerDocument||document).querySelector("#footer");t&&t.scrollIntoView({behavior:"smooth",block:"center"})},se=function(){var e=ie();return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(S.a,{}),Object(r.jsx)(T,{children:Object(r.jsx)(z.a,{className:e.appBar,elevation:0,children:Object(r.jsx)(D.a,{children:Object(r.jsxs)(N.a,{container:!0,justify:"space-between",children:[Object(r.jsx)(N.a,{item:!0,children:Object(r.jsxs)(Q.a,{"aria-label":"breadcrumb",children:[Object(r.jsx)(R.a,{color:"textPrimary",variant:"h5",className:e.name,children:"Dan Dobos"}),Object(r.jsx)(Z.a,{color:"textPrimary",to:"#about",onClick:le,children:"About"})]})}),Object(r.jsx)(N.a,{item:!0,children:Object(r.jsxs)(N.a,{container:!0,alignItems:"center",children:[Object(r.jsx)(oe,{}),Object(r.jsx)(s.b,{to:"/projects",children:Object(r.jsx)(_.a,{disableRipple:!0,children:Object(r.jsx)(ce.a,{})})})]})})]})})})}),Object(r.jsx)(D.a,{})]})},de=Object(q.a)((function(e){return{container:{minHeight:"100vh",paddingTop:"2rem",fallbacks:[{minHeight:"-moz-calc(100% - 128px)"},{minHeight:"-webkit-calc(100% - 128px)"},{minHeight:"-o-calc(100% - 128px)"}]}}})),be=function(e){var t=e.children,n=de(),a=Object(o.useContext)(Oe).darkMode,c=Object(L.a)({typography:{fontFamily:"Yeon Sung",transform:"matrix(1, 0, 0, 1, 0, 0)"},palette:{type:a?"dark":"light"}});return Object(r.jsxs)(b.a,{theme:c,children:[Object(r.jsx)("div",{id:"back-to-top-anchor"}),Object(r.jsx)(se,{}),Object(r.jsx)(C.a,{className:n.container,children:t}),Object(r.jsx)(K,{})]})},je=Object(o.lazy)((function(){return n.e(3).then(n.bind(null,159))})),ue=Object(o.lazy)((function(){return n.e(4).then(n.bind(null,154))})),pe=Object(o.lazy)((function(){return n.e(6).then(n.bind(null,155))})),he=Object(o.lazy)((function(){return n.e(5).then(n.bind(null,157))})),xe=Object(o.lazy)((function(){return n.e(7).then(n.bind(null,156))})),me=function(){return Object(r.jsx)(o.Suspense,{fallback:Object(r.jsx)(O.a,{color:"secondary"}),children:Object(r.jsx)(F,{children:Object(r.jsxs)(m.c,{children:[Object(r.jsx)(w,{exact:!0,path:"/",component:je,layout:be}),Object(r.jsx)(w,{exact:!0,path:"/about",component:ue,layout:W}),Object(r.jsx)(w,{exact:!0,path:"/projects",component:pe,layout:W}),Object(r.jsx)(w,{exact:!0,path:"/games",component:he,layout:W}),Object(r.jsx)(w,{exact:!0,path:"/snippets",component:xe,layout:W})]})})})},Oe=a.a.createContext(),fe=function(){var e=Object(o.useState)(!0),t=Object(l.a)(e,2),n=t[0],a=t[1],c=Object(d.a)(x);return Object(r.jsx)(Oe.Provider,{value:{darkMode:n,setDarkMode:a},children:Object(r.jsx)(b.a,{theme:c,children:Object(r.jsx)(s.a,{basename:"/me",children:Object(r.jsx)(me,{})})})})},ge=function(e){e&&e instanceof Function&&n.e(8).then(n.bind(null,158)).then((function(t){var n=t.getCLS,r=t.getFID,o=t.getFCP,a=t.getLCP,c=t.getTTFB;n(e),r(e),o(e),a(e),c(e)}))};i.a.render(Object(r.jsx)(a.a.StrictMode,{children:Object(r.jsx)(fe,{})}),document.getElementById("root")),ge()},70:function(e,t,n){"use strict";(function(e){var r=n(2),o=n(49),a=n(30),c=n(0),i=n(28),l=n(106),s=n(108),d=n(87),b=n(109),j=n(115),u=n(111),p=n(112),h=n(113),x=n(116),m=n(114),O=n(78),f=n.n(O),g=n(77),k=n.n(g),v=n(86),F=n(58),y=Object(v.a)((function(e){return{toolbar:e.mixins.toolbar,drawerIconContainer:Object(a.a)({alignSelf:"center","&:hover":{backgroundColor:"transparent"}},e.breakpoints.down("md"),{padding:0}),drawerIcon:{height:"40px",width:"40px",color:e.palette.secondary.main},drawer:{minWidth:"60vw",backgroundColor:e.palette.secondary.main},listitems:{padding:"1.5rem 2rem ",color:e.palette.primary.main,width:"100%","&:hover":{backgroundColor:e.palette.primary.main,color:e.palette.secondary.main}},listText:{alignItems:"flex-start",fontSize:"1.5rem",textTransform:"capitalize"},selected:{"&.Mui-selected":{backgroundColor:e.palette.primary.main,color:e.palette.secondary.main}}}}));t.a=function(t){var n=y(),a=Object(F.a)(),O=Object(l.a)(a.breakpoints.down("sm")),g=e.browser&&/iPad|iPhone|iPod/.test(navigator.userAgent),v=Object(c.useState)(1),w=Object(o.a)(v,2),C=w[0],I=w[1],S=Object(c.useState)(!1),z=Object(o.a)(S,2),D=z[0],M=z[1],H=Object(c.useRef)(null),T=Object(c.createRef)(),A=Object(c.useMemo)((function(){return[{name:"Home",link:"/",activeIndex:0},{name:"Projects",link:"/projects",activeIndex:1},{name:"Games",link:"/games",activeIndex:2},{name:"Snippets",link:"/snippets",activeIndex:3},{name:"About",link:"/about",activeIndex:4}]}),[]);return Object(c.useEffect)((function(){A.forEach((function(e){switch(window.location.pathname){case"".concat(e.link):C!==e.activeIndex&&I(e.activeIndex);break;default:return!1}}))}),[C,A]),Object(r.jsxs)(s.a,{ref:T,children:[Object(r.jsx)(d.a,{mdUp:!0,children:Object(r.jsx)(b.a,{onClick:function(){return M(!D)},disableRipple:!0,className:n.drawerIconContainer,children:D?Object(r.jsx)(k.a,{className:n.drawerIcon}):Object(r.jsx)(f.a,{className:n.drawerIcon})})}),O?Object(r.jsxs)(j.a,{disableBackdropTransition:!g,disableDiscovery:g,open:D,onOpen:function(){M(!0)},onClose:function(){M(!1)},classes:{paper:n.drawer},children:[Object(r.jsx)("div",{className:n.toolbar}),Object(r.jsx)(u.a,{disablePadding:!0,children:A.map((function(e){return Object(r.jsx)(p.a,{className:n.listitems,button:!0,component:i.b,to:e.link,value:e.activeIndex,selected:C===e.activeIndex,classes:{selected:n.selected},onClick:function(){I(e.activeIndex),M(!1)},children:Object(r.jsx)(h.a,{disableTypography:!0,className:n.listText,children:e.name})},"".concat(e).concat(e.activeIndex))}))})]}):Object(r.jsx)(d.a,{smDown:!0,children:Object(r.jsx)(x.a,{action:H,value:C,onChange:function(e,t){I(t)},centered:!0,children:A.map((function(e){return Object(r.jsx)(m.a,{label:e.name,component:i.b,to:e.link},"".concat(e.activeIndex))}))})})]})}}).call(this,n(100))}},[[103,1,2]]]);
|
|
//# sourceMappingURL=main.bfd6bf4f.chunk.js.map
|