jekyll-theme-chirpy 3.2.2 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -29
  3. data/_config.yml +11 -20
  4. data/_includes/css-selector.html +5 -0
  5. data/_includes/disqus.html +1 -1
  6. data/_includes/favicons.html +11 -26
  7. data/_includes/head.html +16 -22
  8. data/_includes/js-selector.html +29 -5
  9. data/_includes/refactor-content.html +0 -5
  10. data/_includes/timeago.html +5 -1
  11. data/_includes/topbar.html +1 -1
  12. data/_layouts/home.html +1 -1
  13. data/_layouts/post.html +6 -7
  14. data/_sass/addon/commons.scss +84 -56
  15. data/_sass/addon/module.scss +6 -5
  16. data/_sass/colors/dark-typography.scss +1 -0
  17. data/_sass/colors/light-syntax.scss +1 -1
  18. data/_sass/colors/light-typography.scss +2 -1
  19. data/_sass/jekyll-theme-chirpy.scss +1 -1
  20. data/_sass/layout/post.scss +8 -0
  21. data/{404.html → assets/404.html} +0 -0
  22. data/{feed.xml → assets/feed.xml} +4 -3
  23. data/assets/img/favicons/android-chrome-192x192.png +0 -0
  24. data/assets/img/favicons/android-chrome-512x512.png +0 -0
  25. data/assets/img/favicons/apple-touch-icon.png +0 -0
  26. data/assets/img/favicons/browserconfig.xml +3 -6
  27. data/assets/img/favicons/favicon-16x16.png +0 -0
  28. data/assets/img/favicons/favicon-32x32.png +0 -0
  29. data/assets/img/favicons/favicon.ico +0 -0
  30. data/assets/img/favicons/mstile-150x150.png +0 -0
  31. data/assets/img/favicons/site.webmanifest +26 -0
  32. data/assets/js/data/swcache.js +64 -0
  33. data/assets/js/dist/categories.min.js +2 -2
  34. data/assets/js/dist/commons.min.js +6 -0
  35. data/assets/js/dist/home.min.js +2 -2
  36. data/assets/js/dist/page.min.js +2 -2
  37. data/assets/js/dist/post.min.js +2 -2
  38. data/assets/js/dist/pvreport.min.js +2 -2
  39. data/{app.js → assets/js/pwa/app.js} +1 -0
  40. data/assets/js/pwa/sw.js +87 -0
  41. data/{robots.txt → assets/robots.txt} +1 -1
  42. metadata +14 -32
  43. data/_includes/lozad.html +0 -10
  44. data/assets/img/favicons/android-icon-144x144.png +0 -0
  45. data/assets/img/favicons/android-icon-192x192.png +0 -0
  46. data/assets/img/favicons/android-icon-36x36.png +0 -0
  47. data/assets/img/favicons/android-icon-48x48.png +0 -0
  48. data/assets/img/favicons/android-icon-72x72.png +0 -0
  49. data/assets/img/favicons/android-icon-96x96.png +0 -0
  50. data/assets/img/favicons/apple-icon-114x114.png +0 -0
  51. data/assets/img/favicons/apple-icon-120x120.png +0 -0
  52. data/assets/img/favicons/apple-icon-144x144.png +0 -0
  53. data/assets/img/favicons/apple-icon-152x152.png +0 -0
  54. data/assets/img/favicons/apple-icon-180x180.png +0 -0
  55. data/assets/img/favicons/apple-icon-57x57.png +0 -0
  56. data/assets/img/favicons/apple-icon-60x60.png +0 -0
  57. data/assets/img/favicons/apple-icon-72x72.png +0 -0
  58. data/assets/img/favicons/apple-icon-76x76.png +0 -0
  59. data/assets/img/favicons/apple-icon-precomposed.png +0 -0
  60. data/assets/img/favicons/apple-icon.png +0 -0
  61. data/assets/img/favicons/favicon-96x96.png +0 -0
  62. data/assets/img/favicons/manifest.json +0 -54
  63. data/assets/img/favicons/ms-icon-144x144.png +0 -0
  64. data/assets/img/favicons/ms-icon-150x150.png +0 -0
  65. data/assets/img/favicons/ms-icon-310x310.png +0 -0
  66. data/assets/img/favicons/ms-icon-70x70.png +0 -0
  67. data/assets/js/data/cache-list.js +0 -65
  68. data/sw.js +0 -61
data/sw.js DELETED
@@ -1,61 +0,0 @@
1
- ---
2
- layout: compress
3
- # PWA service worker
4
- ---
5
-
6
- self.importScripts('{{ "/assets/js/data/cache-list.js" | relative_url }}');
7
-
8
- var cacheName = 'chirpy-{{ "now" | date: "%Y%m%d.%H%M" }}';
9
-
10
-
11
- function isExcluded(url) {
12
- const regex = /(^http(s)?|^\/)/; /* the regex for CORS url or relative url */
13
- for (const rule of exclude) {
14
- if (!regex.test(url) ||
15
- url.indexOf(rule) != -1) {
16
- return true;
17
- }
18
- }
19
- return false;
20
- }
21
-
22
-
23
- self.addEventListener('install', (e) => {
24
- self.skipWaiting();
25
- e.waitUntil(
26
- caches.open(cacheName).then((cache) => {
27
- return cache.addAll(include);
28
- })
29
- );
30
- });
31
-
32
-
33
- self.addEventListener('fetch', (e) => {
34
- e.respondWith(
35
- caches.match(e.request).then((r) => {
36
- /* console.log('[Service Worker] Fetching resource: ' + e.request.url); */
37
- return r || fetch(e.request).then((response) => {
38
- return caches.open(cacheName).then((cache) => {
39
- if (!isExcluded(e.request.url)) {
40
- /* console.log('[Service Worker] Caching new resource: ' + e.request.url); */
41
- cache.put(e.request, response.clone());
42
- }
43
- return response;
44
- });
45
- });
46
- })
47
- );
48
- });
49
-
50
-
51
- self.addEventListener('activate', (e) => {
52
- e.waitUntil(
53
- caches.keys().then((keyList) => {
54
- return Promise.all(keyList.map((key) => {
55
- if(key !== cacheName) {
56
- return caches.delete(key);
57
- }
58
- }));
59
- })
60
- );
61
- });