This commit is contained in:
Yusuf İpek
2021-01-25 15:10:03 +03:00
commit 13da7b071c
17 changed files with 125 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
{
"files": {
"main.css": "/quote-machine/static/css/main.a9e04c65.chunk.css",
"main.js": "/quote-machine/static/js/main.5bb52aac.chunk.js",
"main.js.map": "/quote-machine/static/js/main.5bb52aac.chunk.js.map",
"runtime-main.js": "/quote-machine/static/js/runtime-main.d0d4c421.js",
"runtime-main.js.map": "/quote-machine/static/js/runtime-main.d0d4c421.js.map",
"static/css/2.150d169a.chunk.css": "/quote-machine/static/css/2.150d169a.chunk.css",
"static/js/2.cc152759.chunk.js": "/quote-machine/static/js/2.cc152759.chunk.js",
"static/js/2.cc152759.chunk.js.map": "/quote-machine/static/js/2.cc152759.chunk.js.map",
"static/js/3.5113abf0.chunk.js": "/quote-machine/static/js/3.5113abf0.chunk.js",
"static/js/3.5113abf0.chunk.js.map": "/quote-machine/static/js/3.5113abf0.chunk.js.map",
"index.html": "/quote-machine/index.html",
"static/css/2.150d169a.chunk.css.map": "/quote-machine/static/css/2.150d169a.chunk.css.map",
"static/css/main.a9e04c65.chunk.css.map": "/quote-machine/static/css/main.a9e04c65.chunk.css.map",
"static/js/2.cc152759.chunk.js.LICENSE.txt": "/quote-machine/static/js/2.cc152759.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.d0d4c421.js",
"static/css/2.150d169a.chunk.css",
"static/js/2.cc152759.chunk.js",
"static/css/main.a9e04c65.chunk.css",
"static/js/main.5bb52aac.chunk.js"
]
}
+1
View File
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="manifest" href="/quote-machine/manifest.json"/><title>Quote Machine</title><link href="/quote-machine/static/css/2.150d169a.chunk.css" rel="stylesheet"><link href="/quote-machine/static/css/main.a9e04c65.chunk.css" rel="stylesheet"></head><body><script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,a,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)a=i[s],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&p.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,i=1;i<r.length;i++){var c=r[i];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={1:0},u=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+"static/js/"+({}[e]||e)+"."+{3:"5113abf0"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/quote-machine/",a.oe=function(e){throw console.error(e),e};var i=this["webpackJsonpquote-machine"]=this["webpackJsonpquote-machine"]||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var f=c;r()}([])</script><script src="/quote-machine/static/js/2.cc152759.chunk.js"></script><script src="/quote-machine/static/js/main.5bb52aac.chunk.js"></script></body></html>
+25
View File
@@ -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"
}
+3
View File
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.wrapper{display:flex;justify-content:center;align-content:center;height:950px}.wrapper #quote-box{display:flexbox;align-self:center;color:#fff;width:800px;height:400px;border:1px solid grey;border-radius:5px;padding:10px}.wrapper .writing{padding-top:130px;height:150px;text-align:center}.wrapper #new-quote,.wrapper #tweet{margin-top:100px;float:right}.wrapper #tweet{margin-right:15px}.wrapper a:active,.wrapper a:link,.wrapper a:visited{color:#fff}
/*# sourceMappingURL=main.a9e04c65.chunk.css.map */
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["webpack://src/index.css","webpack://src/components/quote-box/quote-box-styles.scss"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF,CCZA,SACE,YAAA,CACA,sBAAA,CACA,oBAAA,CACA,YAAA,CAEA,oBACE,eAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,qBAAA,CACA,iBAAA,CACA,YAAA,CAGF,kBACE,iBAAA,CACA,YAAA,CACA,iBAAA,CAQF,oCAJE,gBAAA,CACA,WAMA,CAHF,gBAGE,iBAAA,CASF,qDACE,UAAA","file":"main.a9e04c65.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -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\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".wrapper {\n display: flex;\n justify-content: center;\n align-content: center;\n height: 950px;\n\n #quote-box {\n display: flexbox;\n align-self: center;\n color: white;\n width: 800px;\n height: 400px;\n border: 1px solid grey;\n border-radius: 5px;\n padding: 10px;\n }\n\n .writing {\n padding-top: 130px;\n height: 150px;\n text-align: center;\n }\n\n #new-quote {\n margin-top: 100px;\n float: right;\n }\n\n #tweet {\n float: right;\n margin-top: 100px;\n margin-right: 15px;\n }\n\n a:link {\n color: white;\n }\n a:visited {\n color: white;\n } /* visited link */\n a:active {\n color: white;\n }\n}\n"]}
File diff suppressed because one or more lines are too long
+47
View File
@@ -0,0 +1,47 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/** @license React v0.20.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
(this["webpackJsonpquote-machine"]=this["webpackJsonpquote-machine"]||[]).push([[3],{23:function(t,n,e){"use strict";e.r(n),e.d(n,"getCLS",(function(){return m})),e.d(n,"getFCP",(function(){return g})),e.d(n,"getFID",(function(){return h})),e.d(n,"getLCP",(function(){return y})),e.d(n,"getTTFB",(function(){return F}));var i,a,r=function(){return"".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)},o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:n,delta:0,entries:[],id:r(),isFinal:!1}},u=function(t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var e=new PerformanceObserver((function(t){return t.getEntries().map(n)}));return e.observe({type:t,buffered:!0}),e}}catch(t){}},c=!1,s=!1,d=function(t){c=!t.persisted},f=function(){addEventListener("pagehide",d),addEventListener("beforeunload",(function(){}))},p=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s||(f(),s=!0),addEventListener("visibilitychange",(function(n){var e=n.timeStamp;"hidden"===document.visibilityState&&t({timeStamp:e,isUnloading:c})}),{capture:!0,once:n})},l=function(t,n,e,i){var a;return function(){e&&n.isFinal&&e.disconnect(),n.value>=0&&(i||n.isFinal||"hidden"===document.visibilityState)&&(n.delta=n.value-(a||0),(n.delta||n.isFinal||void 0===a)&&(t(n),a=n.value))}},m=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=o("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),n())},r=u("layout-shift",a);r&&(n=l(t,i,r,e),p((function(t){var e=t.isUnloading;r.takeRecords().map(a),e&&(i.isFinal=!0),n()})))},v=function(){return void 0===i&&(i="hidden"===document.visibilityState?0:1/0,p((function(t){var n=t.timeStamp;return i=n}),!0)),{get timeStamp(){return i}}},g=function(t){var n,e=o("FCP"),i=v(),a=u("paint",(function(t){"first-contentful-paint"===t.name&&t.startTime<i.timeStamp&&(e.value=t.startTime,e.isFinal=!0,e.entries.push(t),n())}));a&&(n=l(t,e,a))},h=function(t){var n=o("FID"),e=v(),i=function(t){t.startTime<e.timeStamp&&(n.value=t.processingStart-t.startTime,n.entries.push(t),n.isFinal=!0,r())},a=u("first-input",i),r=l(t,n,a);a?p((function(){a.takeRecords().map(i),a.disconnect()}),!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay((function(t,i){i.timeStamp<e.timeStamp&&(n.value=t,n.isFinal=!0,n.entries=[{entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+t}],r())}))},S=function(){return a||(a=new Promise((function(t){return["scroll","keydown","pointerdown"].map((function(n){addEventListener(n,t,{once:!0,passive:!0,capture:!0})}))}))),a},y=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=o("LCP"),a=v(),r=function(t){var e=t.startTime;e<a.timeStamp?(i.value=e,i.entries.push(t)):i.isFinal=!0,n()},c=u("largest-contentful-paint",r);if(c){n=l(t,i,c,e);var s=function(){i.isFinal||(c.takeRecords().map(r),i.isFinal=!0,n())};S().then(s),p(s,!0)}},F=function(t){var n,e=o("TTFB");n=function(){try{var n=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,n={entryType:"navigation",startTime:0};for(var e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n}();e.value=e.delta=n.responseStart,e.entries=[n],e.isFinal=!0,t(e)}catch(t){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("pageshow",n)}}}]);
//# sourceMappingURL=3.5113abf0.chunk.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
(this["webpackJsonpquote-machine"]=this["webpackJsonpquote-machine"]||[]).push([[0],{17:function(t,e,n){},18:function(t,e,n){},21:function(t,e,n){},22:function(t,e,n){"use strict";n.r(e);var a=n(1),r=n(0),s=n.n(r),c=n(9),i=n.n(c),o=(n(17),n(2)),u=n(3),h=n(5),d=n(4),l=(n(18),n(7)),f=n.n(l),b=n(10),j=n(11),p=(n(20),function(t){return Object(a.jsx)(j.a,{variant:t.variant,target:t.target,onClick:t.click,children:t.text})}),x=(n(21),function(t){Object(h.a)(n,t);var e=Object(d.a)(n);function n(t){var a;return Object(o.a)(this,n),(a=e.call(this,t)).random=function(){return Math.floor(1600*Math.random())},a.random2=function(){return Math.floor(4*Math.random())},a.handleChange=function(){var t=a.random();a.setState({displayQuote:a.state.quotes[t].text,displayAuthor:a.state.quotes[t].author}),a.props.handler(a.state.backGroundApp[a.random2()])},a.state={quotes:null,displayQuote:null,displayAuthor:null,color:["#264653","#2a9d8f","#e76f51","#e63946","#bc6c25"],backGroundApp:["#ffadad","#ffd6a5","#caffbf","#9bf6ff","#a0c4ff","#ffc6ff"]},a}return Object(u.a)(n,[{key:"componentDidMount",value:function(){var t=Object(b.a)(f.a.mark((function t(){var e,n,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("https://type.fit/api/quotes");case 2:return e=t.sent,t.next=5,e.json();case 5:n=t.sent,this.setState({quotes:n}),a=this.random(),this.setState({displayQuote:this.state.quotes[a].text,displayAuthor:this.state.quotes[a].author});case 9:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"render",value:function(){return this.state.quotes?Object(a.jsx)("div",{className:"wrapper",children:Object(a.jsxs)("div",{id:"quote-box",style:{transition:"background-color 0.3s ease",backgroundColor:this.state.color[this.random2()]},children:[Object(a.jsxs)("div",{className:"writing",children:[Object(a.jsx)("h3",{id:"text",children:this.state.displayQuote}),Object(a.jsx)("p",{id:"author",children:this.state.displayAuthor})]}),Object(a.jsx)("div",{id:"new-quote",children:Object(a.jsx)(p,{click:this.handleChange,text:"New Quote",variant:"success"})}),Object(a.jsx)("div",{id:"tweet",children:Object(a.jsx)(p,{href:"https://twitter.com/intent/tweet?text=".concat(this.state.displayQuote," \n \n ").concat(this.state.displayAuthor),text:Object(a.jsx)("a",{id:"tweet-quote",target:"_blank",rel:"noreferrer",href:"https://twitter.com/intent/tweet?text=".concat(this.state.displayQuote," \n \n ").concat(this.state.displayAuthor),children:"Tweet"}),variant:"primary"})})]})}):Object(a.jsx)("div",{children:Object(a.jsx)("h1",{style:{textAlign:"center"},children:"Loading..."})})}}]),n}(s.a.Component)),O=function(t){Object(h.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(o.a)(this,n),(t=e.call(this)).bgChange=function(e){t.setState({backG:e})},t.state={backG:"#2a9d8f"},t}return Object(u.a)(n,[{key:"render",value:function(){return Object(a.jsx)("div",{className:"App",style:{transition:"background-color 0.3s ease",backgroundColor:this.state.backG},children:Object(a.jsx)(x,{id:"quote",handler:this.bgChange})})}}]),n}(r.Component),v=function(t){t&&t instanceof Function&&n.e(3).then(n.bind(null,23)).then((function(e){var n=e.getCLS,a=e.getFID,r=e.getFCP,s=e.getLCP,c=e.getTTFB;n(t),a(t),r(t),s(t),c(t)}))};i.a.render(Object(a.jsx)(s.a.StrictMode,{children:Object(a.jsx)(O,{})}),document.getElementById("root")),v()}},[[22,1,2]]]);
//# sourceMappingURL=main.5bb52aac.chunk.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
!function(e){function t(t){for(var n,a,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)a=i[s],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&p.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,i=1;i<r.length;i++){var c=r[i];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={1:0},u=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+"static/js/"+({}[e]||e)+"."+{3:"5113abf0"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/quote-machine/",a.oe=function(e){throw console.error(e),e};var i=this["webpackJsonpquote-machine"]=this["webpackJsonpquote-machine"]||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var f=c;r()}([]);
//# sourceMappingURL=runtime-main.d0d4c421.js.map
File diff suppressed because one or more lines are too long