diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 0000000..291e5a9 --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,13 @@ +{ + "files": { + "main.css": "/react-calculator/static/css/main.f59c3525.css", + "main.js": "/react-calculator/static/js/main.62e5a4e2.js", + "index.html": "/react-calculator/index.html", + "main.f59c3525.css.map": "/react-calculator/static/css/main.f59c3525.css.map", + "main.62e5a4e2.js.map": "/react-calculator/static/js/main.62e5a4e2.js.map" + }, + "entrypoints": [ + "static/css/main.f59c3525.css", + "static/js/main.62e5a4e2.js" + ] +} \ No newline at end of file diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..a11777c Binary files /dev/null and b/favicon.ico differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..8cb9976 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +React App
\ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..080d6c7 --- /dev/null +++ b/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/static/css/main.f59c3525.css b/static/css/main.f59c3525.css new file mode 100644 index 0000000..407f3df --- /dev/null +++ b/static/css/main.f59c3525.css @@ -0,0 +1,2 @@ +:root{--primary:#ffb703;--secondary:#8c38ff;--dark:#023047;--light:#eee}*{box-sizing:border-box;font-family:Montserrat,sans-serif;margin:0;padding:0}body{background-color:#eee;background-color:var(--light)}.App{align-items:center;display:flex;justify-content:center;min-height:100vh;padding:16px}.calculator{background-color:#fff;border-radius:16px;box-shadow:0 2px 64px #0003;max-width:400px;min-width:400px;overflow:hidden;width:100%}.display{background-color:#023047;background-color:var(--dark);color:#eee;color:var(--light);font-size:24px;font-weight:300;padding:16px;text-align:right}.display span{color:#888;font-size:14px}button{-webkit-appearance:none;appearance:none;border:none;color:#fff;cursor:pointer;font-size:20px;outline:none;padding:16px;transition:.4s}button:hover{opacity:.9}.operators{display:flex}.operators button{background-color:#ffb703;background-color:var(--primary);color:#9e5503;flex:1 1;font-weight:700}.operators-symbol{font-size:35px}.operators-symbol2{font-size:29px}.digits{display:flex;flex-wrap:wrap}.digits button{background-color:#023047;background-color:var(--dark);flex:1 1 33.333%;max-width:33.333%} +/*# sourceMappingURL=main.f59c3525.css.map*/ \ No newline at end of file diff --git a/static/css/main.f59c3525.css.map b/static/css/main.f59c3525.css.map new file mode 100644 index 0000000..771231a --- /dev/null +++ b/static/css/main.f59c3525.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.f59c3525.css","mappings":"AAAA,MACE,iBAAkB,CAClB,mBAAoB,CACpB,cAAe,CACf,YACF,CAEA,EAGE,qBAAsB,CACtB,iCAAqC,CAHrC,QAAS,CACT,SAGF,CAEA,KACE,qBAA8B,CAA9B,6BACF,CAEA,KAGE,kBAAmB,CAFnB,YAAa,CAGb,sBAAuB,CAFvB,gBAAiB,CAGjB,YACF,CAEA,YAIE,qBAAsB,CACtB,kBAAmB,CAEnB,2BAA2C,CAL3C,eAAgB,CAChB,eAAgB,CAGhB,eAAgB,CALhB,UAOF,CAEA,SAGE,wBAA6B,CAA7B,4BAA6B,CAC7B,UAAmB,CAAnB,kBAAmB,CACnB,cAAe,CACf,eAAgB,CALhB,YAAa,CACb,gBAKF,CAEA,cAEE,UAAW,CADX,cAEF,CAEA,OACE,uBAAgB,CAAhB,eAAgB,CAChB,WAAY,CAEZ,UAAW,CAGX,cAAe,CAFf,cAAe,CAFf,YAAa,CAGb,YAAa,CAEb,cACF,CACA,aACE,UACF,CAEA,WACE,YACF,CAEA,kBAEE,wBAAgC,CAAhC,+BAAgC,CAEhC,aAAc,CAHd,QAAY,CAEZ,eAEF,CAEA,kBACE,cACF,CAEA,mBACE,cACF,CAEA,QACE,YAAa,CACb,cACF,CAEA,eAGE,wBAA6B,CAA7B,4BAA6B,CAF7B,gBAAiB,CACjB,iBAEF","sources":["index.css"],"sourcesContent":[":root {\r\n --primary: #ffb703;\r\n --secondary: #8c38ff;\r\n --dark: #023047;\r\n --light: #eee;\r\n}\r\n\r\n* {\r\n margin: 0;\r\n padding: 0;\r\n box-sizing: border-box;\r\n font-family: \"Montserrat\", sans-serif;\r\n}\r\n\r\nbody {\r\n background-color: var(--light);\r\n}\r\n\r\n.App {\r\n display: flex;\r\n min-height: 100vh;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 16px;\r\n}\r\n\r\n.calculator {\r\n width: 100%;\r\n max-width: 400px;\r\n min-width: 400px;\r\n background-color: #fff;\r\n border-radius: 16px;\r\n overflow: hidden;\r\n box-shadow: 0px 2px 64px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.display {\r\n padding: 16px;\r\n text-align: right;\r\n background-color: var(--dark);\r\n color: var(--light);\r\n font-size: 24px;\r\n font-weight: 300;\r\n}\r\n\r\n.display span {\r\n font-size: 14px;\r\n color: #888;\r\n}\r\n\r\nbutton {\r\n appearance: none;\r\n border: none;\r\n outline: none;\r\n color: #fff;\r\n font-size: 20px;\r\n padding: 16px;\r\n cursor: pointer;\r\n transition: 0.4s;\r\n}\r\nbutton:hover {\r\n opacity: 0.9;\r\n}\r\n\r\n.operators {\r\n display: flex;\r\n}\r\n\r\n.operators button {\r\n flex: 1 1 0%;\r\n background-color: var(--primary);\r\n font-weight: 700;\r\n color: #9e5503;\r\n}\r\n\r\n.operators-symbol {\r\n font-size: 35px;\r\n}\r\n\r\n.operators-symbol2 {\r\n font-size: 29px;\r\n}\r\n\r\n.digits {\r\n display: flex;\r\n flex-wrap: wrap;\r\n}\r\n\r\n.digits button {\r\n flex: 1 1 33.333%;\r\n max-width: 33.333%;\r\n background-color: var(--dark);\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.62e5a4e2.js b/static/js/main.62e5a4e2.js new file mode 100644 index 0000000..6f80998 --- /dev/null +++ b/static/js/main.62e5a4e2.js @@ -0,0 +1,3 @@ +/*! For license information please see main.62e5a4e2.js.LICENSE.txt */ +(()=>{"use strict";var __webpack_modules__={555:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(791),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(184);const App=()=>{const[calc,setCalc]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[result,setResult]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),ops=["/","*","+","-","."],updateCalc=value=>{ops.includes(value)&&""===calc||ops.includes(value)&&ops.includes(calc.slice(-1))||(setCalc(calc+value),ops.includes(value)||setResult(eval(calc+value).toString()))},calculate=()=>{setCalc(eval(calc).toString())},deleteLast=()=>{if(""==calc)return;const e=calc.slice(0,-1);setCalc(e)},deleteAll=()=>{setCalc(""),setResult("")};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:"App",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"calculator",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"display",children:[result?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:["(",result,")"]}):"","\xa0",calc||"0"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"operators",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{className:"operators-symbol2",onClick:()=>deleteAll(),children:"C"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{className:"operators-symbol",onClick:()=>updateCalc("/"),children:"\xf7"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{className:"operators-symbol",onClick:()=>updateCalc("*"),children:"\xd7"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{className:"operators-symbol",onClick:()=>updateCalc("-"),children:"-"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{className:"operators-symbol",onClick:()=>updateCalc("+"),children:"+"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{className:"operators-symbol2",onClick:()=>deleteLast(),children:"Del"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:"digits",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("7"),children:"7"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("8"),children:"8"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("9"),children:"9"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("4"),children:"4"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("5"),children:"5"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("6"),children:"6"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("1"),children:"1"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("2"),children:"2"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("3"),children:"3"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("0"),children:"0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>updateCalc("."),children:"."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button",{onClick:()=>calculate(),children:"="})]})]})})},__WEBPACK_DEFAULT_EXPORT__=App},463:(e,n,t)=>{var r=t(791),l=t(296);function a(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t