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.
- checksums.yaml +4 -4
- data/README.md +14 -29
- data/_config.yml +11 -20
- data/_includes/css-selector.html +5 -0
- data/_includes/disqus.html +1 -1
- data/_includes/favicons.html +11 -26
- data/_includes/head.html +16 -22
- data/_includes/js-selector.html +29 -5
- data/_includes/refactor-content.html +0 -5
- data/_includes/timeago.html +5 -1
- data/_includes/topbar.html +1 -1
- data/_layouts/home.html +1 -1
- data/_layouts/post.html +6 -7
- data/_sass/addon/commons.scss +84 -56
- data/_sass/addon/module.scss +6 -5
- data/_sass/colors/dark-typography.scss +1 -0
- data/_sass/colors/light-syntax.scss +1 -1
- data/_sass/colors/light-typography.scss +2 -1
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/post.scss +8 -0
- data/{404.html → assets/404.html} +0 -0
- data/{feed.xml → assets/feed.xml} +4 -3
- data/assets/img/favicons/android-chrome-192x192.png +0 -0
- data/assets/img/favicons/android-chrome-512x512.png +0 -0
- data/assets/img/favicons/apple-touch-icon.png +0 -0
- data/assets/img/favicons/browserconfig.xml +3 -6
- data/assets/img/favicons/favicon-16x16.png +0 -0
- data/assets/img/favicons/favicon-32x32.png +0 -0
- data/assets/img/favicons/favicon.ico +0 -0
- data/assets/img/favicons/mstile-150x150.png +0 -0
- data/assets/img/favicons/site.webmanifest +26 -0
- data/assets/js/data/swcache.js +64 -0
- data/assets/js/dist/categories.min.js +2 -2
- data/assets/js/dist/commons.min.js +6 -0
- data/assets/js/dist/home.min.js +2 -2
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/dist/pvreport.min.js +2 -2
- data/{app.js → assets/js/pwa/app.js} +1 -0
- data/assets/js/pwa/sw.js +87 -0
- data/{robots.txt → assets/robots.txt} +1 -1
- metadata +14 -32
- data/_includes/lozad.html +0 -10
- data/assets/img/favicons/android-icon-144x144.png +0 -0
- data/assets/img/favicons/android-icon-192x192.png +0 -0
- data/assets/img/favicons/android-icon-36x36.png +0 -0
- data/assets/img/favicons/android-icon-48x48.png +0 -0
- data/assets/img/favicons/android-icon-72x72.png +0 -0
- data/assets/img/favicons/android-icon-96x96.png +0 -0
- data/assets/img/favicons/apple-icon-114x114.png +0 -0
- data/assets/img/favicons/apple-icon-120x120.png +0 -0
- data/assets/img/favicons/apple-icon-144x144.png +0 -0
- data/assets/img/favicons/apple-icon-152x152.png +0 -0
- data/assets/img/favicons/apple-icon-180x180.png +0 -0
- data/assets/img/favicons/apple-icon-57x57.png +0 -0
- data/assets/img/favicons/apple-icon-60x60.png +0 -0
- data/assets/img/favicons/apple-icon-72x72.png +0 -0
- data/assets/img/favicons/apple-icon-76x76.png +0 -0
- data/assets/img/favicons/apple-icon-precomposed.png +0 -0
- data/assets/img/favicons/apple-icon.png +0 -0
- data/assets/img/favicons/favicon-96x96.png +0 -0
- data/assets/img/favicons/manifest.json +0 -54
- data/assets/img/favicons/ms-icon-144x144.png +0 -0
- data/assets/img/favicons/ms-icon-150x150.png +0 -0
- data/assets/img/favicons/ms-icon-310x310.png +0 -0
- data/assets/img/favicons/ms-icon-70x70.png +0 -0
- data/assets/js/data/cache-list.js +0 -65
- 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
|
-
});
|