From 5ef5e70118b0957dfa57183e31bd3729e0f0ae41 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Mon, 6 Apr 2020 03:19:43 -0700 Subject: [PATCH] update random-quote-machine --- .../build/asset-manifest.json | 14 +++---- random-quote-machine/build/index.html | 2 +- ...ifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js} | 10 ++--- random-quote-machine/build/service-worker.js | 2 +- .../build/static/css/main.5a3875ee.chunk.css | 2 + .../static/css/main.5a3875ee.chunk.css.map | 1 + .../build/static/css/main.899e3888.chunk.css | 2 - .../static/css/main.899e3888.chunk.css.map | 1 - .../build/static/js/main.13413d36.chunk.js | 2 + .../static/js/main.13413d36.chunk.js.map | 1 + .../build/static/js/main.b6838136.chunk.js | 2 - .../static/js/main.b6838136.chunk.js.map | 1 - random-quote-machine/src/App.css | 6 +-- random-quote-machine/src/NewQuote.css | 26 ++++++++++--- random-quote-machine/src/NewQuote.js | 6 +-- random-quote-machine/src/QuoteBox.css | 38 +++++++++++++++--- random-quote-machine/src/QuoteBox.js | 4 ++ random-quote-machine/src/TextAuthor.css | 23 +++++++++-- random-quote-machine/src/TextAuthor.js | 2 +- random-quote-machine/src/TweetQuote.css | 39 +++++++++++-------- random-quote-machine/src/TweetQuote.js | 18 ++------- 21 files changed, 128 insertions(+), 74 deletions(-) rename random-quote-machine/build/{precache-manifest.00884933380590505cabd88c9e1af2d6.js => precache-manifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js} (79%) create mode 100644 random-quote-machine/build/static/css/main.5a3875ee.chunk.css create mode 100644 random-quote-machine/build/static/css/main.5a3875ee.chunk.css.map delete mode 100644 random-quote-machine/build/static/css/main.899e3888.chunk.css delete mode 100644 random-quote-machine/build/static/css/main.899e3888.chunk.css.map create mode 100644 random-quote-machine/build/static/js/main.13413d36.chunk.js create mode 100644 random-quote-machine/build/static/js/main.13413d36.chunk.js.map delete mode 100644 random-quote-machine/build/static/js/main.b6838136.chunk.js delete mode 100644 random-quote-machine/build/static/js/main.b6838136.chunk.js.map diff --git a/random-quote-machine/build/asset-manifest.json b/random-quote-machine/build/asset-manifest.json index 0c15088..1b9f7c8 100644 --- a/random-quote-machine/build/asset-manifest.json +++ b/random-quote-machine/build/asset-manifest.json @@ -1,22 +1,22 @@ { "files": { - "main.css": "/fcc-challenges/random-quote-machine/build/static/css/main.899e3888.chunk.css", - "main.js": "/fcc-challenges/random-quote-machine/build/static/js/main.b6838136.chunk.js", - "main.js.map": "/fcc-challenges/random-quote-machine/build/static/js/main.b6838136.chunk.js.map", + "main.css": "/fcc-challenges/random-quote-machine/build/static/css/main.5a3875ee.chunk.css", + "main.js": "/fcc-challenges/random-quote-machine/build/static/js/main.13413d36.chunk.js", + "main.js.map": "/fcc-challenges/random-quote-machine/build/static/js/main.13413d36.chunk.js.map", "runtime-main.js": "/fcc-challenges/random-quote-machine/build/static/js/runtime-main.905bafdb.js", "runtime-main.js.map": "/fcc-challenges/random-quote-machine/build/static/js/runtime-main.905bafdb.js.map", "static/js/2.a720d7f8.chunk.js": "/fcc-challenges/random-quote-machine/build/static/js/2.a720d7f8.chunk.js", "static/js/2.a720d7f8.chunk.js.map": "/fcc-challenges/random-quote-machine/build/static/js/2.a720d7f8.chunk.js.map", "index.html": "/fcc-challenges/random-quote-machine/build/index.html", - "precache-manifest.00884933380590505cabd88c9e1af2d6.js": "/fcc-challenges/random-quote-machine/build/precache-manifest.00884933380590505cabd88c9e1af2d6.js", + "precache-manifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js": "/fcc-challenges/random-quote-machine/build/precache-manifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js", "service-worker.js": "/fcc-challenges/random-quote-machine/build/service-worker.js", - "static/css/main.899e3888.chunk.css.map": "/fcc-challenges/random-quote-machine/build/static/css/main.899e3888.chunk.css.map", + "static/css/main.5a3875ee.chunk.css.map": "/fcc-challenges/random-quote-machine/build/static/css/main.5a3875ee.chunk.css.map", "static/js/2.a720d7f8.chunk.js.LICENSE.txt": "/fcc-challenges/random-quote-machine/build/static/js/2.a720d7f8.chunk.js.LICENSE.txt" }, "entrypoints": [ "static/js/runtime-main.905bafdb.js", "static/js/2.a720d7f8.chunk.js", - "static/css/main.899e3888.chunk.css", - "static/js/main.b6838136.chunk.js" + "static/css/main.5a3875ee.chunk.css", + "static/js/main.13413d36.chunk.js" ] } \ No newline at end of file diff --git a/random-quote-machine/build/index.html b/random-quote-machine/build/index.html index 6af3908..f1a6739 100644 --- a/random-quote-machine/build/index.html +++ b/random-quote-machine/build/index.html @@ -1 +1 @@ -Random Quote Machine - Build a Random Quote Machine - Front End Libraries Projects

\ No newline at end of file +Random Quote Machine - Build a Random Quote Machine - Front End Libraries Projects

