1
0
Fork 0
mirror of https://github.com/voltbonn/profile-picture-generator.git synced 2024-12-22 15:55:08 +00:00

thomasrosen published a site update

This commit is contained in:
thomasrosen 2021-01-21 19:58:36 +00:00
parent 44257105fe
commit f51829e13a
10 changed files with 13 additions and 13 deletions

View file

@ -1,8 +1,8 @@
{
"files": {
"main.css": "/static/css/main.4a6e9426.chunk.css",
"main.js": "/static/js/main.0970a3bd.chunk.js",
"main.js.map": "/static/js/main.0970a3bd.chunk.js.map",
"main.css": "/static/css/main.015bbd8f.chunk.css",
"main.js": "/static/js/main.f98f9ce2.chunk.js",
"main.js.map": "/static/js/main.f98f9ce2.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.f6e93472.js",
"runtime-main.js.map": "/static/js/runtime-main.f6e93472.js.map",
"static/js/2.1a3cb35a.chunk.js": "/static/js/2.1a3cb35a.chunk.js",
@ -28,7 +28,7 @@
"static/js/12.18f83d7a.chunk.js": "/static/js/12.18f83d7a.chunk.js",
"static/js/12.18f83d7a.chunk.js.map": "/static/js/12.18f83d7a.chunk.js.map",
"index.html": "/index.html",
"static/css/main.4a6e9426.chunk.css.map": "/static/css/main.4a6e9426.chunk.css.map",
"static/css/main.015bbd8f.chunk.css.map": "/static/css/main.015bbd8f.chunk.css.map",
"static/js/2.1a3cb35a.chunk.js.LICENSE.txt": "/static/js/2.1a3cb35a.chunk.js.LICENSE.txt",
"static/media/HeaderImage.f98423dd.svg": "/static/media/HeaderImage.f98423dd.svg",
"static/media/ProfileFrame B&G Bars.png": "/static/media/ProfileFrame B&G Bars.b84e992d.png",
@ -44,7 +44,7 @@
"entrypoints": [
"static/js/runtime-main.f6e93472.js",
"static/js/2.1a3cb35a.chunk.js",
"static/css/main.4a6e9426.chunk.css",
"static/js/main.0970a3bd.chunk.js"
"static/css/main.015bbd8f.chunk.css",
"static/js/main.f98f9ce2.chunk.js"
]
}

View file

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/volt-logo-64.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Combine your photo with a Volt Frame for Social Media 💜"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Volt Social Media Frame Generator</title><link href="/static/css/main.4a6e9426.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"bb57f110",4:"1782ed80",5:"e1e1de85",6:"d1362615",7:"1b5955d2",8:"6c19bf62",9:"1ed67c5f",10:"1fe77309",11:"f2fb4857",12:"18f83d7a"}[e]+".chunk.js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonpprofile-picture-generator"]=this["webpackJsonpprofile-picture-generator"]||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var l=c;t()}([])</script><script src="/static/js/2.1a3cb35a.chunk.js"></script><script src="/static/js/main.0970a3bd.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/volt-logo-64.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Combine your photo with a Volt Frame for Social Media 💜"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Volt Social Media Frame Generator</title><link href="/static/css/main.015bbd8f.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"bb57f110",4:"1782ed80",5:"e1e1de85",6:"d1362615",7:"1b5955d2",8:"6c19bf62",9:"1ed67c5f",10:"1fe77309",11:"f2fb4857",12:"18f83d7a"}[e]+".chunk.js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonpprofile-picture-generator"]=this["webpackJsonpprofile-picture-generator"]||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var l=c;t()}([])</script><script src="/static/js/2.1a3cb35a.chunk.js"></script><script src="/static/js/main.f98f9ce2.chunk.js"></script></body></html>

View file

