diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2018-11-19 06:55:41 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2018-11-19 06:55:41 +0100 |
| commit | c2b52c035b4ed907ba1a704286aceb778421cc70 (patch) | |
| tree | 59e1bfc66d8c19e0f8c26ed6e6cc248b3ce799f9 /assets | |
| parent | 122af6684de0bc83a530b5bf5760e8112f8708f1 (diff) | |
| download | mitjafelicijan.com-c2b52c035b4ed907ba1a704286aceb778421cc70.tar.gz | |
content update
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/cache-polyfill.js | 142 | ||||
| -rw-r--r-- | assets/manifest.json | 37 | ||||
| -rw-r--r-- | assets/site.min.css | 2 |
3 files changed, 92 insertions, 89 deletions
diff --git a/assets/cache-polyfill.js b/assets/cache-polyfill.js index 7db3ec0..1449734 100644 --- a/assets/cache-polyfill.js +++ b/assets/cache-polyfill.js | |||
| @@ -15,88 +15,88 @@ | |||
| 15 | * | 15 | * |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | (function () { | 18 | (function() { |
| 19 | var nativeAddAll = Cache.prototype.addAll; | 19 | var nativeAddAll = Cache.prototype.addAll; |
| 20 | var userAgent = navigator.userAgent.match(/(Firefox|Chrome)\/(\d+\.)/); | 20 | var userAgent = navigator.userAgent.match(/(Firefox|Chrome)\/(\d+\.)/); |
| 21 | 21 | ||
| 22 | // Has nice behavior of `var` which everyone hates | 22 | // Has nice behavior of `var` which everyone hates |
| 23 | if (userAgent) { | 23 | if (userAgent) { |
| 24 | var agent = userAgent[1]; | 24 | var agent = userAgent[1]; |
| 25 | var version = parseInt(userAgent[2]); | 25 | var version = parseInt(userAgent[2]); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | if ( | 28 | if (nativeAddAll && (!userAgent || (agent === 'Firefox' && version >= 46) || (agent === 'Chrome' && version >= 50))) { |
| 29 | nativeAddAll && (!userAgent || | 29 | return; |
| 30 | (agent === 'Firefox' && version >= 46) || | 30 | } |
| 31 | (agent === 'Chrome' && version >= 50) | ||
| 32 | ) | ||
| 33 | ) { | ||
| 34 | return; | ||
| 35 | } | ||
| 36 | 31 | ||
| 37 | Cache.prototype.addAll = function addAll(requests) { | 32 | Cache.prototype.addAll = function addAll(requests) { |
| 38 | var cache = this; | 33 | var cache = this; |
| 39 | 34 | ||
| 40 | // Since DOMExceptions are not constructable: | 35 | // Since DOMExceptions are not constructable: |
| 41 | function NetworkError(message) { | 36 | function NetworkError(message) { |
| 42 | this.name = 'NetworkError'; | 37 | this.name = 'NetworkError'; |
| 43 | this.code = 19; | 38 | this.code = 19; |
| 44 | this.message = message; | 39 | this.message = message; |
| 45 | } | 40 | } |
| 46 | 41 | ||
| 47 | NetworkError.prototype = Object.create(Error.prototype); | 42 | NetworkError.prototype = Object.create(Error.prototype); |
| 48 | 43 | ||
| 49 | return Promise.resolve().then(function () { | 44 | return Promise.resolve() |
| 50 | if (arguments.length < 1) throw new TypeError(); | 45 | .then(function() { |
| 46 | if (arguments.length < 1) throw new TypeError(); | ||
| 51 | 47 | ||
| 52 | // Simulate sequence<(Request or USVString)> binding: | 48 | // Simulate sequence<(Request or USVString)> binding: |
| 53 | var sequence = []; | 49 | var sequence = []; |
| 54 | 50 | ||
| 55 | requests = requests.map(function (request) { | 51 | requests = requests.map(function(request) { |
| 56 | if (request instanceof Request) { | 52 | if (request instanceof Request) { |
| 57 | return request; | 53 | return request; |
| 58 | } else { | 54 | } else { |
| 59 | return String(request); // may throw TypeError | 55 | return String(request); // may throw TypeError |
| 60 | } | 56 | } |
| 61 | }); | 57 | }); |
| 62 | 58 | ||
| 63 | return Promise.all( | 59 | return Promise.all( |
| 64 | requests.map(function (request) { | 60 | requests.map(function(request) { |
| 65 | if (typeof request === 'string') { | 61 | if (typeof request === 'string') { |
| 66 | request = new Request(request); | 62 | request = new Request(request); |
| 67 | } | 63 | } |
| 68 | 64 | ||
| 69 | var scheme = new URL(request.url).protocol; | 65 | var scheme = new URL(request.url).protocol; |
| 70 | 66 | ||
| 71 | if (scheme !== 'http:' && scheme !== 'https:') { | 67 | if (scheme !== 'http:' && scheme !== 'https:') { |
| 72 | throw new NetworkError("Invalid scheme"); | 68 | throw new NetworkError('Invalid scheme'); |
| 73 | } | 69 | } |
| 74 | 70 | ||
| 75 | return fetch(request.clone()); | 71 | return fetch(request.clone()); |
| 76 | }) | 72 | }) |
| 77 | ); | 73 | ); |
| 78 | }).then(function (responses) { | 74 | }) |
| 79 | // If some of the responses has not OK-eish status, | 75 | .then(function(responses) { |
| 80 | // then whole operation should reject | 76 | // If some of the responses has not OK-eish status, |
| 81 | if (responses.some(function (response) { | 77 | // then whole operation should reject |
| 82 | return !response.ok; | 78 | if ( |
| 83 | })) { | 79 | responses.some(function(response) { |
| 84 | throw new NetworkError('Incorrect response status'); | 80 | return !response.ok; |
| 85 | } | 81 | }) |
| 82 | ) { | ||
| 83 | throw new NetworkError('Incorrect response status'); | ||
| 84 | } | ||
| 86 | 85 | ||
| 87 | // TODO: check that requests don't overwrite one another | 86 | // TODO: check that requests don't overwrite one another |
| 88 | // (don't think this is possible to polyfill due to opaque responses) | 87 | // (don't think this is possible to polyfill due to opaque responses) |
| 89 | return Promise.all( | 88 | return Promise.all( |
| 90 | responses.map(function (response, i) { | 89 | responses.map(function(response, i) { |
| 91 | return cache.put(requests[i], response); | 90 | return cache.put(requests[i], response); |
| 92 | }) | 91 | }) |
| 93 | ); | 92 | ); |
| 94 | }).then(function () { | 93 | }) |
| 95 | return undefined; | 94 | .then(function() { |
| 96 | }); | 95 | return undefined; |
| 97 | }; | 96 | }); |
| 97 | }; | ||
| 98 | 98 | ||
| 99 | Cache.prototype.add = function add(request) { | 99 | Cache.prototype.add = function add(request) { |
| 100 | return this.addAll([request]); | 100 | return this.addAll([request]); |
| 101 | }; | 101 | }; |
| 102 | }()); | 102 | })(); |
diff --git a/assets/manifest.json b/assets/manifest.json index f0b21b4..d150c67 100644 --- a/assets/manifest.json +++ b/assets/manifest.json | |||
| @@ -1,19 +1,22 @@ | |||
| 1 | { | 1 | { |
| 2 | "short_name": "MF", | 2 | "short_name": "MF", |
| 3 | "name": "Mitja Felicijan", | 3 | "name": "Mitja Felicijan", |
| 4 | "author": "Mitja Felicijan", | 4 | "author": "Mitja Felicijan", |
| 5 | "icons": [{ | 5 | "icons": [ |
| 6 | "src": "/assets/avatar.png", | 6 | { |
| 7 | "sizes": "512x512", | 7 | "src": "/assets/avatar.png", |
| 8 | "type": "image/png" | 8 | "sizes": "512x512", |
| 9 | }, { | 9 | "type": "image/png" |
| 10 | "src": "/assets/avatar.gif", | 10 | }, |
| 11 | "sizes": "512x512", | 11 | { |
| 12 | "type": "image/gif" | 12 | "src": "/assets/avatar.gif", |
| 13 | }], | 13 | "sizes": "512x512", |
| 14 | "start_url": "/", | 14 | "type": "image/gif" |
| 15 | "scope": "/", | 15 | } |
| 16 | "display": "standalone", | 16 | ], |
| 17 | "theme_color": "#ffffff", | 17 | "start_url": "/", |
| 18 | "background_color": "#ffffff" | 18 | "scope": "/", |
| 19 | "display": "standalone", | ||
| 20 | "theme_color": "#ffffff", | ||
| 21 | "background_color": "#ffffff" | ||
| 19 | } | 22 | } |
diff --git a/assets/site.min.css b/assets/site.min.css index 0168689..ceb1579 100644 --- a/assets/site.min.css +++ b/assets/site.min.css | |||
| @@ -1 +1 @@ | |||
| a,body,header a{color:#000}header a,main ul li a,nav ul li a,ol li a{text-decoration:none}#hcb_submit,nav ul li,ol li::before{display:inline-block}#hcb_submit,summary{cursor:pointer;user-select:none}@font-face{font-family:Roboto;font-style:normal;font-weight:100;src:local('Roboto Thin'),local('Roboto-Thin'),url(https://fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1MmgVxGIzc.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:local('Roboto Light'),local('Roboto-Light'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fChc9.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local('Roboto'),local('Roboto-Regular'),url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxP.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:500;src:local('Roboto Medium'),local('Roboto-Medium'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fChc9.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:local('Roboto Bold'),local('Roboto-Bold'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfChc9.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:900;src:local('Roboto Black'),local('Roboto-Black'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfChc9.ttf) format('truetype')}*{box-sizing:border-box}body{font-family:Roboto,'Times New Roman',Times,serif;font-size:18px;line-height:1.8;margin:0;padding:0 0 50px}article,footer,header,main,nav{max-width:800px;margin:0 auto}header{margin-top:30px}header a{font-size:150%;font-weight:700}nav ul{margin-top:10px;padding:0}nav ul li a{color:#444;font-size:85%;margin-right:10px}h1{font-size:260%;line-height:150%}h2{font-size:160%}h3{font-size:140%}h4{font-size:120%}article img{max-width:100%;display:block}time{display:block;font-size:85%;color:#444}ul{list-style-type:square}main ul{margin-top:40px;padding:0 20px}main ul li{margin-bottom:25px;margin-left:-20px;list-style-type:none}main ul li a{font-size:100%;font-weight:500}main ul div{font-size:116%}blockquote{margin:40px 0 40px 20px;border-left:5px solid #eee;padding:5px 0 10px 20px}.highlighter-rouge,table,table td,table th{border:2px solid #f1f1f1}table{width:100%;border-collapse:collapse;border-spacing:0}table td,table th{text-align:left;padding:5px 10px}summary{outline:0;font-weight:600}details .highlighter-rouge{margin-top:10px!important}.highlighter-rouge{padding:0 15px;font-size:80%;overflow:auto}.highlighter-rouge table,.highlighter-rouge table td{border:0!important}::selection{background:#ff0;color:#000}::-moz-selection{background:#ff0;color:#000}ol{list-style:none;counter-reset:li}ol li{counter-increment:li}ol li::before{content:counter(li)'.';color:#ccc;font-weight:500;width:1em;margin-left:-1.5em;margin-right:.9em;text-align:right}#hcb_form_content,#hcb_form_name{border:2px solid #eee;padding:10px;width:300px;margin-bottom:10px}#hcb_submit{-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;-ms-appearance:none;appearance:none;font-weight:600;padding:7px 15px;font-size:85%;border-radius:3px;background:#ccc;border:2px solid transparent;width:auto;text-align:center;height:auto;margin-right:20px}@media only screen and (max-width:768px){body{padding:0 20px}footer,header,nav{text-align:center}.responsive-table{width:100%;overflow:scroll}h1{font-size:200%}}@media print{@page{margin:2cm}.comments,header,nav{display:none}} \ No newline at end of file | a,body,header a{color:#000}header a,main ul li a,nav ul li a,ol li a{text-decoration:none}#hcb_submit,nav ul li,ol li::before{display:inline-block}#hcb_submit,summary{cursor:pointer;user-select:none}@font-face{font-family:Roboto;font-style:normal;font-weight:100;src:local('Roboto Thin'),local('Roboto-Thin'),url(https://fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1MmgVxGIzc.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:300;src:local('Roboto Light'),local('Roboto-Light'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fChc9.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local('Roboto'),local('Roboto-Regular'),url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxP.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:500;src:local('Roboto Medium'),local('Roboto-Medium'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fChc9.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:local('Roboto Bold'),local('Roboto-Bold'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfChc9.ttf) format('truetype')}@font-face{font-family:Roboto;font-style:normal;font-weight:900;src:local('Roboto Black'),local('Roboto-Black'),url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmYUtfChc9.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:italic;font-weight:300;src:local('Merriweather Light Italic'),local('Merriweather-LightItalic'),url(https://fonts.gstatic.com/s/merriweather/v19/u-4l0qyriQwlOrhSvowK_l5-eR7lXff2jvk.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:italic;font-weight:400;src:local('Merriweather Italic'),local('Merriweather-Italic'),url(https://fonts.gstatic.com/s/merriweather/v19/u-4m0qyriQwlOrhSvowK_l5-eRZAf-c.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:italic;font-weight:700;src:local('Merriweather Bold Italic'),local('Merriweather-BoldItalic'),url(https://fonts.gstatic.com/s/merriweather/v19/u-4l0qyriQwlOrhSvowK_l5-eR71Wvf2jvk.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:italic;font-weight:900;src:local('Merriweather Black Italic'),local('Merriweather-BlackItalic'),url(https://fonts.gstatic.com/s/merriweather/v19/u-4l0qyriQwlOrhSvowK_l5-eR7NWPf2jvk.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:normal;font-weight:300;src:local('Merriweather Light'),local('Merriweather-Light'),url(https://fonts.gstatic.com/s/merriweather/v19/u-4n0qyriQwlOrhSvowK_l521wRZVsf_.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:normal;font-weight:400;src:local('Merriweather Regular'),local('Merriweather-Regular'),url(https://fonts.gstatic.com/s/merriweather/v19/u-440qyriQwlOrhSvowK_l5-ciZJ.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:normal;font-weight:700;src:local('Merriweather Bold'),local('Merriweather-Bold'),url(https://fonts.gstatic.com/s/merriweather/v19/u-4n0qyriQwlOrhSvowK_l52xwNZVsf_.ttf) format('truetype')}@font-face{font-family:Merriweather;font-style:normal;font-weight:900;src:local('Merriweather Black'),local('Merriweather-Black'),url(https://fonts.gstatic.com/s/merriweather/v19/u-4n0qyriQwlOrhSvowK_l52_wFZVsf_.ttf) format('truetype')}@font-face{font-family:'PT Serif';font-style:italic;font-weight:400;src:local('PT Serif Italic'),local('PTSerif-Italic'),url(https://fonts.gstatic.com/s/ptserif/v9/EJRTQgYoZZY2vCFuvAFT_rO1dw.ttf) format('truetype')}@font-face{font-family:'PT Serif';font-style:italic;font-weight:700;src:local('PT Serif Bold Italic'),local('PTSerif-BoldItalic'),url(https://fonts.gstatic.com/s/ptserif/v9/EJRQQgYoZZY2vCFuvAFT9gaQZyffpQ.ttf) format('truetype')}@font-face{font-family:'PT Serif';font-style:normal;font-weight:400;src:local('PT Serif'),local('PTSerif-Regular'),url(https://fonts.gstatic.com/s/ptserif/v9/EJRVQgYoZZY2vCFuvAFYzro.ttf) format('truetype')}@font-face{font-family:'PT Serif';font-style:normal;font-weight:700;src:local('PT Serif Bold'),local('PTSerif-Bold'),url(https://fonts.gstatic.com/s/ptserif/v9/EJRSQgYoZZY2vCFuvAnt66qcVy4.ttf) format('truetype')}@font-face{font-family:Yrsa;font-style:normal;font-weight:300;src:local('Yrsa Light'),local('Yrsa-Light'),url(https://fonts.gstatic.com/s/yrsa/v3/wlpxgwnQFlxs3af97I0x2Q.ttf) format('truetype')}@font-face{font-family:Yrsa;font-style:normal;font-weight:400;src:local('Yrsa Regular'),local('Yrsa-Regular'),url(https://fonts.gstatic.com/s/yrsa/v3/wlp-gwnQFlxs1QLf_A.ttf) format('truetype')}@font-face{font-family:Yrsa;font-style:normal;font-weight:500;src:local('Yrsa Medium'),local('Yrsa-Medium'),url(https://fonts.gstatic.com/s/yrsa/v3/wlpxgwnQFlxs3f_87I0x2Q.ttf) format('truetype')}@font-face{font-family:Yrsa;font-style:normal;font-weight:600;src:local('Yrsa SemiBold'),local('Yrsa-SemiBold'),url(https://fonts.gstatic.com/s/yrsa/v3/wlpxgwnQFlxs3dP77I0x2Q.ttf) format('truetype')}@font-face{font-family:Yrsa;font-style:normal;font-weight:700;src:local('Yrsa Bold'),local('Yrsa-Bold'),url(https://fonts.gstatic.com/s/yrsa/v3/wlpxgwnQFlxs3bf67I0x2Q.ttf) format('truetype')}*{box-sizing:border-box}body{font-family:Yrsa,Roboto,'Times New Roman',Times,serif;font-size:22px;line-height:1.6;margin:0;padding:0 0 50px}article,footer,header,main,nav{max-width:800px;margin:0 auto}header{margin-top:30px}header a{font-size:150%;font-weight:700}nav ul{margin-top:10px;padding:0}nav ul li a{color:#444;font-size:85%;margin-right:10px}h1{font-size:200%;line-height:120%}h2{font-size:160%}h3{font-size:140%}h4{font-size:120%}article img{max-width:100%;display:block}time{display:block;font-size:85%;color:#444}ul{list-style-type:square}main ul{margin-top:40px;padding:0 20px}main ul li{margin-bottom:25px;margin-left:-20px;list-style-type:none}main ul li a{font-size:100%;font-weight:600}main ul div{font-size:116%}blockquote{margin:40px 0 40px 20px;border-left:5px solid #eee;padding:5px 0 10px 20px}.highlighter-rouge,table,table td,table th{border:2px solid #f1f1f1}table{width:100%;border-collapse:collapse;border-spacing:0}table td,table th{text-align:left;padding:5px 10px}summary{outline:0;font-weight:600}details .highlighter-rouge{margin-top:10px!important}.highlighter-rouge{padding:0 15px;font-size:80%;overflow:auto}.highlighter-rouge table,.highlighter-rouge table td{border:0!important}::selection{background:#ff0;color:#000}::-moz-selection{background:#ff0;color:#000}ol{list-style:none;counter-reset:li}ol li{counter-increment:li}ol li::before{content:counter(li) '.';color:#ccc;font-weight:500;width:1em;margin-left:-1.5em;margin-right:.9em;text-align:right}#hcb_form_content,#hcb_form_name{border:2px solid #eee;padding:10px;width:300px;margin-bottom:10px}#hcb_submit{-webkit-appearance:none;-moz-appearance:none;-o-appearance:none;-ms-appearance:none;appearance:none;font-weight:600;padding:7px 15px;font-size:85%;border-radius:3px;background:#ccc;border:2px solid transparent;width:auto;text-align:center;height:auto;margin-right:20px}@media only screen and (max-width:768px){body{padding:0 20px}footer,header,nav{text-align:center}.responsive-table{width:100%;overflow:scroll}h1{font-size:200%}}@media print{@page{margin:2cm}.comments,header,nav{display:none}} \ No newline at end of file | ||