\ No newline at end of file diff --git a/random-quote-machine/build/precache-manifest.00884933380590505cabd88c9e1af2d6.js b/random-quote-machine/build/precache-manifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js similarity index 79% rename from random-quote-machine/build/precache-manifest.00884933380590505cabd88c9e1af2d6.js rename to random-quote-machine/build/precache-manifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js index bc8b280..1773e25 100644 --- a/random-quote-machine/build/precache-manifest.00884933380590505cabd88c9e1af2d6.js +++ b/random-quote-machine/build/precache-manifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js @@ -1,11 +1,11 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "6a2813c9c6957d8e6199403c5c886df0", + "revision": "99ef77b17413e6450fa3790ae1af27ad", "url": "/fcc-challenges/random-quote-machine/build/index.html" }, { - "revision": "048b92ff9f1302b8fcae", - "url": "/fcc-challenges/random-quote-machine/build/static/css/main.899e3888.chunk.css" + "revision": "cccf938117650c611ad2", + "url": "/fcc-challenges/random-quote-machine/build/static/css/main.5a3875ee.chunk.css" }, { "revision": "d3143f0d5b138769b7fe", @@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/fcc-challenges/random-quote-machine/build/static/js/2.a720d7f8.chunk.js.LICENSE.txt" }, { - "revision": "048b92ff9f1302b8fcae", - "url": "/fcc-challenges/random-quote-machine/build/static/js/main.b6838136.chunk.js" + "revision": "cccf938117650c611ad2", + "url": "/fcc-challenges/random-quote-machine/build/static/js/main.13413d36.chunk.js" }, { "revision": "eb03df68ff6e16ade204", diff --git a/random-quote-machine/build/service-worker.js b/random-quote-machine/build/service-worker.js index f24b7f6..c762e1c 100644 --- a/random-quote-machine/build/service-worker.js +++ b/random-quote-machine/build/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/fcc-challenges/random-quote-machine/build/precache-manifest.00884933380590505cabd88c9e1af2d6.js" + "/fcc-challenges/random-quote-machine/build/precache-manifest.46f3e4e9f0fc0a551e5d11c3cf0c4b89.js" ); self.addEventListener('message', (event) => { diff --git a/random-quote-machine/build/static/css/main.5a3875ee.chunk.css b/random-quote-machine/build/static/css/main.5a3875ee.chunk.css new file mode 100644 index 0000000..0ec26cc --- /dev/null +++ b/random-quote-machine/build/static/css/main.5a3875ee.chunk.css @@ -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}.App{text-align:center}.App-header{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.blue-background{color:#fff}.yellow-background{color:#000}.QuoteBox{background-color:#fff;text-align:center;max-width:80%;max-height:60vh;width:800px;height:500px;border-radius:10px;box-shadow:4px 3px #000}.red-complimentary-background{background-color:#006aff;color:#fff}.blue-complimentary-background{background-color:#ff1500;color:#fff}.yellow-complimentary-background{background-color:#9400ff;color:#000}.quote-box-top{height:20%}.quote-box-middle{height:40%;display:flex;flex-direction:column;justify-content:space-around}.quote-box-bottom{height:40%;display:flex;flex-direction:row;justify-content:flex-start}.quote-box-underneath{height:0%}.quote-box-bottom-left,.quote-box-bottom-right{width:50%;display:flex;flex-direction:row;justify-content:space-around}@media (orientation:portrait) and (max-device-width:767px){.QuoteBox{max-height:60vh}.quote-box-top{height:10%}.quote-box-middle{height:50%}.quote-box-bottom{height:40%}.quote-box-underneath{height:0%}}.NewQuote{text-align:center;height:45%;width:45%;border:none;border-radius:5px;font-size:.8em;font-weight:700;margin:auto}.NewQuote:focus{outline:0}@media (orientation:portrait) and (max-device-width:767px){.NewQuote{height:40%}}@media (orientation:landscape) and (max-device-height:450px){.NewQuote{height:60%;font-size:1em}}.TweetQuote{height:45%;width:45%;border:none;border-radius:5px;font-size:2.2em;font-weight:700;display:flex;flex-direction:column;margin:auto}.TweetQuote:focus{outline:0}.red-background{background-color:#ff1500;color:#000}.blue-background{background-color:#006aff;color:#eaff00}.yellow-background{background-color:#eaff00;color:#006bff}.TweetQuote>a{margin:auto}@media (orientation:portrait) and (max-device-width:767px){.TweetQuote{height:40%}}@media (orientation:landscape) and (max-device-height:450px){.TweetQuote{height:60%}}.red{color:#00ff94}.blue,.yellow{color:#fff}.text{font-weight:700}.author,.text{margin-left:10%;margin-right:10%}.author{font-style:oblique}p{font-size:.7em;margin:auto}@media (orientation:portrait) and (max-device-width:767px){p{font-size:.9em}}@media (orientation:landscape) and (max-device-height:450px){p{font-size:.9em}} +/*# sourceMappingURL=main.5a3875ee.chunk.css.map */ \ No newline at end of file diff --git a/random-quote-machine/build/static/css/main.5a3875ee.chunk.css.map b/random-quote-machine/build/static/css/main.5a3875ee.chunk.css.map new file mode 100644 index 0000000..8a3578a --- /dev/null +++ b/random-quote-machine/build/static/css/main.5a3875ee.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["index.css","App.css","QuoteBox.css","NewQuote.css","TweetQuote.css","TextAuthor.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF,CCZA,KACE,iBACF,CAEA,YACE,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BACF,CAOA,iBAEE,UACF,CAEA,mBAEE,UACF,CC1BA,UACE,qBAAuB,CACvB,iBAAkB,CAClB,aAAc,CACd,eAAgB,CAChB,WAAY,CACZ,YAAa,CACb,kBAAmB,CACnB,uBACF,CAEA,8BACE,wBAAyB,CACzB,UACF,CAEA,+BACE,wBAAyB,CACzB,UACF,CAEA,iCACE,wBAAyB,CACzB,UACF,CAEA,eACE,UACF,CAEA,kBACE,UAAW,CACX,YAAa,CACb,qBAAsB,CACtB,4BACF,CAEA,kBACE,UAAW,CACX,YAAa,CACb,kBAAmB,CACnB,0BACF,CAEA,sBACE,SACF,CASA,+CACE,SAAU,CACV,YAAa,CACb,kBAAmB,CACnB,4BACF,CAEA,2DACE,UACE,eACF,CACA,eACE,UACF,CACA,kBACE,UACF,CACA,kBACE,UACF,CACA,sBACE,SACF,CACF,CC9EA,UACE,iBAAkB,CAClB,UAAW,CACX,SAAU,CACV,WAAY,CACZ,iBAAkB,CAClB,cAAgB,CAChB,eAAiB,CACjB,WACF,CAEA,gBACE,SACF,CAiBA,2DACE,UACE,UACF,CACF,CAEA,6DACE,UACE,UAAW,CACb,aACA,CACF,CCzCA,YACE,UAAW,CACX,SAAU,CACV,WAAY,CACZ,iBAAkB,CAClB,eAAgB,CAChB,eAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,WACF,CAEA,kBACE,SACF,CAEA,gBACE,wBAAyB,CACzB,UACF,CAEA,iBACE,wBAAyB,CACzB,aACF,CAEA,mBACE,wBAAyB,CACzB,aACF,CAEA,cACE,WACF,CAEA,2DACE,YACE,UACF,CACF,CAEA,6DACE,YACE,UACF,CACF,CC7CA,KACE,aACF,CAMA,cACE,UACF,CAEA,MAGE,eACF,CAEA,cALE,eAAgB,CAChB,gBAQF,CAJA,QAGE,kBACF,CAEA,EACE,cAAe,CACf,WACF,CAEA,2DACE,EACE,cACF,CACF,CAEA,6DACE,EACE,cACF,CACF","file":"main.5a3875ee.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",".App {\n text-align: center;\n}\n\n.App-header {\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}\n\n.red-background {\n background-color: #ff1500;\n color: black;\n}\n\n.blue-background {\n background-color: #006aff;\n color: white;\n}\n\n.yellow-background {\n background-color: #eaff00;\n color: black;\n}\n",".QuoteBox {\n background-color: white;\n text-align: center;\n max-width: 80%;\n max-height: 60vh;\n width: 800px;\n height: 500px;\n border-radius: 10px;\n box-shadow: 4px 3px black;\n}\n\n.red-complimentary-background {\n background-color: #006aff;\n color: white;\n}\n\n.blue-complimentary-background {\n background-color: #ff1500;\n color: white;\n}\n\n.yellow-complimentary-background {\n background-color: #9400ff;\n color: black;\n}\n\n.quote-box-top {\n height: 20%;\n}\n\n.quote-box-middle {\n height: 40%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n}\n\n.quote-box-bottom {\n height: 40%;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n}\n\n.quote-box-underneath {\n height: 0%;\n}\n\n.quote-box-bottom-left {\n width: 50%;\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n}\n\n.quote-box-bottom-right {\n width: 50%;\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n}\n\n@media (orientation: portrait) and (max-device-width: 767px) {\n .QuoteBox {\n max-height: 60vh;\n }\n .quote-box-top {\n height: 10%;\n }\n .quote-box-middle {\n height: 50%;\n }\n .quote-box-bottom {\n height: 40%;\n }\n .quote-box-underneath {\n height: 0%;\n }\n}\n",".NewQuote {\n text-align: center;\n height: 45%;\n width: 45%;\n border: none;\n border-radius: 5px;\n font-size: 0.8em;\n font-weight: bold;\n margin: auto;\n}\n\n.NewQuote:focus {\n outline: 0;\n}\n\n.red-background {\n background-color: #ff1500;\n color: #000000;\n}\n\n.blue-background {\n background-color: #006Aff;\n color: #eaff00;\n}\n\n.yellow-background {\n background-color: #eaff00;\n color: #006bff;\n}\n\n@media (orientation: portrait) and (max-device-width: 767px) {\n .NewQuote {\n height: 40%;\n }\n}\n\n@media (orientation: landscape) and (max-device-height: 450px) {\n .NewQuote {\n height: 60%;\n font-size: 1em;\n }\n}\n",".TweetQuote {\n height: 45%;\n width: 45%;\n border: none;\n border-radius: 5px;\n font-size: 2.2em;\n font-weight: bold;\n display: flex;\n flex-direction: column;\n margin: auto;\n}\n\n.TweetQuote:focus {\n outline: 0;\n}\n\n.red-background {\n background-color: #ff1500;\n color: #000000;\n}\n\n.blue-background {\n background-color: #006aff;\n color: #eaff00;\n}\n\n.yellow-background {\n background-color: #eaff00;\n color: #006bff;\n}\n\n.TweetQuote > a {\n margin: auto;\n}\n\n@media (orientation: portrait) and (max-device-width: 767px) {\n .TweetQuote {\n height: 40%;\n }\n}\n\n@media (orientation: landscape) and (max-device-height: 450px) {\n .TweetQuote {\n height: 60%;\n }\n}\n",".red {\n color: #00ff94;\n}\n\n.blue {\n color: white;\n}\n\n.yellow {\n color: white;\n}\n\n.text {\n margin-left: 10%;\n margin-right: 10%;\n font-weight: bold;\n}\n\n.author {\n margin-left: 10%;\n margin-right: 10%;\n font-style: oblique;\n}\n\np {\n font-size: .7em;\n margin: auto;\n}\n\n@media (orientation: portrait) and (max-device-width: 767px) {\n p {\n font-size: .9em;\n }\n}\n\n@media (orientation: landscape) and (max-device-height: 450px) {\n p {\n font-size: .9em;\n }\n}\n"]} \ No newline at end of file diff --git a/random-quote-machine/build/static/css/main.899e3888.chunk.css b/random-quote-machine/build/static/css/main.899e3888.chunk.css deleted file mode 100644 index 3cbf63c..0000000 --- a/random-quote-machine/build/static/css/main.899e3888.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -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}.App{text-align:center}.App-header{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin)}.blue-background{color:#fff}.yellow-background{color:#000}.QuoteBox{background-color:#fff;text-align:center;max-width:80%;max-height:60vh;width:500px;height:500px;border-radius:10px;box-shadow:4px 3px #000}.red-complimentary-background{background-color:#0080ff;color:#fff}.blue-complimentary-background{background-color:#7fff00;color:#fff}.yellow-complimentary-background{background-color:#8000ff;color:#000}.quote-box-top{height:70%;display:flex;flex-direction:column;justify-content:space-around}.quote-box-bottom{height:30%;display:flex;flex-direction:row;justify-content:flex-start}.quote-box-bottom-left,.quote-box-bottom-right{width:50%;display:flex;flex-direction:row;justify-content:space-around}.NewQuote{text-align:center;height:60%;width:45%;border:none;border-radius:5px;font-size:.8em;font-weight:700}.NewQuote:focus{outline:0}.TweetQuote{height:60%;width:45%;border:none;border-radius:5px;font-size:2.2em;font-weight:700;display:flex;flex-direction:column;justify-content:center;align-content:center}.tweetQuoteContainer{height:100%;width:100%;display:flex;flex-direction:row;justify-content:space-around}.TweetQuote:focus{outline:0}.red-background{background-color:red;color:#000}.blue-background{background-color:#00f;color:#ff8000}.yellow-background{background-color:#ff0;color:#0080ff}.red{color:#00ff80}.blue{color:#00f}.yellow{color:#ff0}.text{font-weight:700}.author,.text{margin-left:10%;margin-right:10%}.author{font-style:oblique} -/*# sourceMappingURL=main.899e3888.chunk.css.map */ \ No newline at end of file diff --git a/random-quote-machine/build/static/css/main.899e3888.chunk.css.map b/random-quote-machine/build/static/css/main.899e3888.chunk.css.map deleted file mode 100644 index 4a465e1..0000000 --- a/random-quote-machine/build/static/css/main.899e3888.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.css","App.css","QuoteBox.css","NewQuote.css","TweetQuote.css","TextAuthor.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF,CCZA,KACE,iBACF,CAEA,YACE,gBAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,sBAAuB,CACvB,4BACF,CAOA,iBAEE,UACF,CAEA,mBAEE,UACF,CC1BA,UACE,qBAAuB,CACvB,iBAAkB,CAClB,aAAc,CACd,eAAgB,CAChB,WAAY,CACZ,YAAa,CACb,kBAAmB,CACnB,uBACF,CAEA,8BACE,wBAAyB,CACzB,UACF,CAEA,+BACE,wBAAyB,CACzB,UACF,CAEA,iCACE,wBAAyB,CACzB,UACF,CAEA,eACE,UAAW,CACX,YAAa,CACb,qBAAsB,CACtB,4BACF,CAEA,kBACE,UAAW,CACX,YAAa,CACb,kBAAmB,CACnB,0BACF,CASA,+CACE,SAAU,CACV,YAAa,CACb,kBAAmB,CACnB,4BACF,CCpDA,UACE,iBAAkB,CAClB,UAAW,CACX,SAAU,CACV,WAAY,CACZ,iBAAkB,CAClB,cAAgB,CAChB,eACF,CAEA,gBACE,SACF,CCZA,YACE,UAAW,CACX,SAAU,CACV,WAAY,CACZ,iBAAkB,CAClB,eAAgB,CAChB,eAAiB,CACjB,YAAa,CACb,qBAAsB,CACtB,sBAAuB,CACvB,oBACF,CAEA,qBACE,WAAY,CACZ,UAAW,CACX,YAAa,CACb,kBAAmB,CACnB,4BACF,CAEA,kBACE,SACF,CAEA,gBACE,oBAAyB,CACzB,UACF,CAEA,iBACE,qBAAyB,CACzB,aACF,CAEA,mBACE,qBAAyB,CACzB,aACF,CCtCA,KACE,aACF,CAEA,MACE,UACF,CAEA,QACE,UACF,CAEA,MAGE,eACF,CAEA,cALE,eAAgB,CAChB,gBAQF,CAJA,QAGE,kBACF","file":"main.899e3888.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",".App {\n text-align: center;\n}\n\n.App-header {\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}\n\n.red-background {\n background-color: #ff0000;\n color: black;\n}\n\n.blue-background {\n background-color: #0000ff;\n color: white;\n}\n\n.yellow-background {\n background-color: #ffff00;\n color: black;\n}\n",".QuoteBox {\n background-color: white;\n text-align: center;\n max-width: 80%;\n max-height: 60vh;\n width: 500px;\n height: 500px;\n border-radius: 10px;\n box-shadow: 4px 3px black;\n}\n\n.red-complimentary-background {\n background-color: #0080ff;\n color: white;\n}\n\n.blue-complimentary-background {\n background-color: #7fff00;\n color: white;\n}\n\n.yellow-complimentary-background {\n background-color: #8000ff;\n color: black;\n}\n\n.quote-box-top {\n height: 70%;\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n}\n\n.quote-box-bottom {\n height: 30%;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n}\n\n.quote-box-bottom-left {\n width: 50%;\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n}\n\n.quote-box-bottom-right {\n width: 50%;\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n}\n",".NewQuote {\n text-align: center;\n height: 60%;\n width: 45%;\n border: none;\n border-radius: 5px;\n font-size: 0.8em;\n font-weight: bold;\n}\n\n.NewQuote:focus {\n outline: 0;\n}\n\n.red-background {\n background-color: #ff0000;\n color: #000000;\n}\n\n.blue-background {\n background-color: #0000ff;\n color: #ff8000;\n}\n\n.yellow-background {\n background-color: #ffff00;\n color: #0080ff;\n}\n",".TweetQuote {\n height: 60%;\n width: 45%;\n border: none;\n border-radius: 5px;\n font-size: 2.2em;\n font-weight: bold;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n\n.tweetQuoteContainer {\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n}\n\n.TweetQuote:focus {\n outline: 0;\n}\n\n.red-background {\n background-color: #ff0000;\n color: #000000;\n}\n\n.blue-background {\n background-color: #0000ff;\n color: #ff8000;\n}\n\n.yellow-background {\n background-color: #ffff00;\n color: #0080ff;\n}\n",".red {\n color: #00ff80;\n}\n\n.blue {\n color: #0000ff;\n}\n\n.yellow {\n color: #ffff00;\n}\n\n.text {\n margin-left: 10%;\n margin-right: 10%;\n font-weight: bold;\n}\n\n.author {\n margin-left: 10%;\n margin-right: 10%;\n font-style: oblique;\n}\n"]} \ No newline at end of file diff --git a/random-quote-machine/build/static/js/main.13413d36.chunk.js b/random-quote-machine/build/static/js/main.13413d36.chunk.js new file mode 100644 index 0000000..5d656c1 --- /dev/null +++ b/random-quote-machine/build/static/js/main.13413d36.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonprandom-quote-machine"]=this["webpackJsonprandom-quote-machine"]||[]).push([[0],{21:function(e,t,n){e.exports=n(39)},30:function(e,t,n){},31:function(e,t,n){},32:function(e,t,n){},33:function(e,t,n){},37:function(e,t,n){},38:function(e,t,n){},39:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),a=n(10),c=n.n(a),u=n(2),i=n(8),l=n(18),s=function(){return function(e){e({type:"REQUESTING_QUOTE"}),fetch("https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json").then((function(e){return e.json()})).then((function(t){e({type:"RECEIVED_QUOTE",newQuote:t.quotes[Math.floor(Math.random()*t.quotes.length)]})}))}},p=Object(i.c)({colorCount:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INCCOLORCOUNT":return t.count;default:return e}},newQuote:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{fetching:!1,quote:""},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUESTING_QUOTE":return{fetching:!0,quote:""};case"RECEIVED_QUOTE":return{fetching:!1,quote:t.newQuote};default:return e}}}),b=Object(i.d)(p,Object(i.a)(l.a)),h=(n(30),n(3)),d=n(4),m=n(5),f=n(6),O=n(7),v=(n(31),n(32),n(11)),j=(n(33),function(e){Object(f.a)(n,e);var t=Object(m.a)(n);function n(e){var o;return Object(h.a)(this,n),(o=t.call(this,e)).handleClick=o.handleClick.bind(Object(v.a)(o)),o}return Object(d.a)(n,[{key:"handleClick",value:function(){this.props.colorCounterAction(this.props.colorCount>1?0:this.props.colorCount+1),this.props.quoteFetch()}},{key:"render",value:function(){var e="NewQuote "+["red-background","blue-background","yellow-background"][this.props.colorCount];return r.a.createElement("button",{onClick:this.handleClick,className:e,id:"new-quote"},"Click Me!")}}]),n}(r.a.Component)),E=Object(u.b)((function(e){return Object(O.a)({},e)}),(function(e){return{colorCounterAction:function(t){return e(function(e){return{type:"INCCOLORCOUNT",count:e}}(t))},quoteFetch:function(){return e(s())}}}))(j),w=n(19),C=n(20),k=(n(37),function(e){Object(f.a)(n,e);var t=Object(m.a)(n);function n(){return Object(h.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"render",value:function(){var e=["red-background","blue-background","yellow-background"],t="TweetQuote "+e[this.props.colorCount],n="https://twitter.com/intent/tweet?text=";return"object"===typeof this.props.newQuote.quote&&(n+=encodeURIComponent(this.props.newQuote.quote.quote+"\n--"+this.props.newQuote.quote.author)),r.a.createElement("div",{className:t},r.a.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",id:"tweet-quote"},r.a.createElement(w.a,{icon:C.a,className:e[this.props.colorCount]})))}}]),n}(r.a.Component)),q=Object(u.b)((function(e){return Object(O.a)({},e)}))(k),g=(n(38),function(e){Object(f.a)(n,e);var t=Object(m.a)(n);function n(){return Object(h.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"componentDidMount",value:function(){""===this.props.newQuote.quote&&this.props.quoteFetch()}},{key:"render",value:function(){var e="",t="";"object"===typeof this.props.newQuote.quote&&(e=this.props.newQuote.quote.quote,t=this.props.newQuote.quote.author);var n=["red","blue","yellow"],o="text "+n[this.props.colorCount],a="author "+n[this.props.colorCount];return r.a.createElement("div",null,r.a.createElement("p",{className:o,id:"text"},e),r.a.createElement("p",{className:a,id:"author"},"--",t))}}]),n}(r.a.Component)),y=Object(u.b)((function(e){return Object(O.a)({},e)}),(function(e){return{quoteFetch:function(){return e(s())}}}))(g),N=function(e){Object(f.a)(n,e);var t=Object(m.a)(n);function n(){return Object(h.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"render",value:function(){var e="QuoteBox "+["red-complimentary-background","blue-complimentary-background","yellow-complimentary-background"][this.props.colorCount];return r.a.createElement("div",{className:e,id:"quote-box"},r.a.createElement("div",{className:"quote-box-top"}),r.a.createElement("div",{className:"quote-box-middle"},r.a.createElement(y,null)),r.a.createElement("div",{className:"quote-box-bottom"},r.a.createElement("div",{className:"quote-box-bottom-left"},r.a.createElement(q,null)),r.a.createElement("div",{className:"quote-box-bottom-right"},r.a.createElement(E,null))),r.a.createElement("div",{className:"quote-box-underneath"}))}}]),n}(r.a.Component),Q=Object(u.b)((function(e){return Object(O.a)({},e)}))(N),x=function(e){Object(f.a)(n,e);var t=Object(m.a)(n);function n(){return Object(h.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"render",value:function(){var e="App-header "+["red-background","blue-background","yellow-background"][this.props.colorCount];return r.a.createElement("div",{className:"App"},r.a.createElement("header",{className:e},r.a.createElement(Q,null)))}}]),n}(r.a.Component),T=Object(u.b)((function(e){return Object(O.a)({},e)}))(x);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));c.a.render(r.a.createElement(u.a,{store:b},r.a.createElement(T,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[21,1,2]]]); +//# sourceMappingURL=main.13413d36.chunk.js.map \ No newline at end of file diff --git a/random-quote-machine/build/static/js/main.13413d36.chunk.js.map b/random-quote-machine/build/static/js/main.13413d36.chunk.js.map new file mode 100644 index 0000000..9a27c97 --- /dev/null +++ b/random-quote-machine/build/static/js/main.13413d36.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["actions/quoteFetchActionCreator.js","reducers/rootReducer.js","reducers/colorCounterReducer.js","actions/colorCounterAction.js","reducers/asyncQuoteReducer.js","store.js","NewQuote.js","TweetQuote.js","TextAuthor.js","QuoteBox.js","App.js","serviceWorker.js","index.js"],"names":["quoteFetchActionCreator","dispatch","type","fetch","then","response","json","quotes","newQuote","Math","floor","random","length","combineReducers","colorCount","state","action","count","fetching","quote","store","createStore","rootReducer","applyMiddleware","thunk","NewQuote","props","handleClick","bind","this","colorCounterAction","quoteFetch","newQuoteClass","onClick","className","id","React","Component","connect","TweetQuote","colors","tweetQuoteClass","href","encodeURIComponent","author","target","rel","icon","faTwitter","TextAuthor","textClass","authorClass","QuoteBox","quoteBoxClass","App","appHeaderClass","Boolean","window","location","hostname","match","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister","catch","error","console","message"],"mappings":"uWAgBaA,EAA0B,WACrC,OAAO,SAAUC,GACfA,EAPK,CACLC,KAX4B,qBAkB5BC,MACE,0IAEC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,kBAAC,EAAD,OAEF,yBAAKA,UAAU,oBACb,yBAAKA,UAAU,yBACb,kBAAC,EAAD,OAEF,yBAAKA,UAAU,0BACb,kBAAC,EAAD,QAGJ,yBAAKA,UAAU,8B,GAvBAE,IAAMC,WA8BdC,eAhCS,SAACvB,GAAD,sBAAiBA,KAgC1BuB,CAAyBc,GChClCE,E,uKAEF,IACMC,EAAiB,cADR,CAAC,iBAAkB,kBAAmB,qBACP1B,KAAKH,MAAMZ,YACzD,OACE,yBAAKoB,UAAU,OACb,4BAAQA,UAAWqB,GACjB,kBAAC,EAAD,Y,GAPQnB,IAAMC,WAcTC,eAhBS,SAACvB,GAAD,sBAAiBA,KAgB1BuB,CAAyBgB,GCVpBE,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DCTNC,IAASC,OACP,kBAAC,IAAD,CAAU1C,MAAOA,GACf,kBAAC,EAAD,OAEF2C,SAASC,eAAe,SDsHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrB/D,MAAK,SAACgE,GACLA,EAAaC,gBAEdC,OAAM,SAACC,GACNC,QAAQD,MAAMA,EAAME,c","file":"static/js/main.13413d36.chunk.js","sourcesContent":["export const RECEIVED_QUOTE = \"RECEIVED_QUOTE\";\nexport const REQUESTING_QUOTE = \"REQUESTING_QUOTE\";\n\nexport const receivedQuoteAction = quote => {\n return {\n type: RECEIVED_QUOTE,\n newQuote: quote\n };\n};\n\nexport const requestingQuoteAction = () => {\n return {\n type: REQUESTING_QUOTE\n };\n};\n\nexport const quoteFetchActionCreator = () => {\n return function (dispatch) {\n dispatch(requestingQuoteAction());\n fetch(\n \"https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json\"\n )\n .then(response => response.json())\n .then(quotes => {\n dispatch(\n receivedQuoteAction(\n quotes.quotes[Math.floor(Math.random() * quotes.quotes.length)]\n )\n );\n });\n };\n};\n","import { combineReducers } from \"redux\";\nimport colorCounterReducer from \"./colorCounterReducer\";\nimport asyncQuoteReducer from \"./asyncQuoteReducer\";\n\nexport default combineReducers({\n colorCount: colorCounterReducer,\n newQuote: asyncQuoteReducer,\n});\n","import { INCCOLORCOUNT } from \"../actions/colorCounterAction\";\n\nexport default (state = 1, action) => {\n switch (action.type) {\n case INCCOLORCOUNT:\n return action.count;\n default:\n return state;\n }\n};\n","export const INCCOLORCOUNT = \"INCCOLORCOUNT\";\n\nexport const colorCounterAction = (count) => {\n return {\n type: INCCOLORCOUNT,\n count: count,\n };\n};\n","import { REQUESTING_QUOTE } from \"../actions/quoteFetchActionCreator\";\nimport { RECEIVED_QUOTE } from \"../actions/quoteFetchActionCreator\";\n\nexport default (state = { fetching: false, quote: \"\" }, action) => {\n switch (action.type) {\n case REQUESTING_QUOTE:\n return { fetching: true, quote: \"\" };\n case RECEIVED_QUOTE:\n return { fetching: false, quote: action.newQuote };\n default:\n return state;\n }\n};\n","import { createStore, applyMiddleware } from \"redux\";\nimport thunk from \"redux-thunk\";\nimport rootReducer from \"./reducers/rootReducer\";\n\nconst store = createStore(rootReducer, applyMiddleware(thunk));\n\nexport default store;\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./NewQuote.css\";\n\nimport { colorCounterAction } from \"./actions/colorCounterAction\";\nimport { quoteFetchActionCreator } from \"./actions/quoteFetchActionCreator\";\n\nconst mapStateToProps = (state) => ({ ...state });\n\nconst mapDispatchToProps = (dispatch) => ({\n colorCounterAction: (count) => dispatch(colorCounterAction(count)),\n quoteFetch: () => dispatch(quoteFetchActionCreator()),\n});\n\nclass NewQuote extends React.Component {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick() {\n this.props.colorCounterAction(\n this.props.colorCount > 1 ? 0 : this.props.colorCount + 1\n );\n this.props.quoteFetch();\n }\n\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const newQuoteClass = \"NewQuote \" + colors[this.props.colorCount];\n return (\n \n );\n }\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(NewQuote);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faTwitter } from \"@fortawesome/free-brands-svg-icons\";\n\nimport \"./TweetQuote.css\";\n\nconst mapStateToProps = state => ({ ...state });\n\nclass TweetQuote extends React.Component {\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const tweetQuoteClass = \"TweetQuote \" + colors[this.props.colorCount];\n let href = \"https://twitter.com/intent/tweet?text=\";\n if (typeof this.props.newQuote.quote === \"object\") {\n href += encodeURIComponent(\n this.props.newQuote.quote.quote +\n \"\\n--\" +\n this.props.newQuote.quote.author\n );\n }\n return (\n
\n \n \n \n
\n );\n }\n}\n\nexport default connect(mapStateToProps)(TweetQuote);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./TextAuthor.css\";\nimport { quoteFetchActionCreator } from \"./actions/quoteFetchActionCreator\";\n\nconst mapStateToProps = state => ({ ...state });\n\nconst mapDispatchToProps = dispatch => ({\n quoteFetch: () => dispatch(quoteFetchActionCreator())\n});\n\nclass TextAuthor extends React.Component {\n componentDidMount() {\n if (this.props.newQuote.quote === \"\") {\n this.props.quoteFetch();\n }\n }\n render() {\n let quote = \"\";\n let author = \"\";\n if (typeof this.props.newQuote.quote === \"object\") {\n quote = this.props.newQuote.quote.quote;\n author = this.props.newQuote.quote.author;\n }\n const colors = [\"red\", \"blue\", \"yellow\"];\n const textClass = \"text \" + colors[this.props.colorCount];\n const authorClass = \"author \" + colors[this.props.colorCount];\n return (\n
\n