@ -0,0 +1,2 @@
:root{--volt-purple:#582c83;--background:#140022}*{margin:0;padding:0;font-family:"Ubuntu",-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.App{text-align:center;background-color:#140022;background-color:var(--background);min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff;padding:10vh}h2{margin:10vh 0 2vh;font-size:calc(10px + 4vmin)}p{max-width:100%;width:calc(40vh + 15vw)}.HeaderImage{height:calc(10px + 30vmin);max-width:100%}.FinishedFrame{height:36vh;margin:2vh}.FrameChooser .frame{height:12vh;margin:2vh;cursor:pointer;box-shadow:0 0 0 1vh hsla(0,0%,100%,0);transition:transform .2s ease}.FrameChooser .frame:hover{transform-origin:center center;transform:scale(1.1)}.FrameChooser .frame.choosen{box-shadow:0 0 0 1vh #fff}.labelButton,button{outline:none;border:none;margin:2vh;padding:1vh 2vh;font-size:calc(10px + 2vmin);font-weight:700;cursor:pointer;background:#fff;color:#582c83;color:var(--volt-purple);transition:transform .2s ease}.labelButton:hover,button:hover{transform-origin:center center;transform:scale(1.05)}.labelButton img{display:inline;height:calc(10px + 4vmin);margin:0 2vh 0 -1vh}.labelButton img,.labelButton span{vertical-align:middle}
/*# sourceMappingURL=main.015bbd8f.chunk.css.map */

View file

@ -0,0 +1 @@
{"version":3,"sources":["webpack://src/App.css"],"names":[],"mappings":"AAAA,MACI,qBAAsB,CACtB,oBACJ,CAEA,EACI,QAAS,CACT,SAAU,CACV,mJAEU,CACV,kCAAmC,CACnC,iCACJ,CAEA,KACI,iBAAkB,CAElB,wBAAmC,CAAnC,kCAAmC,CACnC,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UAAY,CACZ,YACJ,CAEA,GACI,iBAAoB,CACpB,4BACJ,CAEA,EACI,cAAe,CACf,uBACJ,CAEA,aACI,0BAA2B,CAC3B,cACJ,CAEA,eACI,WAAY,CACZ,UACJ,CAEA,qBACI,WAAY,CACZ,UAAW,CACX,cAAe,CACf,sCAAyC,CACzC,6BACJ,CACA,2BACI,8BAA+B,CAC/B,oBACJ,CACA,6BACI,yBACJ,CAEA,oBAEI,YAAa,CACb,WAAY,CACZ,UAAW,CACX,eAAgB,CAChB,4BAA6B,CAC7B,eAAiB,CACjB,cAAe,CAEf,eAAiB,CACjB,aAAyB,CAAzB,wBAAyB,CACzB,6BACJ,CACA,gCAEI,8BAA+B,CAC/B,qBACJ,CAEA,iBACI,cAAe,CACf,yBAA0B,CAE1B,mBACJ,CACA,mCAHI,qBAKJ","file":"main.015bbd8f.chunk.css","sourcesContent":[":root{\n --volt-purple: #582C83;\n --background: #140022;\n}\n\n*{\n margin: 0;\n padding: 0;\n font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.App {\n text-align: center;\n\n background-color: var(--background);\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n padding: 10vh;\n}\n\nh2{\n margin: 10vh 0 2vh 0;\n font-size: calc(10px + 4vmin);\n}\n\np{\n max-width: 100%;\n width: calc(40vh + 15vw);\n}\n\n.HeaderImage{\n height: calc(10px + 30vmin);\n max-width: 100%;\n}\n\n.FinishedFrame {\n height: 36vh;\n margin: 2vh;\n}\n\n.FrameChooser .frame{\n height: 12vh;\n margin: 2vh;\n cursor: pointer;\n box-shadow: 0 0 0 1vh rgba(255,255,255,0);\n transition: transform 0.2s ease;\n}\n.FrameChooser .frame:hover{\n transform-origin: center center;\n transform: scale(1.1);\n}\n.FrameChooser .frame.choosen{\n box-shadow: 0 0 0 1vh white;\n}\n\nbutton,\n.labelButton{\n outline: none;\n border: none;\n margin: 2vh;\n padding: 1vh 2vh;\n font-size: calc(10px + 2vmin);\n font-weight: bold;\n cursor: pointer;\n\n background: white;\n color: var(--volt-purple);\n transition: transform 0.2s ease;\n}\nbutton:hover,\n.labelButton:hover{\n transform-origin: center center;\n transform: scale(1.05);\n}\n\n.labelButton img{\n display: inline;\n height: calc(10px + 4vmin);\n vertical-align: middle;\n margin: 0 2vh 0 -1vh;\n}\n.labelButton span{\n vertical-align: middle;\n}\n"]}

View file

@ -1,2 +0,0 @@
:root{--volt-purple:#582c83;--background:#140022}*{margin:0;padding:0;font-family:"Ubuntu",-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.App{text-align:center;background-color:#140022;background-color:var(--background);min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff;padding:10vh}h2{margin:10vh 0 2vh;font-size:calc(10px + 4vmin)}.HeaderImage{height:calc(10px + 30vmin);max-width:100%}.FinishedFrame{height:36vh;margin:2vh}.FrameChooser .frame{height:12vh;margin:2vh;cursor:pointer;box-shadow:0 0 0 1vh hsla(0,0%,100%,0);transition:transform .2s ease}.FrameChooser .frame:hover{transform-origin:center center;transform:scale(1.1)}.FrameChooser .frame.choosen{box-shadow:0 0 0 1vh #fff}.labelButton,button{outline:none;border:none;margin:2vh;padding:1vh 2vh;font-size:calc(10px + 2vmin);font-weight:700;cursor:pointer;background:#fff;color:#582c83;color:var(--volt-purple);transition:transform .2s ease}.labelButton:hover,button:hover{transform-origin:center center;transform:scale(1.05)}.labelButton img{display:inline;height:calc(10px + 4vmin);margin:0 2vh 0 -1vh}.labelButton img,.labelButton span{vertical-align:middle}
/*# sourceMappingURL=main.4a6e9426.chunk.css.map */

View file

@ -1 +0,0 @@
{"version":3,"sources":["webpack://src/App.css"],"names":[],"mappings":"AAAA,MACI,qBAAsB,CACtB,oBACJ,CAEA,EACI,QAAS,CACT,SAAU,CACV,mJAEU,CACV,kCAAmC,CACnC,iCACJ,CAEA,KACI,iBAAkB,CAElB,wBAAmC,CAAnC,kCAAmC,CACnC,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BAA6B,CAC7B,UAAY,CACZ,YACJ,CAEA,GACI,iBAAoB,CACpB,4BACJ,CAEA,aACI,0BAA2B,CAC3B,cACJ,CAEA,eACI,WAAY,CACZ,UACJ,CAEA,qBACI,WAAY,CACZ,UAAW,CACX,cAAe,CACf,sCAAyC,CACzC,6BACJ,CACA,2BACI,8BAA+B,CAC/B,oBACJ,CACA,6BACI,yBACJ,CAEA,oBAEI,YAAa,CACb,WAAY,CACZ,UAAW,CACX,eAAgB,CAChB,4BAA6B,CAC7B,eAAiB,CACjB,cAAe,CAEf,eAAiB,CACjB,aAAyB,CAAzB,wBAAyB,CACzB,6BACJ,CACA,gCAEI,8BAA+B,CAC/B,qBACJ,CAEA,iBACI,cAAe,CACf,yBAA0B,CAE1B,mBACJ,CACA,mCAHI,qBAKJ","file":"main.4a6e9426.chunk.css","sourcesContent":[":root{\n --volt-purple: #582C83;\n --background: #140022;\n}\n\n*{\n margin: 0;\n padding: 0;\n font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.App {\n text-align: center;\n\n background-color: var(--background);\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n font-size: calc(10px + 2vmin);\n color: white;\n padding: 10vh;\n}\n\nh2{\n margin: 10vh 0 2vh 0;\n font-size: calc(10px + 4vmin);\n}\n\n.HeaderImage{\n height: calc(10px + 30vmin);\n max-width: 100%;\n}\n\n.FinishedFrame {\n height: 36vh;\n margin: 2vh;\n}\n\n.FrameChooser .frame{\n height: 12vh;\n margin: 2vh;\n cursor: pointer;\n box-shadow: 0 0 0 1vh rgba(255,255,255,0);\n transition: transform 0.2s ease;\n}\n.FrameChooser .frame:hover{\n transform-origin: center center;\n transform: scale(1.1);\n}\n.FrameChooser .frame.choosen{\n box-shadow: 0 0 0 1vh white;\n}\n\nbutton,\n.labelButton{\n outline: none;\n border: none;\n margin: 2vh;\n padding: 1vh 2vh;\n font-size: calc(10px + 2vmin);\n font-weight: bold;\n cursor: pointer;\n\n background: white;\n color: var(--volt-purple);\n transition: transform 0.2s ease;\n}\nbutton:hover,\n.labelButton:hover{\n transform-origin: center center;\n transform: scale(1.05);\n}\n\n.labelButton img{\n display: inline;\n height: calc(10px + 4vmin);\n vertical-align: middle;\n margin: 0 2vh 0 -1vh;\n}\n.labelButton span{\n vertical-align: middle;\n}\n"]}

View file

@ -1,2 +0,0 @@
(this["webpackJsonpprofile-picture-generator"]=this["webpackJsonpprofile-picture-generator"]||[]).push([[0],{17:function(e,t,r){},19:function(e,t,r){var n={"./ProfileFrame B&G Bars.png":[21,4],"./ProfileFrame Blue Bars.png":[22,5],"./ProfileFrame Green Bars.png":[23,6],"./ProfileFrame Mixed Bars.png":[24,7],"./ProfileFrame Purple.png":[25,8],"./ProfileFrame R&Y Bars.png":[26,9],"./ProfileFrame Red Bars.png":[27,10],"./ProfileFrame White Bars.png":[28,11],"./ProfileFrame Yellow Bars.png":[29,12]};function a(e){if(!r.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],a=t[0];return r.e(t[1]).then((function(){return r(a)}))}a.keys=function(){return Object.keys(n)},a.id=19,e.exports=a},20:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r(1),c=r.n(a),o=r(9),s=r.n(o),i=r(8),l=r(2),u=(r(17),r(10)),f=r.n(u),m=r(4),j=r.n(m),d=r(7);var p=function(e){var t=e.onFrameChange,c=Object(a.useState)([]),o=Object(l.a)(c,2),s=o[0],i=o[1],u=Object(a.useState)(null),f=Object(l.a)(u,2),m=f[0],p=f[1];Object(a.useEffect)((function(){function e(){return(e=Object(d.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Promise.all(["ProfileFrame Purple","ProfileFrame Yellow Bars","ProfileFrame Red Bars","ProfileFrame Blue Bars","ProfileFrame Green Bars","ProfileFrame White Bars","ProfileFrame Mixed Bars","ProfileFrame R&Y Bars","ProfileFrame B&G Bars"].map(function(){var e=Object(d.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,r(19)("./".concat(t,".png"));case 3:return e.t1=e.sent,e.abrupt("return",{name:e.t0,src:e.t1});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){console.log(e),i(e),p(e[0].src.default)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]);var b=Object(a.useCallback)((function(e){p(e.target.dataset.src)}),[p]);return Object(a.useEffect)((function(){t(m)}),[t,m]),Object(n.jsxs)("div",{className:"FrameChooser",children:[Object(n.jsx)("h2",{children:"Choose a frame:"}),s.map((function(e){var t=e.src.default,r=m===t;return Object(n.jsx)("img",{alt:e.name,"data-src":t,src:t,className:r?"frame choosen":"frame",onClick:b},t)}))]})},b=r.p+"static/media/HeaderImage.f98423dd.svg",h=r(11),g=1080;var O=function(){var e=Object(a.useState)(null),t=Object(l.a)(e,2),r=t[0],c=t[1],o=Object(a.useState)(null),s=Object(l.a)(o,2),u=s[0],m=s[1],j=Object(a.useState)(null),d=Object(l.a)(j,2),O=d[0],F=d[1],P=Object(a.useCallback)((function(e){c(e)}),[c]),v=Object(a.useCallback)((function(e){var t=new FileReader;t.onload=function(e){var t=new Image;t.onload=function(){var e=document.createElement("canvas");e.width=g,e.height=g;var r=e.getContext("2d",{alpha:!1}),n=t.height/t.width*g;r.drawImage(t,0,(g-n)/2,1080,n);var a=e.toDataURL();m(a)},t.src=e.target.result},t.readAsDataURL(e.target.files[0])}),[m]);return Object(a.useEffect)((function(){Object(h.a)([].concat(Object(i.a)(u?[u]:[]),Object(i.a)(r?[r]:[]))).then((function(e){return F(e)}))}),[u,r]),Object(n.jsxs)("div",{className:"App",children:[Object(n.jsx)("img",{src:b,className:"HeaderImage",alt:"Volt Logo"}),Object(n.jsx)("h2",{children:"Choose your Photo:"}),Object(n.jsxs)("label",{className:"labelButton",tabIndex:"0",style:{outline:"none"},children:[u?Object(n.jsx)("img",{src:u,alt:"Preview"}):null,Object(n.jsx)("span",{children:"Load Photo"}),Object(n.jsx)("input",{onChange:v,type:"file",accept:"image/*",style:{display:"none"}})]}),Object(n.jsx)(p,{onFrameChange:P}),Object(n.jsx)("h2",{children:"Download your Photo:"}),Object(n.jsx)("img",{src:O,className:"FinishedFrame",alt:"Finished Frame"}),Object(n.jsx)("button",{onClick:function(){return f()(O,"volt-profile-picture.png","image/png")},children:"Download Profile Picture"})]})},F=function(e){e&&e instanceof Function&&r.e(3).then(r.bind(null,30)).then((function(t){var r=t.getCLS,n=t.getFID,a=t.getFCP,c=t.getLCP,o=t.getTTFB;r(e),n(e),a(e),c(e),o(e)}))};s.a.render(Object(n.jsx)(c.a.StrictMode,{children:Object(n.jsx)(O,{})}),document.getElementById("root")),F()}},[[20,1,2]]]);
//# sourceMappingURL=main.0970a3bd.chunk.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
(this["webpackJsonpprofile-picture-generator"]=this["webpackJsonpprofile-picture-generator"]||[]).push([[0],{17:function(e,t,r){},19:function(e,t,r){var a={"./ProfileFrame B&G Bars.png":[21,4],"./ProfileFrame Blue Bars.png":[22,5],"./ProfileFrame Green Bars.png":[23,6],"./ProfileFrame Mixed Bars.png":[24,7],"./ProfileFrame Purple.png":[25,8],"./ProfileFrame R&Y Bars.png":[26,9],"./ProfileFrame Red Bars.png":[27,10],"./ProfileFrame White Bars.png":[28,11],"./ProfileFrame Yellow Bars.png":[29,12]};function n(e){if(!r.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],n=t[0];return r.e(t[1]).then((function(){return r(n)}))}n.keys=function(){return Object.keys(a)},n.id=19,e.exports=n},20:function(e,t,r){"use strict";r.r(t);var a=r(0),n=r(1),c=r.n(n),o=r(9),s=r.n(o),i=r(8),l=r(2),u=(r(17),r(10)),f=r.n(u),h=r(4),d=r.n(h),m=r(7);var j=function(e){var t=e.onFrameChange,c=Object(n.useState)([]),o=Object(l.a)(c,2),s=o[0],i=o[1],u=Object(n.useState)(null),f=Object(l.a)(u,2),h=f[0],j=f[1];Object(n.useEffect)((function(){function e(){return(e=Object(m.a)(d.a.mark((function e(){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Promise.all(["ProfileFrame Purple","ProfileFrame Yellow Bars","ProfileFrame Red Bars","ProfileFrame Blue Bars","ProfileFrame Green Bars","ProfileFrame White Bars","ProfileFrame Mixed Bars","ProfileFrame R&Y Bars","ProfileFrame B&G Bars"].map(function(){var e=Object(m.a)(d.a.mark((function e(t){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,r(19)("./".concat(t,".png"));case 3:return e.t1=e.sent,e.abrupt("return",{name:e.t0,src:e.t1});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){console.log(e),i(e),j(e[0].src.default)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]);var b=Object(n.useCallback)((function(e){j(e.target.dataset.src)}),[j]);return Object(n.useEffect)((function(){t(h)}),[t,h]),Object(a.jsxs)("div",{className:"FrameChooser",children:[Object(a.jsx)("h2",{children:"Choose a frame:"}),s.map((function(e){var t=e.src.default,r=h===t;return Object(a.jsx)("img",{alt:e.name,"data-src":t,src:t,className:r?"frame choosen":"frame",onClick:b},t)}))]})},b=r.p+"static/media/HeaderImage.f98423dd.svg",p=r(11),g=1080;var O=function(){var e=Object(n.useState)(null),t=Object(l.a)(e,2),r=t[0],c=t[1],o=Object(n.useState)(null),s=Object(l.a)(o,2),u=s[0],h=s[1],d=Object(n.useState)(null),m=Object(l.a)(d,2),O=m[0],F=m[1],P=Object(n.useState)(null),v=Object(l.a)(P,2),x=v[0],B=v[1],w=Object(n.useCallback)((function(e){c(e)}),[c]),C=Object(n.useCallback)((function(e){var t=new FileReader;t.onload=function(e){var t=new Image;t.onload=function(){var e=document.createElement("canvas");e.width=g,e.height=g;var r,a,n=e.getContext("2d",{alpha:!0});t.width<t.height?(a=t.height/t.width*g,r=g):(a=g,r=t.width/t.height*g),n.drawImage(t,(g-r)/2,(g-a)/2,r,a);var c=e.toDataURL();F(c)},t.src=e.target.result,h(e.target.result)},t.readAsDataURL(e.target.files[0])}),[F]);return Object(n.useEffect)((function(){Object(p.a)([].concat(Object(i.a)(O?[O]:[]),Object(i.a)(r?[r]:[]))).then((function(e){return B(e)}))}),[O,r]),Object(a.jsxs)("div",{className:"App",children:[Object(a.jsx)("img",{src:b,className:"HeaderImage",alt:"Volt Logo"}),Object(a.jsx)("h2",{children:"Choose your Photo:"}),Object(a.jsx)("p",{children:"It should best be a square image or your face in the middle. The photo is not saved and never leaves your computer."}),Object(a.jsxs)("label",{className:"labelButton",tabIndex:"0",style:{outline:"none"},children:[O?Object(a.jsx)("img",{src:u,alt:"Preview"}):null,Object(a.jsx)("span",{children:O?"Change Photo":"Load Photo"}),Object(a.jsx)("input",{onChange:C,type:"file",accept:"image/*",style:{display:"none"}})]}),Object(a.jsx)(j,{onFrameChange:w}),Object(a.jsx)("h2",{children:"Download your Photo:"}),Object(a.jsx)("img",{src:x,className:"FinishedFrame",alt:"Finished Frame"}),Object(a.jsx)("button",{onClick:function(){return f()(x,"volt-profile-picture.png","image/png")},children:"Download Profile Picture"})]})},F=function(e){e&&e instanceof Function&&r.e(3).then(r.bind(null,30)).then((function(t){var r=t.getCLS,a=t.getFID,n=t.getFCP,c=t.getLCP,o=t.getTTFB;r(e),a(e),n(e),c(e),o(e)}))};s.a.render(Object(a.jsx)(c.a.StrictMode,{children:Object(a.jsx)(O,{})}),document.getElementById("root")),F()}},[[20,1,2]]]);
//# sourceMappingURL=main.f98f9ce2.chunk.js.map

File diff suppressed because one or more lines are too long