From bfd3a825c2d73bd842769cdfaf11ad0319a3bd6e Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 26 May 2021 23:58:29 +0530 Subject: added code and content --- Resources/CNAME | 1 + Resources/Themes/styles.css | 401 +++++++++++++ Resources/assets/disqus.js | 5 + .../01-teachableMachines/.01-collect.png.icloud | Bin 0 -> 164 bytes .../gciTales/01-teachableMachines/02-train.png | Bin 0 -> 1673773 bytes .../gciTales/01-teachableMachines/03-label.png | Bin 0 -> 134577 bytes .../gciTales/01-teachableMachines/04-alert.png | Bin 0 -> 45710 bytes .../gciTales/01-teachableMachines/05-html.png | Bin 0 -> 15084 bytes .../assets/gciTales/01-teachableMachines/06-js.png | Bin 0 -> 117349 bytes .../assets/gciTales/01-teachableMachines/07-eg.png | Bin 0 -> 787109 bytes .../assets/gciTales/01-teachableMachines/08-eg.png | Bin 0 -> 832865 bytes Resources/assets/gciTales/03-regression/1.png | Bin 0 -> 39478 bytes Resources/assets/gciTales/03-regression/2.png | Bin 0 -> 67134 bytes Resources/assets/gciTales/03-regression/3.png | Bin 0 -> 59514 bytes Resources/assets/gciTales/03-regression/4.png | Bin 0 -> 58153 bytes Resources/assets/gciTales/03-regression/5.png | Bin 0 -> 58824 bytes Resources/assets/gciTales/03-regression/6.png | Bin 0 -> 59554 bytes Resources/assets/main.css | 369 ++++++++++++ Resources/assets/manup.min.js | 1 + Resources/assets/posts/arjs/.03-knot.png.icloud | Bin 0 -> 161 bytes Resources/assets/posts/arjs/01-ngrok.png | Bin 0 -> 950543 bytes Resources/assets/posts/arjs/02-box-demo.gif | Bin 0 -> 1689985 bytes Resources/assets/posts/arjs/04-nyan.gif | Bin 0 -> 702741 bytes Resources/assets/posts/arjs/05-GitHub.jpg | Bin 0 -> 615523 bytes Resources/assets/posts/autodock-vina/s1.png | Bin 0 -> 914699 bytes Resources/assets/posts/kaggle-colab/ss1.png | Bin 0 -> 151575 bytes Resources/assets/posts/kaggle-colab/ss2.png | Bin 0 -> 43899 bytes Resources/assets/posts/kaggle-colab/ss3.png | Bin 0 -> 54283 bytes Resources/assets/posts/kaggle-colab/ss4.png | Bin 0 -> 14510 bytes .../assets/posts/obs/.01-pewdiepie.png.icloud | Bin 0 -> 168 bytes Resources/assets/posts/obs/.11.png.icloud | Bin 0 -> 156 bytes Resources/assets/posts/obs/.3-usb.png.icloud | Bin 0 -> 159 bytes Resources/assets/posts/obs/.5S.png.icloud | Bin 0 -> 156 bytes Resources/assets/posts/obs/.mirrorless.png.icloud | Bin 0 -> 164 bytes Resources/assets/posts/obs/.normal.png.icloud | Bin 0 -> 160 bytes Resources/assets/posts/obs/.usb.png.icloud | Bin 0 -> 157 bytes Resources/assets/posts/obs/01-media-source.png | Bin 0 -> 144620 bytes Resources/assets/posts/obs/01-panel.png | Bin 0 -> 120308 bytes Resources/assets/posts/obs/02-remote.png | Bin 0 -> 930081 bytes Resources/assets/posts/obs/021-rotate.png | Bin 0 -> 725295 bytes Resources/assets/posts/obs/021-source.png | Bin 0 -> 91620 bytes Resources/assets/posts/obs/dics.css | 229 ++++++++ Resources/assets/posts/obs/dics.js | 638 +++++++++++++++++++++ Resources/assets/posts/open-babel/s1.png | Bin 0 -> 604137 bytes Resources/assets/posts/open-babel/s2.jpg | Bin 0 -> 132781 bytes Resources/assets/posts/open-babel/s3.jpg | Bin 0 -> 314900 bytes Resources/assets/posts/open-peeps/ex-1.svg | 1 + "Resources/assets/r\303\251sum\303\251.pdf" | Bin 0 -> 84216 bytes Resources/assets/sakura.css | 186 ++++++ Resources/googlecb0897d479c87d97.html | 1 + ...80b-d347-476a-232d-9568839851cd.webPlatform.png | Bin 0 -> 1711 bytes ...126-4866-93de-8df5-e0e6a3c65da1.webPlatform.png | Bin 0 -> 748 bytes ...abc-6c7c-ffb8-df8d-d2fad23f50b0.webPlatform.png | Bin 0 -> 471 bytes ...f70-557f-0e4b-3d76-127534525db9.webPlatform.png | Bin 0 -> 600 bytes ...f17-2e71-90d8-67a7-587163282ebf.webPlatform.png | Bin 0 -> 3127 bytes ...e9e-b615-96cd-3e18-ab4307c859a0.webPlatform.png | Bin 0 -> 1674 bytes ...18b-2a6c-0abc-136c-8c8faf49c71b.webPlatform.png | Bin 0 -> 1061 bytes ...ee8-92e3-932f-5388-7731928b5692.webPlatform.png | Bin 0 -> 879 bytes ...996-fd1b-b2d3-3627-cef4fa224e25.webPlatform.png | Bin 0 -> 789 bytes ...c53-cfd0-b52e-ca49-1db0cc292b7d.webPlatform.png | Bin 0 -> 577 bytes ...729-56cb-2a63-7e8b-ac62a038a023.webPlatform.png | Bin 0 -> 1033 bytes ...a46-4612-c284-055f-58850c0730bd.webPlatform.png | Bin 0 -> 984 bytes ...a63-85f5-62b0-c68f-2faa4aaea42b.webPlatform.png | Bin 0 -> 11426 bytes ...b1d-0299-9db6-3747-c7aeaaaa37d0.webPlatform.png | Bin 0 -> 1517 bytes ...798-7e86-1f02-565e-39dfab41fe36.webPlatform.png | Bin 0 -> 24811 bytes ...c61-f17f-ff49-3f97-e942f202bebf.webPlatform.png | Bin 0 -> 1293 bytes ...97f-630b-bafd-7c7d-e1287b98a969.webPlatform.png | Bin 0 -> 814 bytes ...aaa-861c-78c0-0919-07a886e57304.webPlatform.png | Bin 0 -> 3966 bytes ...765-fff5-aa39-9f7f-fdd3024d4056.webPlatform.png | Bin 0 -> 1363 bytes Resources/images/favicon.png | Bin 0 -> 411 bytes Resources/images/logo.png | Bin 0 -> 498 bytes Resources/images/me.jpeg | Bin 0 -> 105079 bytes Resources/manifest.json | 119 ++++ Resources/pwabuilder-sw-register.js | 19 + Resources/pwabuilder-sw.js | 83 +++ 75 files changed, 2053 insertions(+) create mode 100644 Resources/CNAME create mode 100644 Resources/Themes/styles.css create mode 100644 Resources/assets/disqus.js create mode 100644 Resources/assets/gciTales/01-teachableMachines/.01-collect.png.icloud create mode 100644 Resources/assets/gciTales/01-teachableMachines/02-train.png create mode 100644 Resources/assets/gciTales/01-teachableMachines/03-label.png create mode 100644 Resources/assets/gciTales/01-teachableMachines/04-alert.png create mode 100644 Resources/assets/gciTales/01-teachableMachines/05-html.png create mode 100644 Resources/assets/gciTales/01-teachableMachines/06-js.png create mode 100644 Resources/assets/gciTales/01-teachableMachines/07-eg.png create mode 100644 Resources/assets/gciTales/01-teachableMachines/08-eg.png create mode 100644 Resources/assets/gciTales/03-regression/1.png create mode 100644 Resources/assets/gciTales/03-regression/2.png create mode 100644 Resources/assets/gciTales/03-regression/3.png create mode 100644 Resources/assets/gciTales/03-regression/4.png create mode 100644 Resources/assets/gciTales/03-regression/5.png create mode 100644 Resources/assets/gciTales/03-regression/6.png create mode 100644 Resources/assets/main.css create mode 100644 Resources/assets/manup.min.js create mode 100644 Resources/assets/posts/arjs/.03-knot.png.icloud create mode 100644 Resources/assets/posts/arjs/01-ngrok.png create mode 100644 Resources/assets/posts/arjs/02-box-demo.gif create mode 100644 Resources/assets/posts/arjs/04-nyan.gif create mode 100644 Resources/assets/posts/arjs/05-GitHub.jpg create mode 100644 Resources/assets/posts/autodock-vina/s1.png create mode 100644 Resources/assets/posts/kaggle-colab/ss1.png create mode 100644 Resources/assets/posts/kaggle-colab/ss2.png create mode 100644 Resources/assets/posts/kaggle-colab/ss3.png create mode 100644 Resources/assets/posts/kaggle-colab/ss4.png create mode 100644 Resources/assets/posts/obs/.01-pewdiepie.png.icloud create mode 100644 Resources/assets/posts/obs/.11.png.icloud create mode 100644 Resources/assets/posts/obs/.3-usb.png.icloud create mode 100644 Resources/assets/posts/obs/.5S.png.icloud create mode 100644 Resources/assets/posts/obs/.mirrorless.png.icloud create mode 100644 Resources/assets/posts/obs/.normal.png.icloud create mode 100644 Resources/assets/posts/obs/.usb.png.icloud create mode 100644 Resources/assets/posts/obs/01-media-source.png create mode 100644 Resources/assets/posts/obs/01-panel.png create mode 100644 Resources/assets/posts/obs/02-remote.png create mode 100644 Resources/assets/posts/obs/021-rotate.png create mode 100644 Resources/assets/posts/obs/021-source.png create mode 100644 Resources/assets/posts/obs/dics.css create mode 100644 Resources/assets/posts/obs/dics.js create mode 100644 Resources/assets/posts/open-babel/s1.png create mode 100644 Resources/assets/posts/open-babel/s2.jpg create mode 100644 Resources/assets/posts/open-babel/s3.jpg create mode 100644 Resources/assets/posts/open-peeps/ex-1.svg create mode 100644 "Resources/assets/r\303\251sum\303\251.pdf" create mode 100644 Resources/assets/sakura.css create mode 100644 Resources/googlecb0897d479c87d97.html create mode 100644 Resources/images/04d0580b-d347-476a-232d-9568839851cd.webPlatform.png create mode 100644 Resources/images/14a6e126-4866-93de-8df5-e0e6a3c65da1.webPlatform.png create mode 100644 Resources/images/15294abc-6c7c-ffb8-df8d-d2fad23f50b0.webPlatform.png create mode 100644 Resources/images/6b5f7f70-557f-0e4b-3d76-127534525db9.webPlatform.png create mode 100644 Resources/images/82e24f17-2e71-90d8-67a7-587163282ebf.webPlatform.png create mode 100644 Resources/images/8c0ffe9e-b615-96cd-3e18-ab4307c859a0.webPlatform.png create mode 100644 Resources/images/9384518b-2a6c-0abc-136c-8c8faf49c71b.webPlatform.png create mode 100644 Resources/images/9bf4aee8-92e3-932f-5388-7731928b5692.webPlatform.png create mode 100644 Resources/images/9dc22996-fd1b-b2d3-3627-cef4fa224e25.webPlatform.png create mode 100644 Resources/images/afd91c53-cfd0-b52e-ca49-1db0cc292b7d.webPlatform.png create mode 100644 Resources/images/b0cac729-56cb-2a63-7e8b-ac62a038a023.webPlatform.png create mode 100644 Resources/images/bb0aca46-4612-c284-055f-58850c0730bd.webPlatform.png create mode 100644 Resources/images/c5840a63-85f5-62b0-c68f-2faa4aaea42b.webPlatform.png create mode 100644 Resources/images/cbac5b1d-0299-9db6-3747-c7aeaaaa37d0.webPlatform.png create mode 100644 Resources/images/e429a798-7e86-1f02-565e-39dfab41fe36.webPlatform.png create mode 100644 Resources/images/f1579c61-f17f-ff49-3f97-e942f202bebf.webPlatform.png create mode 100644 Resources/images/f178697f-630b-bafd-7c7d-e1287b98a969.webPlatform.png create mode 100644 Resources/images/f400aaaa-861c-78c0-0919-07a886e57304.webPlatform.png create mode 100644 Resources/images/f7842765-fff5-aa39-9f7f-fdd3024d4056.webPlatform.png create mode 100644 Resources/images/favicon.png create mode 100644 Resources/images/logo.png create mode 100644 Resources/images/me.jpeg create mode 100644 Resources/manifest.json create mode 100644 Resources/pwabuilder-sw-register.js create mode 100644 Resources/pwabuilder-sw.js (limited to 'Resources') diff --git a/Resources/CNAME b/Resources/CNAME new file mode 100644 index 0000000..ce3a35d --- /dev/null +++ b/Resources/CNAME @@ -0,0 +1 @@ +web.navan.dev diff --git a/Resources/Themes/styles.css b/Resources/Themes/styles.css new file mode 100644 index 0000000..4e658d7 --- /dev/null +++ b/Resources/Themes/styles.css @@ -0,0 +1,401 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-size: 16px; + -webkit-text-size-adjust: 100%; +} + +body { + background: #eee; + color: #000; + font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial; + text-align: center; +} + +.wrapper { + max-width: 900px; + margin-left: auto; + margin-right: auto; + padding: 40px; + text-align: left; +} + +header { + + background: #fff; + position: relative; + color: #ededed; + line-height: 1.5em; + padding: 0 20px; +} + +/* + +header { + background: #ededed; + margin-bottom: 0em; + padding-bottom: 2em; + left: 0px; + top: 0px; + height: 8em; + width: 100%; +} +.header-background { + background-image: url(images/logo.png); + background-size: 100% 100%; + background-repeat: no-repeat; + background-size: cover; + background-position: center; + height: 200px; +} +*/ + +header .wrapper { + padding-top: 20px; + padding-bottom: 20px; + text-align: left; +} + +header a { + text-decoration: none; +} + +header .site-name { + color: #000; + margin: 0; + cursor: pointer; + font-weight: 50; + font-size: 3.5em; /*#2.3em;*/ + line-height: 1em; + letter-spacing: 1px; +} + +nav { + /*margin-top: 0.5em;*/ + text-align: left; /* right */ +} + +nav li { + margin-top: 0.5em; + display: inline-block; + background-color: #000; + color: #ddd; + padding: 4px 6px; + border-radius: 5px; + margin-right: 5px; + +} + +nav li:hover { + color: #000; + background-color: #ddd; +} +h1 { + margin-bottom: 20px; + font-size: 2em; +} + +h2 { + margin: 20px 0; + font-size: 1.5em; +} + +p { + margin-bottom: 10px; + margin-top: 5px; +} + +a { + color: inherit; + +} + +.description { + margin-bottom: 20px; +} + +.item-list > li { + display: block; + padding: 20px; + border-radius: 20px; + background-color: #d3d3d3; + margin-bottom: 20px +} + +.item-list > li:last-child { + margin-bottom: 0; +} + +.item-list h1 { + margin-bottom: 0px; /*15px*/ + font-size: 1.3em; +} +.item-list a { + text-decoration: none; +} + +.item-list p { + margin-bottom: 0; +} + +.reading-time { + display: inline-block; + border-radius: 5px; + background-color: #ddd; + color: #000; + padding: 4px 4px; + margin-bottom: 5px; + margin-right: 5px; + +} + +.tag-list { + margin-bottom: 5px; /* 15px */ +} + +.tag-list li, +.tag { + display: inline-block; + background-color: #000; + color: #ddd; + padding: 4px 6px; + border-radius: 5px; + margin-right: 5px; + margin-top: 0.5em; +} + +.tag-list a, +.tag a { + text-decoration: none; +} + +.item-page .tag-list { + display: inline-block; +} + +.content { + margin-bottom: 40px; +} + +.browse-all { + display: block; + margin-bottom: 30px; +} + +.all-tags li { + font-size: 1.4em; + margin-right: 10px; + padding: 6px 10px; + margin-top: 1em; +} + +img { + max-width: 100%; + margin-bottom: 1em; + margin-top: 1em; + width: auto\9; + height: auto; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +footer { + color: #000; +} + + + +pre { + overflow-x: auto; + font-family: Monaco,Consolas,"Lucida Console",monospace; + display: block; + background-color: #fdf6e3; + color: #586e75; + margin-bottom: 1em; + margin-top: 1em; + border-radius: 4px; +} + +.highlight { background-color: #fdf6e3; color: #586e75; } +.highlight .c { color: #627272; } +.highlight .err { color: #586e75; } +.highlight .g { color: #586e75; } +.highlight .k { color: #677600; } +.highlight .l { color: #586e75; } +.highlight .n { color: #586e75; } +.highlight .o { color: #677600; } +.highlight .x { color: #c14715; } +.highlight .p { color: #586e75; } +.highlight .cm { color: #627272; } +.highlight .cp { color: #677600; } +.highlight .c1 { color: #627272; } +.highlight .cs { color: #677600; } +.highlight .gd { color: #217d74; } +.highlight .ge { color: #586e75; font-style: italic; } +.highlight .gr { color: #d72825; } +.highlight .gh { color: #c14715; } +.highlight .gi { color: #677600; } +.highlight .go { color: #586e75; } +.highlight .gp { color: #586e75; } +.highlight .gs { color: #586e75; font-weight: bold; } +.highlight .gu { color: #c14715; } +.highlight .gt { color: #586e75; } +.highlight .kc { color: #c14715; } +.highlight .kd { color: #1f76b6; } +.highlight .kn { color: #677600; } +.highlight .kp { color: #677600; } +.highlight .kr { color: #1f76b6; } +.highlight .kt { color: #d72825; } +.highlight .ld { color: #586e75; } +.highlight .m { color: #217d74; } +.highlight .s { color: #217d74; } +.highlight .na { color: #586e75; } +.highlight .nb { color: #8d6900; } +.highlight .nc { color: #1f76b6; } +.highlight .no { color: #c14715; } +.highlight .nd { color: #1f76b6; } +.highlight .ni { color: #c14715; } +.highlight .ne { color: #c14715; } +.highlight .nf { color: #1f76b6; } +.highlight .nl { color: #586e75; } +.highlight .nn { color: #586e75; } +.highlight .nx { color: #586e75; } +.highlight .py { color: #586e75; } +.highlight .nt { color: #1f76b6; } +.highlight .nv { color: #1f76b6; } +.highlight .ow { color: #677600; } +.highlight .w { color: #586e75; } +.highlight .mf { color: #217d74; } +.highlight .mh { color: #217d74; } +.highlight .mi { color: #217d74; } +.highlight .mo { color: #217d74; } +.highlight .sb { color: #627272; } +.highlight .sc { color: #217d74; } +.highlight .sd { color: #586e75; } +.highlight .s2 { color: #217d74; } +.highlight .se { color: #c14715; } +.highlight .sh { color: #586e75; } +.highlight .si { color: #217d74; } +.highlight .sx { color: #217d74; } +.highlight .sr { color: #d72825; } +.highlight .s1 { color: #217d74; } +.highlight .ss { color: #217d74; } +.highlight .bp { color: #1f76b6; } +.highlight .vc { color: #1f76b6; } +.highlight .vg { color: #1f76b6; } +.highlight .vi { color: #1f76b6; } +.highlight .il { color: #217d74; } + + +@media (prefers-color-scheme: dark) { + .reading-time { + background-color: #000; + color: #ddd; + } + body { + background-color: #222; + } + + body, + header .site-name { + color: #ddd; + } + nav li { + background-color: #ddd; + color: #000; + + } + nav li:hover { + color: #ddd; + background-color: #000; + } + + .item-list > li { + background-color: #333; + } + + header { + background-color: #000; + } + footer { + color: #ddd; + } + + pre { + background-color: #002b36; + color: #93a1a1; + } + + .highlight { background-color: #002b36; color: #93a1a1; } + .highlight .c { color: #759299; } + .highlight .err { color: #93a1a1; } + .highlight .g { color: #93a1a1; } + .highlight .k { color: #859900; } + .highlight .l { color: #93a1a1; } + .highlight .n { color: #93a1a1; } + .highlight .o { color: #859900; } + .highlight .x { color: #e9662f; } + .highlight .p { color: #93a1a1; } + .highlight .cm { color: #759299; } + .highlight .cp { color: #859900; } + .highlight .c1 { color: #759299; } + .highlight .cs { color: #859900; } + .highlight .gd { color: #2aa198; } + .highlight .ge { color: #93a1a1; font-style: italic; } + .highlight .gr { color: #e8625f; } + .highlight .gh { color: #e9662f; } + .highlight .gi { color: #859900; } + .highlight .go { color: #93a1a1; } + .highlight .gp { color: #93a1a1; } + .highlight .gs { color: #93a1a1; font-weight: bold; } + .highlight .gu { color: #e9662f; } + .highlight .gt { color: #93a1a1; } + .highlight .kc { color: #e9662f; } + .highlight .kd { color: #3294da; } + .highlight .kn { color: #859900; } + .highlight .kp { color: #859900; } + .highlight .kr { color: #3294da; } + .highlight .kt { color: #e8625f; } + .highlight .ld { color: #93a1a1; } + .highlight .m { color: #2aa198; } + .highlight .s { color: #2aa198; } + .highlight .na { color: #93a1a1; } + .highlight .nb { color: #B58900; } + .highlight .nc { color: #3294da; } + .highlight .no { color: #e9662f; } + .highlight .nd { color: #3294da; } + .highlight .ni { color: #e9662f; } + .highlight .ne { color: #e9662f; } + .highlight .nf { color: #3294da; } + .highlight .nl { color: #93a1a1; } + .highlight .nn { color: #93a1a1; } + .highlight .nx { color: #93a1a1; } + .highlight .py { color: #93a1a1; } + .highlight .nt { color: #3294da; } + .highlight .nv { color: #3294da; } + .highlight .ow { color: #859900; } + .highlight .w { color: #93a1a1; } + .highlight .mf { color: #2aa198; } + .highlight .mh { color: #2aa198; } + .highlight .mi { color: #2aa198; } + .highlight .mo { color: #2aa198; } + .highlight .sb { color: #759299; } + .highlight .sc { color: #2aa198; } + .highlight .sd { color: #93a1a1; } + .highlight .s2 { color: #2aa198; } + .highlight .se { color: #e9662f; } + .highlight .sh { color: #93a1a1; } + .highlight .si { color: #2aa198; } + .highlight .sx { color: #2aa198; } + .highlight .sr { color: #e8625f; } + .highlight .s1 { color: #2aa198; } + .highlight .ss { color: #2aa198; } + .highlight .bp { color: #3294da; } + .highlight .vc { color: #3294da; } + .highlight .vg { color: #3294da; } + .highlight .vi { color: #3294da; } + .highlight .il { color: #2aa198; } +} + diff --git a/Resources/assets/disqus.js b/Resources/assets/disqus.js new file mode 100644 index 0000000..0c52381 --- /dev/null +++ b/Resources/assets/disqus.js @@ -0,0 +1,5 @@ +(function() { + var t = document, + e = t.createElement("script"); + e.src = "https://navan-chauhan.disqus.com/embed.js", e.setAttribute("data-timestamp", +new Date), (t.head || t.body).appendChild(e) +})(); diff --git a/Resources/assets/gciTales/01-teachableMachines/.01-collect.png.icloud b/Resources/assets/gciTales/01-teachableMachines/.01-collect.png.icloud new file mode 100644 index 0000000..b291112 Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/.01-collect.png.icloud differ diff --git a/Resources/assets/gciTales/01-teachableMachines/02-train.png b/Resources/assets/gciTales/01-teachableMachines/02-train.png new file mode 100644 index 0000000..a69fd63 Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/02-train.png differ diff --git a/Resources/assets/gciTales/01-teachableMachines/03-label.png b/Resources/assets/gciTales/01-teachableMachines/03-label.png new file mode 100644 index 0000000..efe450d Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/03-label.png differ diff --git a/Resources/assets/gciTales/01-teachableMachines/04-alert.png b/Resources/assets/gciTales/01-teachableMachines/04-alert.png new file mode 100644 index 0000000..f648bad Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/04-alert.png differ diff --git a/Resources/assets/gciTales/01-teachableMachines/05-html.png b/Resources/assets/gciTales/01-teachableMachines/05-html.png new file mode 100644 index 0000000..f917c07 Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/05-html.png differ diff --git a/Resources/assets/gciTales/01-teachableMachines/06-js.png b/Resources/assets/gciTales/01-teachableMachines/06-js.png new file mode 100644 index 0000000..173a8aa Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/06-js.png differ diff --git a/Resources/assets/gciTales/01-teachableMachines/07-eg.png b/Resources/assets/gciTales/01-teachableMachines/07-eg.png new file mode 100644 index 0000000..cc8198e Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/07-eg.png differ diff --git a/Resources/assets/gciTales/01-teachableMachines/08-eg.png b/Resources/assets/gciTales/01-teachableMachines/08-eg.png new file mode 100644 index 0000000..b1261fa Binary files /dev/null and b/Resources/assets/gciTales/01-teachableMachines/08-eg.png differ diff --git a/Resources/assets/gciTales/03-regression/1.png b/Resources/assets/gciTales/03-regression/1.png new file mode 100644 index 0000000..b07d172 Binary files /dev/null and b/Resources/assets/gciTales/03-regression/1.png differ diff --git a/Resources/assets/gciTales/03-regression/2.png b/Resources/assets/gciTales/03-regression/2.png new file mode 100644 index 0000000..53531ad Binary files /dev/null and b/Resources/assets/gciTales/03-regression/2.png differ diff --git a/Resources/assets/gciTales/03-regression/3.png b/Resources/assets/gciTales/03-regression/3.png new file mode 100644 index 0000000..542d76e Binary files /dev/null and b/Resources/assets/gciTales/03-regression/3.png differ diff --git a/Resources/assets/gciTales/03-regression/4.png b/Resources/assets/gciTales/03-regression/4.png new file mode 100644 index 0000000..16101cd Binary files /dev/null and b/Resources/assets/gciTales/03-regression/4.png differ diff --git a/Resources/assets/gciTales/03-regression/5.png b/Resources/assets/gciTales/03-regression/5.png new file mode 100644 index 0000000..36b9c26 Binary files /dev/null and b/Resources/assets/gciTales/03-regression/5.png differ diff --git a/Resources/assets/gciTales/03-regression/6.png b/Resources/assets/gciTales/03-regression/6.png new file mode 100644 index 0000000..479d0e5 Binary files /dev/null and b/Resources/assets/gciTales/03-regression/6.png differ diff --git a/Resources/assets/main.css b/Resources/assets/main.css new file mode 100644 index 0000000..99962e2 --- /dev/null +++ b/Resources/assets/main.css @@ -0,0 +1,369 @@ +/* Generated by Pygments CSS Theme Builder - https://jwarby.github.io/jekyll-pygments-themes/builder.html */ +/* Base Style */ +.codehilite pre { + overflow-x:auto; + color: #fefefe; + text-shadow: 0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975; + background-image: linear-gradient(to bottom, #2a2139 75%, #34294f); + background-color: #2a2139; + margin-bottom: 1rem; + margin-top: 1rem; +} +/* Punctuation */ +.codehilite .p { + color: #ff7edb; + text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3; + background-color: #2a2139; +} +/* Error */ +.codehilite .err { + color: #ff7edb; + text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3; + background-color: #2a2139; +} +/* Base Style */ +.codehilite .n { + color: #ff7edb; + text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3; + text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3; + background-color: transparent; +} +/* Name Attribute */ +.codehilite .na { + color: #fede5d; + background-color: transparent; +} +/* Name Builtin */ +.codehilite .nb { + color: #fe4450; + background-color: transparent; +} +/* Name Class */ +.codehilite .nc { + color: #fe4450; + background-color: transparent; +} +/* Name Constant */ +.codehilite .no { + color: transparent; + background-color: transparent; +} +/* Name Decorator */ +.codehilite .nd { + color: transparent; + background-color: transparent; +} +/* Name Entity */ +.codehilite .ni { + color: transparent; + background-color: transparent; +} +/* Name Exception */ +.codehilite .ne { + color: #fe4450; + background-color: transparent; +} +/* Name Function */ +.codehilite .nf { + color: #36f9f6; + background-color: transparent; +} +/* Name Label */ +.codehilite .nl { + color: transparent; + background-color: transparent; +} +/* Name Namespace */ +.codehilite .nn { + color: #f97e72; + background-color: transparent; +} +/* Name Other */ +.codehilite .nx { + color: #36f9f6; + background-color: transparent; +} +/* Name Property */ +.codehilite .py { + color: transparent; + background-color: transparent; +} +/* Name Tag */ +.codehilite .nt { + color: #72f1b8; + text-shadow: 0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475; + background-color: transparent; +} +/* Name Variable */ +.codehilite .nv { + color: #bbbbbb; + background-color: transparent; +} +/* Name Variable Class */ +.codehilite .vc { + color: transparent; + background-color: transparent; +} +/* Name Variable Global */ +.codehilite .vg { + color: transparent; + background-color: transparent; +} +/* Name Variable Instance */ +.codehilite .vi { + color: transparent; + background-color: transparent; +} +/* Name Builtin Pseudo */ +.codehilite .bp { + color: #36f9f6; + background-color: transparent; +} +/* Base Style */ +.codehilite .g { + color: transparent; + background-color: transparent; +} +/* */ +.codehilite .gd { + color: transparent; + background-color: transparent; +} +/* Base Style */ +.codehilite .o { + color: #fefefe; + text-shadow: 0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975; + background-color: transparent; +} +/* Operator Word */ +.codehilite .ow { + color: #fede5d; + background-color: transparent; +} +/* Base Style */ +.codehilite .c { + color: #848bbd; + background-color: transparent; +} +/* Comment Multiline */ +.codehilite .cm { + color: #848bbd; + background-color: transparent; +} +/* Comment Preproc */ +.codehilite .cp { + color: #848bbd; + background-color: transparent; +} +/* Comment Single */ +.codehilite .c1 { + color: #848bbd; + background-color: transparent; +} +/* Comment Special */ +.codehilite .cs { + color: #848bbd; + background-color: transparent; +} +/* Base Style */ +.codehilite .k { + color: #fede5d; + background-color: transparent; +} +/* Keyword Constant */ +.codehilite .kc { + color: #f97e72; + background-color: transparent; +} +/* Keyword Declaration */ +.codehilite .kd { + color: #fede5d; + background-color: transparent; +} +/* Keyword Namespace */ +.codehilite .kn { + color: #fede5d; + background-color: transparent; +} +/* Keyword Pseudo */ +.codehilite .kp { + color: #fede5d; + background-color: transparent; +} +/* Keyword Reserved */ +.codehilite .kr { + color: #fede5d; + background-color: transparent; +} +/* Keyword Type */ +.codehilite .kt { + color: #fede5d; + background-color: transparent; +} +/* Base Style */ +.codehilite .l { + color: #36f9f6; + background-color: transparent; +} +/* Literal Date */ +.codehilite .ld { + color: #36f9f6; + background-color: transparent; +} +/* Literal Number */ +.codehilite .m { + color: #36f9f6; + background-color: transparent; +} +/* Literal Number Float */ +.codehilite .mf { + color: #36f9f6; + background-color: transparent; +} +/* Literal Number Hex */ +.codehilite .mh { + color: #36f9f6; + background-color: transparent; +} +/* Literal Number Integer */ +.codehilite .mi { + color: #f97e72; + background-color: transparent; +} +/* Literal Number Oct */ +.codehilite .mo { + color: #36f9f6; + background-color: transparent; +} +/* Literal Number Integer Long */ +.codehilite .il { + color: #36f9f6; + background-color: transparent; +} +/* Literal String */ +.codehilite .s { + color: #ff8b39; + text-shadow: 0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575; + background-color: transparent; +} +/* Literal String Backtick */ +.codehilite .sb { + color: #36f9f6; + background-color: transparent; +} +/* Literal String Char */ +.codehilite .sc { + color: #36f9f6; + background-color: transparent; +} +/* Literal String Doc */ +.codehilite .sd { + color: #848bbd; + background-color: transparent; +} +/* Literal String Double */ +.codehilite .s2 { + color: #36f9f6; + background-color: transparent; +} +/* Literal String Escape */ +.codehilite .se { + color: #36f9f6; + background-color: transparent; +} +/* Literal String Heredoc */ +.codehilite .sh { + color: #36f9f6; + background-color: transparent; +} +/* Literal String Interpol */ +.codehilite .si { + color: #36f9f6; + background-color: transparent; +} +/* Literal String Other */ +.codehilite .sx { + color: #36f9f6; + background-color: transparent; +} +/* Literal String Regex */ +.codehilite .sr { + color: transparent; + background-color: transparent; +} +/* Literal String Single */ +.codehilite .s1 { + color: #ff8b39; + text-shadow: 0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575; + background-color: transparent; +} +/* Literal String Symbol */ +.codehilite .ss { + color: #36f9f6; + background-color: transparent; +} +/* Base Style */ +.codehilite .g { + color: transparent; + background-color: transparent; +} +/* Generic Deleted */ +.codehilite .gd { + color: transparent; + background-color: transparent; +} +/* Generic Emph */ +.codehilite .ge { + color: transparent; + background-color: transparent; +} +/* Generic Error */ +.codehilite .gr { + color: transparent; + background-color: transparent; +} +/* Generic Heading */ +.codehilite .gh { + color: transparent; + background-color: transparent; +} +/* Generic Inserted */ +.codehilite .gi { + color: transparent; + background-color: transparent; +} +/* Generic Output */ +.codehilite .go { + color: transparent; + background-color: transparent; +} +/* Generic Prompt */ +.codehilite .gp { + color: transparent; + background-color: transparent; +} +/* Generic Strong */ +.codehilite .gs { + color: transparent; + background-color: transparent; +} +/* Generic Subheading */ +.codehilite .gu { + color: transparent; + background-color: transparent; +} +/* Generic Traceback */ +.codehilite .gt { + color: transparent; + background-color: transparent; +} +/* Other */ +.codehilite .x { + color: transparent; + background-color: transparent; +} +/* Text Whitespace */ +.codehilite .w { + color: transparent; + background-color: transparent; +} diff --git a/Resources/assets/manup.min.js b/Resources/assets/manup.min.js new file mode 100644 index 0000000..20bc3a1 --- /dev/null +++ b/Resources/assets/manup.min.js @@ -0,0 +1 @@ +var manUpObject,tagArray=[],linkArray=[],validMetaValues=[{name:"mobile-web-app-capable",manifestName:"display"},{name:"apple-mobile-web-app-capable",manifestName:"display"},{name:"apple-mobile-web-app-title",manifestName:"short_name"},{name:"application-name",manifestName:"short_name"},{name:"msapplication-TileColor",manifestName:"ms_TileColor"},{name:"msapplication-square70x70logo",manifestName:"icons",imageSize:"70x70"},{name:"msapplication-square150x150logo",manifestName:"icons",imageSize:"150x150"},{name:"msapplication-wide310x150logo",manifestName:"icons",imageSize:"310x150"},{name:"msapplication-square310x310logo",manifestName:"icons",imageSize:"310x310"}],validLinkValues=[{name:"apple-touch-icon",manifestName:"icons",imageSize:"152x152"},{name:"apple-touch-icon",manifestName:"icons",imageSize:"120x120"},{name:"apple-touch-icon",manifestName:"icons",imageSize:"76x76"},{name:"apple-touch-icon",manifestName:"icons",imageSize:"60x60"},{name:"apple-touch-icon",manifestName:"icons",imageSize:"57x57"},{name:"apple-touch-icon",manifestName:"icons",imageSize:"72x72"},{name:"apple-touch-icon",manifestName:"icons",imageSize:"114x114"},{name:"icon",manifestName:"icons",imageSize:"128x128"},{name:"icon",manifestName:"icons",imageSize:"192x192"}],generateFullMetaData=function(){for(var e=0;e 1 && arguments[1] !== undefined ? arguments[1] : 100000; + + if (firstImage.naturalWidth) { + this._buidAfterFirstImageLoad(firstImage); + } else { + if (maxCounter > 0) { + maxCounter--; + setTimeout(function () { + _this._load(firstImage, maxCounter); + }, 100); + } else { + console.error('error loading images'); + } + } +}; +/** + * + * @private + */ + + +Dics.prototype._buidAfterFirstImageLoad = function (firstImage) { + this._setContainerWidth(firstImage); + + this._build(); + + this._setEvents(); +}; +/** + * + * @private + */ + + +Dics.prototype._setContainerWidth = function (firstImage) { + this.options.container.style.height = "".concat(this._calcContainerHeight(firstImage), "px"); +}; +/** + * + * @private + */ + + +Dics.prototype._setOpacityContainerForLoading = function (opacity) { + this.options.container.style.opacity = opacity; +}; +/** + * Build HTML + * @private + */ + + +Dics.prototype._build = function () { + var dics = this; + + dics._applyGlobalClass(dics.options); + + var imagesLength = dics.images.length; + var initialImagesContainerWidth = dics.container.getBoundingClientRect()[dics.config.sizeField] / imagesLength; + + for (var i = 0; i < imagesLength; i++) { + var image = dics.images[i]; + + var section = dics._createElement('div', 'b-dics__section'); + + var imageContainer = dics._createElement('div', 'b-dics__image-container'); + + var slider = dics._createSlider(i, initialImagesContainerWidth); + + dics._createAltText(image, i, imageContainer); + + dics._applyFilter(image, i, dics.options.filters); + + dics._rotate(image, imageContainer); + + section.setAttribute('data-function', 'b-dics__section'); + section.style.flex = "0 0 ".concat(initialImagesContainerWidth, "px"); + image.classList.add('b-dics__image'); + section.appendChild(imageContainer); + imageContainer.appendChild(image); + + if (i < imagesLength - 1) { + section.appendChild(slider); + } + + dics.container.appendChild(section); + image.style[this.config.positionField] = "".concat(i * -initialImagesContainerWidth, "px"); + } + + this.sections = this._getSections(); + + this._setOpacityContainerForLoading(1); +}; +/** + * + * @returns {NodeListOf | NodeListOf | NodeListOf} + * @private + */ + + +Dics.prototype._getImages = function () { + return this.container.querySelectorAll('img'); +}; +/** + * + * @returns {NodeListOf | NodeListOf | NodeListOf} + * @private + */ + + +Dics.prototype._getSections = function () { + return this.container.querySelectorAll('[data-function="b-dics__section"]'); +}; +/** + * + * @param elementClass + * @param className + * @returns {HTMLElement | HTMLSelectElement | HTMLLegendElement | HTMLTableCaptionElement | HTMLTextAreaElement | HTMLModElement | HTMLHRElement | HTMLOutputElement | HTMLPreElement | HTMLEmbedElement | HTMLCanvasElement | HTMLFrameSetElement | HTMLMarqueeElement | HTMLScriptElement | HTMLInputElement | HTMLUnknownElement | HTMLMetaElement | HTMLStyleElement | HTMLObjectElement | HTMLTemplateElement | HTMLBRElement | HTMLAudioElement | HTMLIFrameElement | HTMLMapElement | HTMLTableElement | HTMLAnchorElement | HTMLMenuElement | HTMLPictureElement | HTMLParagraphElement | HTMLTableDataCellElement | HTMLTableSectionElement | HTMLQuoteElement | HTMLTableHeaderCellElement | HTMLProgressElement | HTMLLIElement | HTMLTableRowElement | HTMLFontElement | HTMLSpanElement | HTMLTableColElement | HTMLOptGroupElement | HTMLDataElement | HTMLDListElement | HTMLFieldSetElement | HTMLSourceElement | HTMLBodyElement | HTMLDirectoryElement | HTMLDivElement | HTMLUListElement | HTMLHtmlElement | HTMLAreaElement | HTMLMeterElement | HTMLAppletElement | HTMLFrameElement | HTMLOptionElement | HTMLImageElement | HTMLLinkElement | HTMLHeadingElement | HTMLSlotElement | HTMLVideoElement | HTMLBaseFontElement | HTMLTitleElement | HTMLButtonElement | HTMLHeadElement | HTMLParamElement | HTMLTrackElement | HTMLOListElement | HTMLDataListElement | HTMLLabelElement | HTMLFormElement | HTMLTimeElement | HTMLBaseElement} + * @private + */ + + +Dics.prototype._createElement = function (elementClass, className) { + var newElement = document.createElement(elementClass); + newElement.classList.add(className); + return newElement; +}; +/** + * Set need DOM events + * @private + */ + + +Dics.prototype._setEvents = function () { + var dics = this; + + dics._disableImageDrag(); + + dics._isGoingRight = null; + var oldx = 0; + + var listener = function listener(event) { + var xPageCoord = event.pageX ? event.pageX : event.touches[0].pageX; + + if (xPageCoord < oldx) { + dics._isGoingRight = false; + } else if (xPageCoord > oldx) { + dics._isGoingRight = true; + } + + oldx = xPageCoord; + + var position = dics._calcPosition(event); + + var beforeSectionsWidth = dics._beforeSectionsWidth(dics.sections, dics.images, dics._activeSlider); + + var calcMovePixels = position - beforeSectionsWidth; + dics.sliders[dics._activeSlider].style[dics.config.positionField] = "".concat(position, "px"); + + dics._pushSections(calcMovePixels, position); + }; + + dics.container.addEventListener('click', listener); + + var _loop = function _loop(i) { + var slider = dics.sliders[i]; + utils.setMultiEvents(slider, ['mousedown', 'touchstart'], function (event) { + dics._activeSlider = i; + dics._clickPosition = dics._calcPosition(event); + slider.classList.add('b-dics__slider--active'); + utils.setMultiEvents(dics.container, ['mousemove', 'touchmove'], listener); + }); + }; + + for (var i = 0; i < dics.sliders.length; i++) { + _loop(i); + } + + var listener2 = function listener2() { + var activeElements = dics.container.querySelectorAll('.b-dics__slider--active'); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = activeElements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var activeElement = _step.value; + activeElement.classList.remove('b-dics__slider--active'); + utils.removeMultiEvents(dics.container, ['mousemove', 'touchmove'], listener); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + }; + + utils.setMultiEvents(document.body, ['mouseup', 'touchend'], listener2); +}; +/** + * + * @param sections + * @param images + * @param activeSlider + * @returns {number} + * @private + */ + + +Dics.prototype._beforeSectionsWidth = function (sections, images, activeSlider) { + var width = 0; + + for (var i = 0; i < sections.length; i++) { + var section = sections[i]; + + if (i !== activeSlider) { + width += section.getBoundingClientRect()[this.config.sizeField]; + } else { + return width; + } + } +}; +/** + * + * @returns {number} + * @private + */ + + +Dics.prototype._calcContainerHeight = function (firstImage) { + var imgHeight = firstImage.naturalHeight; + var imgWidth = firstImage.naturalWidth; + var containerWidth = this.options.container.getBoundingClientRect().width; + return containerWidth / imgWidth * imgHeight; +}; +/** + * + * @param sections + * @param images + * @private + */ + + +Dics.prototype._setLeftToImages = function (sections, images) { + var size = 0; + + for (var i = 0; i < images.length; i++) { + var image = images[i]; + image.style[this.config.positionField] = "-".concat(size, "px"); + size += sections[i].getBoundingClientRect()[this.config.sizeField]; + this.sliders[i].style[this.config.positionField] = "".concat(size, "px"); + } +}; +/** + * + * @private + */ + + +Dics.prototype._disableImageDrag = function () { + for (var i = 0; i < this.images.length; i++) { + this.sliders[i].addEventListener('dragstart', function (e) { + e.preventDefault(); + }); + this.images[i].addEventListener('dragstart', function (e) { + e.preventDefault(); + }); + } +}; +/** + * + * @param image + * @param index + * @param filters + * @private + */ + + +Dics.prototype._applyFilter = function (image, index, filters) { + if (filters) { + image.style.filter = filters[index]; + } +}; +/** + * + * @param options + * @private + */ + + +Dics.prototype._applyGlobalClass = function (options) { + var container = options.container; + + if (options.hideTexts) { + container.classList.add('b-dics--hide-texts'); + } + + if (options.linesOrientation === 'vertical') { + container.classList.add('b-dics--vertical'); + } + + if (options.textPosition === 'center') { + container.classList.add('b-dics--tp-center'); + } else if (options.textPosition === 'bottom') { + container.classList.add('b-dics--tp-bottom'); + } else if (options.textPosition === 'left') { + container.classList.add('b-dics--tp-left'); + } else if (options.textPosition === 'right') { + container.classList.add('b-dics--tp-right'); + } +}; + +Dics.prototype._createSlider = function (i, initialImagesContainerWidth) { + var slider = this._createElement('div', 'b-dics__slider'); + + if (this.options.linesColor) { + slider.style.color = this.options.linesColor; + } + + slider.style[this.config.positionField] = "".concat(initialImagesContainerWidth * (i + 1), "px"); + this.sliders.push(slider); + return slider; +}; +/** + * + * @param image + * @param i + * @param imageContainer + * @private + */ + + +Dics.prototype._createAltText = function (image, i, imageContainer) { + var textContent = image.getAttribute('alt'); + + if (textContent) { + var text = this._createElement('p', 'b-dics__text'); + + if (this.options.arrayBackgroundColorText) { + text.style.backgroundColor = this.options.arrayBackgroundColorText[i]; + } + + if (this.options.arrayColorText) { + text.style.color = this.options.arrayColorText[i]; + } + + text.appendChild(document.createTextNode(textContent)); + imageContainer.appendChild(text); + } +}; +/** + * + * @param image + * @param imageContainer + * @private + */ + + +Dics.prototype._rotate = function (image, imageContainer) { + image.style.rotate = "-".concat(this.options.rotate); + imageContainer.style.rotate = this.options.rotate; +}; +/** + * + * @private + */ + + +Dics.prototype._removeActiveElements = function () { + var activeElements = Dics.container.querySelectorAll('.b-dics__slider--active'); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = activeElements[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var activeElement = _step2.value; + activeElement.classList.remove('b-dics__slider--active'); + utils.removeMultiEvents(Dics.container, ['mousemove', 'touchmove'], Dics.prototype._removeActiveElements); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } +}; +/** + * + * @param linesOrientation + * @private + */ + + +Dics.prototype._setOrientation = function (linesOrientation) { + this.config = {}; + + if (linesOrientation === 'vertical') { + this.config.offsetSizeField = 'offsetHeight'; + this.config.offsetPositionField = 'offsetTop'; + this.config.sizeField = 'height'; + this.config.positionField = 'top'; + this.config.clientField = 'clientY'; + this.config.pageField = 'pageY'; + } else { + this.config.offsetSizeField = 'offsetWidth'; + this.config.offsetPositionField = 'offsetLeft'; + this.config.sizeField = 'width'; + this.config.positionField = 'left'; + this.config.clientField = 'clientX'; + this.config.pageField = 'pageX'; + } +}; +/** + * + * @param event + * @returns {number} + * @private + */ + + +Dics.prototype._calcPosition = function (event) { + var containerCoords = this.container.getBoundingClientRect(); + var pixel = !isNaN(event[this.config.clientField]) ? event[this.config.clientField] : event.touches[0][this.config.clientField]; + return containerCoords[this.config.positionField] < pixel ? pixel - containerCoords[this.config.positionField] : 0; +}; +/** + * + * @private + */ + + +Dics.prototype._pushSections = function (calcMovePixels, position) { + // if (this._rePosUnderActualSections(position)) { + this._setFlex(position, this._isGoingRight); + + var section = this.sections[this._activeSlider]; + var postActualSection = this.sections[this._activeSlider + 1]; + + var sectionWidth = postActualSection.getBoundingClientRect()[this.config.sizeField] - (calcMovePixels - this.sections[this._activeSlider].getBoundingClientRect()[this.config.sizeField]); + + section.style.flex = this._isGoingRight === true ? "2 0 ".concat(calcMovePixels, "px") : "1 1 ".concat(calcMovePixels, "px"); + postActualSection.style.flex = this._isGoingRight === true ? " ".concat(sectionWidth, "px") : "2 0 ".concat(sectionWidth, "px"); + + this._setLeftToImages(this.sections, this.images); // } + +}; +/** + * + * @private + */ + + +Dics.prototype._setFlex = function (position, isGoingRight) { + var beforeSumSectionsSize = 0; + + for (var i = 0; i < this.sections.length; i++) { + var section = this.sections[i]; + var sectionSize = section.getBoundingClientRect()[this.config.sizeField]; + beforeSumSectionsSize += sectionSize; + + if (isGoingRight && position > beforeSumSectionsSize - sectionSize && i > this._activeSlider || !isGoingRight && position < beforeSumSectionsSize && i < this._activeSlider) { + section.style.flex = "1 100 ".concat(sectionSize, "px"); + } else { + section.style.flex = "0 0 ".concat(sectionSize, "px"); + } + } +}; +/** + * + * @type {{extend: (function(*=, *, *): *), setMultiEvents: setMultiEvents, removeMultiEvents: removeMultiEvents, getConstructor: (function(*=): string)}} + */ + + +var utils = { + /** + * Native extend object + * @param target + * @param objects + * @param options + * @returns {*} + */ + extend: function extend(target, objects, options) { + for (var object in objects) { + if (objects.hasOwnProperty(object)) { + recursiveMerge(target, objects[object]); + } + } + + function recursiveMerge(target, object) { + for (var property in object) { + if (object.hasOwnProperty(property)) { + var current = object[property]; + + if (utils.getConstructor(current) === 'Object') { + if (!target[property]) { + target[property] = {}; + } + + recursiveMerge(target[property], current); + } else { + // clearEmpty + if (options.clearEmpty) { + if (current == null) { + continue; + } + } + + target[property] = current; + } + } + } + } + + return target; + }, + + /** + * Set Multi addEventListener + * @param element + * @param events + * @param func + */ + setMultiEvents: function setMultiEvents(element, events, func) { + for (var i = 0; i < events.length; i++) { + element.addEventListener(events[i], func); + } + }, + + /** + * + * @param element + * @param events + * @param func + */ + removeMultiEvents: function removeMultiEvents(element, events, func) { + for (var i = 0; i < events.length; i++) { + element.removeEventListener(events[i], func, false); + } + }, + + /** + * Get object constructor + * @param object + * @returns {string} + */ + getConstructor: function getConstructor(object) { + return Object.prototype.toString.call(object).slice(8, -1); + } +}; \ No newline at end of file diff --git a/Resources/assets/posts/open-babel/s1.png b/Resources/assets/posts/open-babel/s1.png new file mode 100644 index 0000000..ec988a4 Binary files /dev/null and b/Resources/assets/posts/open-babel/s1.png differ diff --git a/Resources/assets/posts/open-babel/s2.jpg b/Resources/assets/posts/open-babel/s2.jpg new file mode 100644 index 0000000..7ece652 Binary files /dev/null and b/Resources/assets/posts/open-babel/s2.jpg differ diff --git a/Resources/assets/posts/open-babel/s3.jpg b/Resources/assets/posts/open-babel/s3.jpg new file mode 100644 index 0000000..5803e97 Binary files /dev/null and b/Resources/assets/posts/open-babel/s3.jpg differ diff --git a/Resources/assets/posts/open-peeps/ex-1.svg b/Resources/assets/posts/open-peeps/ex-1.svg new file mode 100644 index 0000000..7831d9b --- /dev/null +++ b/Resources/assets/posts/open-peeps/ex-1.svg @@ -0,0 +1 @@ +Asset 1 \ No newline at end of file diff --git "a/Resources/assets/r\303\251sum\303\251.pdf" "b/Resources/assets/r\303\251sum\303\251.pdf" new file mode 100644 index 0000000..8931b18 Binary files /dev/null and "b/Resources/assets/r\303\251sum\303\251.pdf" differ diff --git a/Resources/assets/sakura.css b/Resources/assets/sakura.css new file mode 100644 index 0000000..61c929e --- /dev/null +++ b/Resources/assets/sakura.css @@ -0,0 +1,186 @@ +/* Sakura.css v1.3.0 + * ================ + * Minimal css theme. + * Project: https://github.com/oxalorg/sakura/ + */ +/* Body */ +html { + font-size: 62.5%; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; } + +body { + font-size: 1.8rem; + line-height: 1.618; + max-width: 38em; + margin: auto; + color: #4a4a4a; + background-color: #f9f9f9; + padding: 13px; } + +@media (max-width: 684px) { + body { + font-size: 1.53rem; } } + +@media (max-width: 382px) { + body { + font-size: 1.35rem; } } + +h1, h2, h3, h4, h5, h6 { + line-height: 1.1; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + font-weight: 700; + margin-top: 3rem; + margin-bottom: 1.5rem; + overflow-wrap: break-word; + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; } + +h1 { + font-size: 2.35em; } + +h2 { + font-size: 2.00em; } + +h3 { + font-size: 1.75em; } + +h4 { + font-size: 1.5em; } + +h5 { + font-size: 1.25em; } + +h6 { + font-size: 1em; } + +p { + margin-top: 0px; + margin-bottom: 2.5rem; } + +small, sub, sup { + font-size: 75%; } + +hr { + border-color: #2c8898; } + +a { + text-decoration: none; + color: #2c8898; } + a:hover { + color: #982c61; + border-bottom: 2px solid #4a4a4a; } + +ul { + padding-left: 1.4em; + margin-top: 0px; + margin-bottom: 2.5rem; } + +li { + margin-bottom: 0.4em; } + +blockquote { + margin-left: 0px; + margin-right: 0px; + padding-left: 1em; + padding-top: 0.8em; + padding-bottom: 0.8em; + padding-right: 0.8em; + border-left: 5px solid #2c8898; + margin-bottom: 2.5rem; + background-color: #f1f1f1; } + +blockquote p { + margin-bottom: 0; } + +img { + height: auto; + max-width: 100%; + margin-top: 0px; + margin-bottom: 2.5rem; } + +/* Pre and Code */ +pre { + background-color: #f1f1f1; + display: block; + padding: 1em; + overflow-x: auto; + margin-top: 0px; + margin-bottom: 2.5rem; } + +code { + font-size: 0.9em; + padding: 0 0.5em; + background-color: #f1f1f1; + white-space: pre-wrap; } + +pre > code { + padding: 0; + background-color: transparent; + white-space: pre; } + +/* Tables */ +table { + text-align: justify; + width: 100%; + border-collapse: collapse; } + +td, th { + padding: 0.5em; + border-bottom: 1px solid #f1f1f1; } + +/* Buttons, forms and input */ +input, textarea { + border: 1px solid #4a4a4a; } + input:focus, textarea:focus { + border: 1px solid #2c8898; } + +textarea { + width: 100%; } + +.button, button, input[type="submit"], input[type="reset"], input[type="button"] { + display: inline-block; + padding: 5px 10px; + text-align: center; + text-decoration: none; + white-space: nowrap; + background-color: #2c8898; + color: #f9f9f9; + border-radius: 1px; + border: 1px solid #2c8898; + cursor: pointer; + box-sizing: border-box; } + .button[disabled], button[disabled], input[type="submit"][disabled], input[type="reset"][disabled], input[type="button"][disabled] { + cursor: default; + opacity: .5; } + .button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type="submit"]:focus:enabled, input[type="submit"]:hover:enabled, input[type="reset"]:focus:enabled, input[type="reset"]:hover:enabled, input[type="button"]:focus:enabled, input[type="button"]:hover:enabled { + background-color: #982c61; + border-color: #982c61; + color: #f9f9f9; + outline: 0; } + +textarea, select, input[type] { + color: #4a4a4a; + padding: 6px 10px; + /* The 6px vertically centers text on FF, ignored by Webkit */ + margin-bottom: 10px; + background-color: #f1f1f1; + border: 1px solid #f1f1f1; + border-radius: 4px; + box-shadow: none; + box-sizing: border-box; } + textarea:focus, select:focus, input[type]:focus { + border: 1px solid #2c8898; + outline: 0; } + +input[type="checkbox"]:focus { + outline: 1px dotted #2c8898; } + +label, legend, fieldset { + display: block; + margin-bottom: .5rem; + font-weight: 600; } diff --git a/Resources/googlecb0897d479c87d97.html b/Resources/googlecb0897d479c87d97.html new file mode 100644 index 0000000..5907da5 --- /dev/null +++ b/Resources/googlecb0897d479c87d97.html @@ -0,0 +1 @@ +google-site-verification: googlecb0897d479c87d97.html \ No newline at end of file diff --git a/Resources/images/04d0580b-d347-476a-232d-9568839851cd.webPlatform.png b/Resources/images/04d0580b-d347-476a-232d-9568839851cd.webPlatform.png new file mode 100644 index 0000000..c277bbc Binary files /dev/null and b/Resources/images/04d0580b-d347-476a-232d-9568839851cd.webPlatform.png differ diff --git a/Resources/images/14a6e126-4866-93de-8df5-e0e6a3c65da1.webPlatform.png b/Resources/images/14a6e126-4866-93de-8df5-e0e6a3c65da1.webPlatform.png new file mode 100644 index 0000000..643a2bd Binary files /dev/null and b/Resources/images/14a6e126-4866-93de-8df5-e0e6a3c65da1.webPlatform.png differ diff --git a/Resources/images/15294abc-6c7c-ffb8-df8d-d2fad23f50b0.webPlatform.png b/Resources/images/15294abc-6c7c-ffb8-df8d-d2fad23f50b0.webPlatform.png new file mode 100644 index 0000000..1dcb03d Binary files /dev/null and b/Resources/images/15294abc-6c7c-ffb8-df8d-d2fad23f50b0.webPlatform.png differ diff --git a/Resources/images/6b5f7f70-557f-0e4b-3d76-127534525db9.webPlatform.png b/Resources/images/6b5f7f70-557f-0e4b-3d76-127534525db9.webPlatform.png new file mode 100644 index 0000000..02e58c4 Binary files /dev/null and b/Resources/images/6b5f7f70-557f-0e4b-3d76-127534525db9.webPlatform.png differ diff --git a/Resources/images/82e24f17-2e71-90d8-67a7-587163282ebf.webPlatform.png b/Resources/images/82e24f17-2e71-90d8-67a7-587163282ebf.webPlatform.png new file mode 100644 index 0000000..cc36571 Binary files /dev/null and b/Resources/images/82e24f17-2e71-90d8-67a7-587163282ebf.webPlatform.png differ diff --git a/Resources/images/8c0ffe9e-b615-96cd-3e18-ab4307c859a0.webPlatform.png b/Resources/images/8c0ffe9e-b615-96cd-3e18-ab4307c859a0.webPlatform.png new file mode 100644 index 0000000..76e34bc Binary files /dev/null and b/Resources/images/8c0ffe9e-b615-96cd-3e18-ab4307c859a0.webPlatform.png differ diff --git a/Resources/images/9384518b-2a6c-0abc-136c-8c8faf49c71b.webPlatform.png b/Resources/images/9384518b-2a6c-0abc-136c-8c8faf49c71b.webPlatform.png new file mode 100644 index 0000000..f659b0b Binary files /dev/null and b/Resources/images/9384518b-2a6c-0abc-136c-8c8faf49c71b.webPlatform.png differ diff --git a/Resources/images/9bf4aee8-92e3-932f-5388-7731928b5692.webPlatform.png b/Resources/images/9bf4aee8-92e3-932f-5388-7731928b5692.webPlatform.png new file mode 100644 index 0000000..31c4507 Binary files /dev/null and b/Resources/images/9bf4aee8-92e3-932f-5388-7731928b5692.webPlatform.png differ diff --git a/Resources/images/9dc22996-fd1b-b2d3-3627-cef4fa224e25.webPlatform.png b/Resources/images/9dc22996-fd1b-b2d3-3627-cef4fa224e25.webPlatform.png new file mode 100644 index 0000000..baf1814 Binary files /dev/null and b/Resources/images/9dc22996-fd1b-b2d3-3627-cef4fa224e25.webPlatform.png differ diff --git a/Resources/images/afd91c53-cfd0-b52e-ca49-1db0cc292b7d.webPlatform.png b/Resources/images/afd91c53-cfd0-b52e-ca49-1db0cc292b7d.webPlatform.png new file mode 100644 index 0000000..adbf1a3 Binary files /dev/null and b/Resources/images/afd91c53-cfd0-b52e-ca49-1db0cc292b7d.webPlatform.png differ diff --git a/Resources/images/b0cac729-56cb-2a63-7e8b-ac62a038a023.webPlatform.png b/Resources/images/b0cac729-56cb-2a63-7e8b-ac62a038a023.webPlatform.png new file mode 100644 index 0000000..7cfe2a7 Binary files /dev/null and b/Resources/images/b0cac729-56cb-2a63-7e8b-ac62a038a023.webPlatform.png differ diff --git a/Resources/images/bb0aca46-4612-c284-055f-58850c0730bd.webPlatform.png b/Resources/images/bb0aca46-4612-c284-055f-58850c0730bd.webPlatform.png new file mode 100644 index 0000000..a5be51a Binary files /dev/null and b/Resources/images/bb0aca46-4612-c284-055f-58850c0730bd.webPlatform.png differ diff --git a/Resources/images/c5840a63-85f5-62b0-c68f-2faa4aaea42b.webPlatform.png b/Resources/images/c5840a63-85f5-62b0-c68f-2faa4aaea42b.webPlatform.png new file mode 100644 index 0000000..bbc54fc Binary files /dev/null and b/Resources/images/c5840a63-85f5-62b0-c68f-2faa4aaea42b.webPlatform.png differ diff --git a/Resources/images/cbac5b1d-0299-9db6-3747-c7aeaaaa37d0.webPlatform.png b/Resources/images/cbac5b1d-0299-9db6-3747-c7aeaaaa37d0.webPlatform.png new file mode 100644 index 0000000..80c3c4f Binary files /dev/null and b/Resources/images/cbac5b1d-0299-9db6-3747-c7aeaaaa37d0.webPlatform.png differ diff --git a/Resources/images/e429a798-7e86-1f02-565e-39dfab41fe36.webPlatform.png b/Resources/images/e429a798-7e86-1f02-565e-39dfab41fe36.webPlatform.png new file mode 100644 index 0000000..f1bc144 Binary files /dev/null and b/Resources/images/e429a798-7e86-1f02-565e-39dfab41fe36.webPlatform.png differ diff --git a/Resources/images/f1579c61-f17f-ff49-3f97-e942f202bebf.webPlatform.png b/Resources/images/f1579c61-f17f-ff49-3f97-e942f202bebf.webPlatform.png new file mode 100644 index 0000000..aad0184 Binary files /dev/null and b/Resources/images/f1579c61-f17f-ff49-3f97-e942f202bebf.webPlatform.png differ diff --git a/Resources/images/f178697f-630b-bafd-7c7d-e1287b98a969.webPlatform.png b/Resources/images/f178697f-630b-bafd-7c7d-e1287b98a969.webPlatform.png new file mode 100644 index 0000000..d4c320d Binary files /dev/null and b/Resources/images/f178697f-630b-bafd-7c7d-e1287b98a969.webPlatform.png differ diff --git a/Resources/images/f400aaaa-861c-78c0-0919-07a886e57304.webPlatform.png b/Resources/images/f400aaaa-861c-78c0-0919-07a886e57304.webPlatform.png new file mode 100644 index 0000000..bb5762e Binary files /dev/null and b/Resources/images/f400aaaa-861c-78c0-0919-07a886e57304.webPlatform.png differ diff --git a/Resources/images/f7842765-fff5-aa39-9f7f-fdd3024d4056.webPlatform.png b/Resources/images/f7842765-fff5-aa39-9f7f-fdd3024d4056.webPlatform.png new file mode 100644 index 0000000..ea79c57 Binary files /dev/null and b/Resources/images/f7842765-fff5-aa39-9f7f-fdd3024d4056.webPlatform.png differ diff --git a/Resources/images/favicon.png b/Resources/images/favicon.png new file mode 100644 index 0000000..ce3a263 Binary files /dev/null and b/Resources/images/favicon.png differ diff --git a/Resources/images/logo.png b/Resources/images/logo.png new file mode 100644 index 0000000..caaf43c Binary files /dev/null and b/Resources/images/logo.png differ diff --git a/Resources/images/me.jpeg b/Resources/images/me.jpeg new file mode 100644 index 0000000..cf70e23 Binary files /dev/null and b/Resources/images/me.jpeg differ diff --git a/Resources/manifest.json b/Resources/manifest.json new file mode 100644 index 0000000..bb4ec5d --- /dev/null +++ b/Resources/manifest.json @@ -0,0 +1,119 @@ +{ + "dir": "ltr", + "lang": "en", + "name": "Hi! | Navan Chauhan", + "scope": "/", + "display": "fullscreen", + "start_url": "https://navanchauhan.github.io/", + "short_name": "Navan Chauhan", + "theme_color": "black", + "description": "Welcome to my personal fragment of the internet.", + "orientation": "any", + "background_color": "transparent", + "related_applications": [], + "prefer_related_applications": false, + "icons": [ + { + "src": "/images/favicon.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "/images/14a6e126-4866-93de-8df5-e0e6a3c65da1.webPlatform.png", + "sizes": "44x44", + "type": "image/png" + }, + { + "src": "/images/6b5f7f70-557f-0e4b-3d76-127534525db9.webPlatform.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "/images/c5840a63-85f5-62b0-c68f-2faa4aaea42b.webPlatform.png", + "sizes": "1240x600", + "type": "image/png" + }, + { + "src": "/images/82e24f17-2e71-90d8-67a7-587163282ebf.webPlatform.png", + "sizes": "300x300", + "type": "image/png" + }, + { + "src": "/images/f7842765-fff5-aa39-9f7f-fdd3024d4056.webPlatform.png", + "sizes": "150x150", + "type": "image/png" + }, + { + "src": "/images/9384518b-2a6c-0abc-136c-8c8faf49c71b.webPlatform.png", + "sizes": "88x88", + "type": "image/png" + }, + { + "src": "/images/15294abc-6c7c-ffb8-df8d-d2fad23f50b0.webPlatform.png", + "sizes": "24x24", + "type": "image/png" + }, + { + "src": "/images/f178697f-630b-bafd-7c7d-e1287b98a969.webPlatform.png", + "sizes": "50x50", + "type": "image/png" + }, + { + "src": "/images/f400aaaa-861c-78c0-0919-07a886e57304.webPlatform.png", + "sizes": "620x300", + "type": "image/png" + }, + { + "src": "/images/8c0ffe9e-b615-96cd-3e18-ab4307c859a0.webPlatform.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/images/f1579c61-f17f-ff49-3f97-e942f202bebf.webPlatform.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "/images/9bf4aee8-92e3-932f-5388-7731928b5692.webPlatform.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "/images/9dc22996-fd1b-b2d3-3627-cef4fa224e25.webPlatform.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "/images/afd91c53-cfd0-b52e-ca49-1db0cc292b7d.webPlatform.png", + "sizes": "36x36", + "type": "image/png" + }, + { + "src": "/images/e429a798-7e86-1f02-565e-39dfab41fe36.webPlatform.png", + "sizes": "1024x1024", + "type": "image/png" + }, + { + "src": "/images/04d0580b-d347-476a-232d-9568839851cd.webPlatform.png", + "sizes": "180x180", + "type": "image/png" + }, + { + "src": "/images/cbac5b1d-0299-9db6-3747-c7aeaaaa37d0.webPlatform.png", + "sizes": "152x152", + "type": "image/png" + }, + { + "src": "/images/b0cac729-56cb-2a63-7e8b-ac62a038a023.webPlatform.png", + "sizes": "120x120", + "type": "image/png" + }, + { + "src": "/images/bb0aca46-4612-c284-055f-58850c0730bd.webPlatform.png", + "sizes": "76x76", + "type": "image/png" + } + ], + "url": "https://navanchauhan.github.io", + "screenshots": [] +} diff --git a/Resources/pwabuilder-sw-register.js b/Resources/pwabuilder-sw-register.js new file mode 100644 index 0000000..8850330 --- /dev/null +++ b/Resources/pwabuilder-sw-register.js @@ -0,0 +1,19 @@ +// This is the service worker with the Cache-first network + +// Add this below content to your HTML page, or add the js file to your page at the very top to register service worker + +// Check compatibility for the browser we're running this in +if ("serviceWorker" in navigator) { + if (navigator.serviceWorker.controller) { + console.log("[PWA Builder] active service worker found, no need to register"); + } else { + // Register the service worker + navigator.serviceWorker + .register("/pwabuilder-sw.js", { + scope: "./" + }) + .then(function (reg) { + console.log("[PWA Builder] Service worker has been registered for scope: " + reg.scope); + }); + } +} diff --git a/Resources/pwabuilder-sw.js b/Resources/pwabuilder-sw.js new file mode 100644 index 0000000..0684da5 --- /dev/null +++ b/Resources/pwabuilder-sw.js @@ -0,0 +1,83 @@ +// This is the service worker with the Cache-first network + +const CACHE = "pwabuilder-precache"; +const precacheFiles = [ + /* Add an array of files to precache for your app */ +]; + +self.addEventListener("install", function (event) { + console.log("[PWA Builder] Install Event processing"); + + console.log("[PWA Builder] Skip waiting on install"); + self.skipWaiting(); + + event.waitUntil( + caches.open(CACHE).then(function (cache) { + console.log("[PWA Builder] Caching pages during install"); + return cache.addAll(precacheFiles); + }) + ); +}); + +// Allow sw to control of current page +self.addEventListener("activate", function (event) { + console.log("[PWA Builder] Claiming clients for current page"); + event.waitUntil(self.clients.claim()); +}); + +// If any fetch fails, it will look for the request in the cache and serve it from there first +self.addEventListener("fetch", function (event) { + if (event.request.method !== "GET") return; + + event.respondWith( + fromCache(event.request).then( + function (response) { + // The response was found in the cache so we responde with it and update the entry + + // This is where we call the server to get the newest version of the + // file to use the next time we show view + event.waitUntil( + fetch(event.request).then(function (response) { + return updateCache(event.request, response); + }) + ); + + return response; + }, + function () { + // The response was not found in the cache so we look for it on the server + return fetch(event.request) + .then(function (response) { + // If request was success, add or update it in the cache + event.waitUntil(updateCache(event.request, response.clone())); + + return response; + }) + .catch(function (error) { + console.log("[PWA Builder] Network request failed and no cache." + error); + }); + } + ) + ); +}); + +function fromCache(request) { + // Check to see if you have it in the cache + // Return response + // If not in the cache, then return + return caches.open(CACHE).then(function (cache) { + return cache.match(request).then(function (matching) { + if (!matching || matching.status === 404) { + return Promise.reject("no-match"); + } + + return matching; + }); + }); +} + +function updateCache(request, response) { + return caches.open(CACHE).then(function (cache) { + return cache.put(request, response); + }); +} -- cgit v1.2.3