\n {quote}\n

\n

\n --{author}\n

\n
\n );\n }\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(TextAuthor);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./QuoteBox.css\";\nimport NewQuote from \"./NewQuote\";\nimport TweetQuote from \"./TweetQuote\";\nimport TextAuthor from \"./TextAuthor\";\n\nconst mapStateToProps = (state) => ({ ...state });\n\nclass QuoteBox extends React.Component {\n render() {\n const colors = [\n \"red-complimentary-background\",\n \"blue-complimentary-background\",\n \"yellow-complimentary-background\",\n ];\n const quoteBoxClass = \"QuoteBox \" + colors[this.props.colorCount];\n return (\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n );\n }\n}\n\nexport default connect(mapStateToProps)(QuoteBox);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./App.css\";\nimport QuoteBox from \"./QuoteBox\";\n\nconst mapStateToProps = (state) => ({ ...state });\n\nclass App extends React.Component {\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const appHeaderClass = \"App-header \" + colors[this.props.colorCount];\n return (\n
\n
\n \n
\n
\n );\n }\n}\n\nexport default connect(mapStateToProps)(App);\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === \"localhost\" ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === \"[::1]\" ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === \"production\" && \"serviceWorker\" in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener(\"load\", () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n \"This web app is being served cache-first by a service \" +\n \"worker. To learn more, visit https://bit.ly/CRA-PWA\"\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === \"installed\") {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n \"New content is available and will be used when all \" +\n \"tabs for this page are closed. See https://bit.ly/CRA-PWA.\"\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log(\"Content is cached for offline use.\");\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error(\"Error during service worker registration:\", error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { \"Service-Worker\": \"script\" },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get(\"content-type\");\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf(\"javascript\") === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n \"No internet connection found. App is running in offline mode.\"\n );\n });\n}\n\nexport function unregister() {\n if (\"serviceWorker\" in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport store from \"./store\";\n\nimport \"./index.css\";\nimport App from \"./App\";\nimport * as serviceWorker from \"./serviceWorker\";\n\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\")\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/random-quote-machine/build/static/js/main.b6838136.chunk.js b/random-quote-machine/build/static/js/main.b6838136.chunk.js deleted file mode 100644 index 3447f65..0000000 --- a/random-quote-machine/build/static/js/main.b6838136.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonprandom-quote-machine"]=this["webpackJsonprandom-quote-machine"]||[]).push([[0],{21:function(e,t,n){e.exports=n(39)},30:function(e,t,n){},31:function(e,t,n){},32:function(e,t,n){},33:function(e,t,n){},37:function(e,t,n){},38:function(e,t,n){},39:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),c=n(10),a=n.n(c),u=n(2),i=n(8),l=n(18),s=function(){return function(e){e({type:"REQUESTING_QUOTE"}),fetch("https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json").then((function(e){return e.json()})).then((function(t){e({type:"RECEIVED_QUOTE",newQuote:t.quotes[Math.floor(Math.random()*t.quotes.length)]})}))}},p=Object(i.c)({colorCount:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INCCOLORCOUNT":return t.count;default:return e}},newQuote:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{fetching:!1,quote:""},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUESTING_QUOTE":return{fetching:!0,quote:""};case"RECEIVED_QUOTE":return{fetching:!1,quote:t.newQuote};default:return e}}}),h=Object(i.d)(p,Object(i.a)(l.a)),b=(n(30),n(3)),m=n(4),d=n(5),f=n(6),O=n(7),v=(n(31),n(32),n(11)),j=(n(33),function(e){Object(f.a)(n,e);var t=Object(d.a)(n);function n(e){var o;return Object(b.a)(this,n),(o=t.call(this,e)).handleClick=o.handleClick.bind(Object(v.a)(o)),o}return Object(m.a)(n,[{key:"handleClick",value:function(){this.props.colorCounterAction(this.props.colorCount>1?0:this.props.colorCount+1),this.props.quoteFetch()}},{key:"render",value:function(){var e="NewQuote "+["red-background","blue-background","yellow-background"][this.props.colorCount];return r.a.createElement("button",{onClick:this.handleClick,className:e,id:"new-quote"},"Click Me!")}}]),n}(r.a.Component)),E=Object(u.b)((function(e){return Object(O.a)({},e)}),(function(e){return{colorCounterAction:function(t){return e(function(e){return{type:"INCCOLORCOUNT",count:e}}(t))},quoteFetch:function(){return e(s())}}}))(j),w=n(19),C=n(20),k=(n(37),function(e){Object(f.a)(n,e);var t=Object(d.a)(n);function n(){return Object(b.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"render",value:function(){var e=["red-background","blue-background","yellow-background"],t="TweetQuote "+e[this.props.colorCount],n="https://twitter.com/intent/tweet?text=";return"object"===typeof this.props.newQuote.quote&&(n+=encodeURIComponent(this.props.newQuote.quote.quote+"\n--"+this.props.newQuote.quote.author)),r.a.createElement("div",{className:"tweetQuoteContainer"},r.a.createElement("div",{className:t},r.a.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",id:"tweet-quote"},r.a.createElement(w.a,{icon:C.a,className:e[this.props.colorCount]}))))}}]),n}(r.a.Component)),g=Object(u.b)((function(e){return Object(O.a)({},e)}))(k),y=(n(38),function(e){Object(f.a)(n,e);var t=Object(d.a)(n);function n(){return Object(b.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"componentDidMount",value:function(){""===this.props.newQuote.quote&&this.props.quoteFetch()}},{key:"render",value:function(){var e="",t="";"object"===typeof this.props.newQuote.quote&&(e=this.props.newQuote.quote.quote,t=this.props.newQuote.quote.author);var n=["red","blue","yellow"],o="text "+n[this.props.colorCount],c="author "+n[this.props.colorCount];return r.a.createElement("div",{style:{fontSize:".7em"}},r.a.createElement("p",{className:o,id:"text"},e),r.a.createElement("p",{className:c,id:"author"},"--",t))}}]),n}(r.a.Component)),q=Object(u.b)((function(e){return Object(O.a)({},e)}),(function(e){return{quoteFetch:function(){return e(s())}}}))(y),N=function(e){Object(f.a)(n,e);var t=Object(d.a)(n);function n(){return Object(b.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"render",value:function(){var e="QuoteBox "+["red-complimentary-background","blue-complimentary-background","yellow-complimentary-background"][this.props.colorCount];return r.a.createElement("div",{className:e,id:"quote-box"},r.a.createElement("div",{className:"quote-box-top"},r.a.createElement(q,null)),r.a.createElement("div",{className:"quote-box-bottom"},r.a.createElement("div",{className:"quote-box-bottom-left"},r.a.createElement(g,null)),r.a.createElement("div",{className:"quote-box-bottom-right"},r.a.createElement(E,null))))}}]),n}(r.a.Component),Q=Object(u.b)((function(e){return Object(O.a)({},e)}))(N),x=function(e){Object(f.a)(n,e);var t=Object(d.a)(n);function n(){return Object(b.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"render",value:function(){var e="App-header "+["red-background","blue-background","yellow-background"][this.props.colorCount];return r.a.createElement("div",{className:"App"},r.a.createElement("header",{className:e},r.a.createElement(Q,null)))}}]),n}(r.a.Component),T=Object(u.b)((function(e){return Object(O.a)({},e)}))(x);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));a.a.render(r.a.createElement(u.a,{store:h},r.a.createElement(T,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[21,1,2]]]); -//# sourceMappingURL=main.b6838136.chunk.js.map \ No newline at end of file diff --git a/random-quote-machine/build/static/js/main.b6838136.chunk.js.map b/random-quote-machine/build/static/js/main.b6838136.chunk.js.map deleted file mode 100644 index dcc7d0c..0000000 --- a/random-quote-machine/build/static/js/main.b6838136.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["actions/quoteFetchActionCreator.js","reducers/rootReducer.js","reducers/colorCounterReducer.js","actions/colorCounterAction.js","reducers/asyncQuoteReducer.js","store.js","NewQuote.js","TweetQuote.js","TextAuthor.js","QuoteBox.js","App.js","serviceWorker.js","index.js"],"names":["quoteFetchActionCreator","dispatch","type","fetch","then","response","json","quotes","newQuote","Math","floor","random","length","combineReducers","colorCount","state","action","count","fetching","quote","store","createStore","rootReducer","applyMiddleware","thunk","NewQuote","props","handleClick","bind","this","colorCounterAction","quoteFetch","newQuoteClass","onClick","className","id","React","Component","connect","TweetQuote","colors","tweetQuoteClass","href","encodeURIComponent","author","target","rel","icon","faTwitter","TextAuthor","textClass","authorClass","style","fontSize","QuoteBox","quoteBoxClass","App","appHeaderClass","Boolean","window","location","hostname","match","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister","catch","error","console","message"],"mappings":"uWAgBaA,EAA0B,WACrC,OAAO,SAAUC,GACfA,EAPK,CACLC,KAX4B,qBAkB5BC,MACE,0IAECC,MAAK,SAAAC,GAAQ,OAAIA,EAASC,UAC1BF,MAAK,SAAAG,GACJN,EApBC,CACLC,KAL0B,iBAM1BM,SAoBQD,EAAOA,OAAOE,KAAKC,MAAMD,KAAKE,SAAWJ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C,WA0BdC,eA5BS,SAACvB,GAAD,sBAAiBA,KA4B1BuB,CAAyBgB,GC5BlCE,E,uKAEF,IACMC,EAAiB,cADR,CAAC,iBAAkB,kBAAmB,qBACP5B,KAAKH,MAAMZ,YACzD,OACE,yBAAKoB,UAAU,OACb,4BAAQA,UAAWuB,GACjB,kBAAC,EAAD,Y,GAPQrB,IAAMC,WAcTC,eAhBS,SAACvB,GAAD,sBAAiBA,KAgB1BuB,CAAyBkB,GCVpBE,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DCTNC,IAASC,OACP,kBAAC,IAAD,CAAU5C,MAAOA,GACf,kBAAC,EAAD,OAEF6C,SAASC,eAAe,SDsHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBjE,MAAK,SAACkE,GACLA,EAAaC,gBAEdC,OAAM,SAACC,GACNC,QAAQD,MAAMA,EAAME,c","file":"static/js/main.b6838136.chunk.js","sourcesContent":["export const RECEIVED_QUOTE = \"RECEIVED_QUOTE\";\nexport const REQUESTING_QUOTE = \"REQUESTING_QUOTE\";\n\nexport const receivedQuoteAction = quote => {\n return {\n type: RECEIVED_QUOTE,\n newQuote: quote\n };\n};\n\nexport const requestingQuoteAction = () => {\n return {\n type: REQUESTING_QUOTE\n };\n};\n\nexport const quoteFetchActionCreator = () => {\n return function (dispatch) {\n dispatch(requestingQuoteAction());\n fetch(\n \"https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json\"\n )\n .then(response => response.json())\n .then(quotes => {\n dispatch(\n receivedQuoteAction(\n quotes.quotes[Math.floor(Math.random() * quotes.quotes.length)]\n )\n );\n });\n };\n};\n","import { combineReducers } from \"redux\";\nimport colorCounterReducer from \"./colorCounterReducer\";\nimport asyncQuoteReducer from \"./asyncQuoteReducer\";\n\nexport default combineReducers({\n colorCount: colorCounterReducer,\n newQuote: asyncQuoteReducer,\n});\n","import { INCCOLORCOUNT } from \"../actions/colorCounterAction\";\n\nexport default (state = 1, action) => {\n switch (action.type) {\n case INCCOLORCOUNT:\n return action.count;\n default:\n return state;\n }\n};\n","export const INCCOLORCOUNT = \"INCCOLORCOUNT\";\n\nexport const colorCounterAction = (count) => {\n return {\n type: INCCOLORCOUNT,\n count: count,\n };\n};\n","import { REQUESTING_QUOTE } from \"../actions/quoteFetchActionCreator\";\nimport { RECEIVED_QUOTE } from \"../actions/quoteFetchActionCreator\";\n\nexport default (state = { fetching: false, quote: \"\" }, action) => {\n switch (action.type) {\n case REQUESTING_QUOTE:\n return { fetching: true, quote: \"\" };\n case RECEIVED_QUOTE:\n return { fetching: false, quote: action.newQuote };\n default:\n return state;\n }\n};\n","import { createStore, applyMiddleware } from \"redux\";\nimport thunk from \"redux-thunk\";\nimport rootReducer from \"./reducers/rootReducer\";\n\nconst store = createStore(rootReducer, applyMiddleware(thunk));\n\nexport default store;\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./NewQuote.css\";\n\nimport { colorCounterAction } from \"./actions/colorCounterAction\";\nimport { quoteFetchActionCreator } from \"./actions/quoteFetchActionCreator\";\n\nconst mapStateToProps = (state) => ({ ...state });\n\nconst mapDispatchToProps = (dispatch) => ({\n colorCounterAction: (count) => dispatch(colorCounterAction(count)),\n quoteFetch: () => dispatch(quoteFetchActionCreator()),\n});\n\nclass NewQuote extends React.Component {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick() {\n this.props.colorCounterAction(\n this.props.colorCount > 1 ? 0 : this.props.colorCount + 1\n );\n this.props.quoteFetch();\n }\n\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const newQuoteClass = \"NewQuote \" + colors[this.props.colorCount];\n return (\n \n Click Me!\n \n );\n }\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(NewQuote);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faTwitter } from \"@fortawesome/free-brands-svg-icons\";\n\nimport \"./TweetQuote.css\";\n\nconst mapStateToProps = state => ({ ...state });\n\nclass TweetQuote extends React.Component {\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const tweetQuoteClass = \"TweetQuote \" + colors[this.props.colorCount];\n let href = \"https://twitter.com/intent/tweet?text=\";\n if (typeof this.props.newQuote.quote === \"object\") {\n href += encodeURIComponent(\n this.props.newQuote.quote.quote +\n \"\\n--\" +\n this.props.newQuote.quote.author\n );\n }\n return (\n
\n
\n \n \n \n
\n
\n );\n }\n}\n\nexport default connect(mapStateToProps)(TweetQuote);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./TextAuthor.css\";\nimport { quoteFetchActionCreator } from \"./actions/quoteFetchActionCreator\";\n\nconst mapStateToProps = state => ({ ...state });\n\nconst mapDispatchToProps = dispatch => ({\n quoteFetch: () => dispatch(quoteFetchActionCreator())\n});\n\nclass TextAuthor extends React.Component {\n componentDidMount() {\n if (this.props.newQuote.quote === \"\") {\n this.props.quoteFetch();\n }\n }\n render() {\n let quote = \"\";\n let author = \"\";\n if (typeof this.props.newQuote.quote === \"object\") {\n quote = this.props.newQuote.quote.quote;\n author = this.props.newQuote.quote.author;\n }\n const colors = [\"red\", \"blue\", \"yellow\"];\n const textClass = \"text \" + colors[this.props.colorCount];\n const authorClass = \"author \" + colors[this.props.colorCount];\n return (\n
\n

\n {quote}\n

\n

\n --{author}\n

\n
\n );\n }\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(TextAuthor);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./QuoteBox.css\";\nimport NewQuote from \"./NewQuote\";\nimport TweetQuote from \"./TweetQuote\";\nimport TextAuthor from \"./TextAuthor\";\n\nconst mapStateToProps = (state) => ({ ...state });\n\nclass QuoteBox extends React.Component {\n render() {\n const colors = [\n \"red-complimentary-background\",\n \"blue-complimentary-background\",\n \"yellow-complimentary-background\",\n ];\n const quoteBoxClass = \"QuoteBox \" + colors[this.props.colorCount];\n return (\n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n );\n }\n}\n\nexport default connect(mapStateToProps)(QuoteBox);\n","import React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport \"./App.css\";\nimport QuoteBox from \"./QuoteBox\";\n\nconst mapStateToProps = (state) => ({ ...state });\n\nclass App extends React.Component {\n render() {\n const colors = [\"red-background\", \"blue-background\", \"yellow-background\"];\n const appHeaderClass = \"App-header \" + colors[this.props.colorCount];\n return (\n
\n
\n \n
\n
\n );\n }\n}\n\nexport default connect(mapStateToProps)(App);\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === \"localhost\" ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === \"[::1]\" ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === \"production\" && \"serviceWorker\" in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener(\"load\", () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n \"This web app is being served cache-first by a service \" +\n \"worker. To learn more, visit https://bit.ly/CRA-PWA\"\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === \"installed\") {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n \"New content is available and will be used when all \" +\n \"tabs for this page are closed. See https://bit.ly/CRA-PWA.\"\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log(\"Content is cached for offline use.\");\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error(\"Error during service worker registration:\", error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { \"Service-Worker\": \"script\" },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get(\"content-type\");\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf(\"javascript\") === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n \"No internet connection found. App is running in offline mode.\"\n );\n });\n}\n\nexport function unregister() {\n if (\"serviceWorker\" in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport store from \"./store\";\n\nimport \"./index.css\";\nimport App from \"./App\";\nimport * as serviceWorker from \"./serviceWorker\";\n\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\")\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/random-quote-machine/src/App.css b/random-quote-machine/src/App.css index 7e0133c..58d7857 100644 --- a/random-quote-machine/src/App.css +++ b/random-quote-machine/src/App.css @@ -12,16 +12,16 @@ } .red-background { - background-color: #ff0000; + background-color: #ff1500; color: black; } .blue-background { - background-color: #0000ff; + background-color: #006aff; color: white; } .yellow-background { - background-color: #ffff00; + background-color: #eaff00; color: black; } diff --git a/random-quote-machine/src/NewQuote.css b/random-quote-machine/src/NewQuote.css index d9f5b08..0204785 100644 --- a/random-quote-machine/src/NewQuote.css +++ b/random-quote-machine/src/NewQuote.css @@ -1,11 +1,12 @@ .NewQuote { text-align: center; - height: 60%; + height: 45%; width: 45%; border: none; border-radius: 5px; font-size: 0.8em; font-weight: bold; + margin: auto; } .NewQuote:focus { @@ -13,16 +14,29 @@ } .red-background { - background-color: #ff0000; + background-color: #ff1500; color: #000000; } .blue-background { - background-color: #0000ff; - color: #ff8000; + background-color: #006Aff; + color: #eaff00; } .yellow-background { - background-color: #ffff00; - color: #0080ff; + background-color: #eaff00; + color: #006bff; +} + +@media (orientation: portrait) and (max-device-width: 767px) { + .NewQuote { + height: 40%; + } +} + +@media (orientation: landscape) and (max-device-height: 450px) { + .NewQuote { + height: 60%; + font-size: 1em; + } } diff --git a/random-quote-machine/src/NewQuote.js b/random-quote-machine/src/NewQuote.js index 7a9e135..58897b6 100644 --- a/random-quote-machine/src/NewQuote.js +++ b/random-quote-machine/src/NewQuote.js @@ -30,11 +30,7 @@ class NewQuote extends React.Component { const colors = ["red-background", "blue-background", "yellow-background"]; const newQuoteClass = "NewQuote " + colors[this.props.colorCount]; return ( - ); diff --git a/random-quote-machine/src/QuoteBox.css b/random-quote-machine/src/QuoteBox.css index a68eccd..16f69ef 100644 --- a/random-quote-machine/src/QuoteBox.css +++ b/random-quote-machine/src/QuoteBox.css @@ -3,41 +3,49 @@ text-align: center; max-width: 80%; max-height: 60vh; - width: 500px; + width: 800px; height: 500px; border-radius: 10px; box-shadow: 4px 3px black; } .red-complimentary-background { - background-color: #0080ff; + background-color: #006aff; color: white; } .blue-complimentary-background { - background-color: #7fff00; + background-color: #ff1500; color: white; } .yellow-complimentary-background { - background-color: #8000ff; + background-color: #9400ff; color: black; } .quote-box-top { - height: 70%; + height: 20%; +} + +.quote-box-middle { + height: 40%; display: flex; flex-direction: column; justify-content: space-around; } .quote-box-bottom { - height: 30%; + height: 40%; display: flex; flex-direction: row; justify-content: flex-start; } +.quote-box-underneath { + height: 0%; +} + .quote-box-bottom-left { width: 50%; display: flex; @@ -51,3 +59,21 @@ flex-direction: row; justify-content: space-around; } + +@media (orientation: portrait) and (max-device-width: 767px) { + .QuoteBox { + max-height: 60vh; + } + .quote-box-top { + height: 10%; + } + .quote-box-middle { + height: 50%; + } + .quote-box-bottom { + height: 40%; + } + .quote-box-underneath { + height: 0%; + } +} diff --git a/random-quote-machine/src/QuoteBox.js b/random-quote-machine/src/QuoteBox.js index 4b5a36a..385159a 100644 --- a/random-quote-machine/src/QuoteBox.js +++ b/random-quote-machine/src/QuoteBox.js @@ -19,6 +19,8 @@ class QuoteBox extends React.Component { return (
+
+
@@ -29,6 +31,8 @@ class QuoteBox extends React.Component {
+
+
); } diff --git a/random-quote-machine/src/TextAuthor.css b/random-quote-machine/src/TextAuthor.css index 050c539..a1054d6 100644 --- a/random-quote-machine/src/TextAuthor.css +++ b/random-quote-machine/src/TextAuthor.css @@ -1,13 +1,13 @@ .red { - color: #00ff80; + color: #00ff94; } .blue { - color: #0000ff; + color: white; } .yellow { - color: #ffff00; + color: white; } .text { @@ -21,3 +21,20 @@ margin-right: 10%; font-style: oblique; } + +p { + font-size: .7em; + margin: auto; +} + +@media (orientation: portrait) and (max-device-width: 767px) { + p { + font-size: .9em; + } +} + +@media (orientation: landscape) and (max-device-height: 450px) { + p { + font-size: .9em; + } +} diff --git a/random-quote-machine/src/TextAuthor.js b/random-quote-machine/src/TextAuthor.js index 1b359dd..a27d513 100644 --- a/random-quote-machine/src/TextAuthor.js +++ b/random-quote-machine/src/TextAuthor.js @@ -27,7 +27,7 @@ class TextAuthor extends React.Component { const textClass = "text " + colors[this.props.colorCount]; const authorClass = "author " + colors[this.props.colorCount]; return ( -
+

{quote}

diff --git a/random-quote-machine/src/TweetQuote.css b/random-quote-machine/src/TweetQuote.css index 23b7a98..3a67b21 100644 --- a/random-quote-machine/src/TweetQuote.css +++ b/random-quote-machine/src/TweetQuote.css @@ -1,5 +1,5 @@ .TweetQuote { - height: 60%; + height: 45%; width: 45%; border: none; border-radius: 5px; @@ -7,16 +7,7 @@ font-weight: bold; display: flex; flex-direction: column; - justify-content: center; - align-content: center; -} - -.tweetQuoteContainer { - height: 100%; - width: 100%; - display: flex; - flex-direction: row; - justify-content: space-around; + margin: auto; } .TweetQuote:focus { @@ -24,16 +15,32 @@ } .red-background { - background-color: #ff0000; + background-color: #ff1500; color: #000000; } .blue-background { - background-color: #0000ff; - color: #ff8000; + background-color: #006aff; + color: #eaff00; } .yellow-background { - background-color: #ffff00; - color: #0080ff; + background-color: #eaff00; + color: #006bff; +} + +.TweetQuote > a { + margin: auto; +} + +@media (orientation: portrait) and (max-device-width: 767px) { + .TweetQuote { + height: 40%; + } +} + +@media (orientation: landscape) and (max-device-height: 450px) { + .TweetQuote { + height: 60%; + } } diff --git a/random-quote-machine/src/TweetQuote.js b/random-quote-machine/src/TweetQuote.js index 2a95224..d61f7af 100644 --- a/random-quote-machine/src/TweetQuote.js +++ b/random-quote-machine/src/TweetQuote.js @@ -21,20 +21,10 @@ class TweetQuote extends React.Component { ); } return ( -
-
- - - -
+ ); }