askclass-news-theme 0.1.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_config.yml +49 -32
- data/_includes/footer.html +1 -1
- data/_includes/grid.html +5 -6
- data/_includes/head/common.html +21 -23
- data/_includes/head/meta.html +2 -15
- data/_includes/head/pwaupdate.html +8 -0
- data/_includes/header.html +1 -0
- data/_includes/logo.html +2 -2
- data/_includes/writer.html +5 -0
- data/_layouts/post.html +6 -8
- data/_layouts/writer.html +10 -1
- data/_sass/_default.scss +11 -0
- data/_sass/_grid.scss +1 -0
- data/{manifest.json → assets/site.webmanifest} +12 -12
- data/content/_posts/2022-06-15-the-academy.md +4 -3
- data/content/_writers/plato.md +3 -0
- metadata +5 -5
- data/index.html +0 -6
- data/pwabuilder-sw.js +0 -75
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8354498de7cb9770db4ea5ddb0a3bc5503f016b95e3ec0bea9faf1d248eb25b8
|
4
|
+
data.tar.gz: 96c2df326807b9f577084cfabf161c3d08e378afb01dcf49e89030382fc90637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87bc15d808552c187c23e6f7afe69c0e3ac01211635251a6fb1270064c2b72c54e8eee4768264f5864cb2ae0f2bd657879d85da0e7a1fcfdec690fb4b7ac0961
|
7
|
+
data.tar.gz: c9ce5360b2188217466df84e8daef98a0ea8ca9a240d11fa32b48aeaec92a9609acbeecddf3468b497827001a8837c0a52af80d8524efd08cf57f9bc770ffb6a
|
data/_config.yml
CHANGED
@@ -1,33 +1,54 @@
|
|
1
1
|
# Custom fields
|
2
2
|
title: "AskClass News"
|
3
|
-
description:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
logo:
|
9
|
-
image: "logo-icon.svg"
|
10
|
-
size: 70
|
11
|
-
alt_image: "logo.svg"
|
12
|
-
alt_size: 200
|
13
|
-
color:
|
14
|
-
theme: "#ffc100"
|
15
|
-
bg: "#222"
|
3
|
+
description: >
|
4
|
+
We are exploring the intersection between education and technology;
|
5
|
+
how innovations in cross-disciplinary learning and collaboration
|
6
|
+
will change the trajectory of our society toward love for
|
7
|
+
humanity and appreciation of life.
|
16
8
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
acn:
|
10
|
+
date_format: "%b %d, %Y"
|
11
|
+
short_name: "AC News"
|
12
|
+
color:
|
13
|
+
theme: "#ffc100"
|
14
|
+
bg: "#222"
|
15
|
+
url: "https://news.askclass.com"
|
16
|
+
categories:
|
17
|
+
- education
|
18
|
+
social:
|
19
|
+
twitter: "askclass_com"
|
20
|
+
logo:
|
21
|
+
image: "logo-icon.svg"
|
22
|
+
size: 70
|
23
|
+
alt_image: "logo.svg"
|
24
|
+
alt_size: 200
|
25
|
+
sizes: [ 48, 96, 144, 192, 300, 512 ]
|
26
|
+
meta:
|
27
|
+
apple_icon: "logo-300.png"
|
28
|
+
og_image: "logo-square-300.png"
|
29
|
+
shortcut:
|
30
|
+
favicon: "favicon.ico"
|
31
|
+
type: "image/png"
|
32
|
+
image: "logo-96.png"
|
33
|
+
footer:
|
34
|
+
- icon: "copyright"
|
35
|
+
href: "https://askclass.com"
|
36
|
+
text: "AskClass"
|
37
|
+
- icon: "toys"
|
38
|
+
href: "https://app.askclass.com"
|
39
|
+
text: "Icebreakers"
|
40
|
+
font_families:
|
41
|
+
- Teko
|
42
|
+
- Open+Sans
|
43
|
+
- Josefin+Sans
|
44
|
+
- Share+Tech+Mono
|
45
|
+
- Material+Icons
|
24
46
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
- Material+Icons
|
47
|
+
# Add the below to your _config.yml
|
48
|
+
collections_dir: content
|
49
|
+
collections:
|
50
|
+
writers:
|
51
|
+
output: true
|
31
52
|
|
32
53
|
# Theme
|
33
54
|
excerpt_separator: "<!--more-->"
|
@@ -35,15 +56,11 @@ excerpt_separator: "<!--more-->"
|
|
35
56
|
sass:
|
36
57
|
style: compact
|
37
58
|
|
38
|
-
collections_dir: content
|
39
|
-
collections:
|
40
|
-
writers:
|
41
|
-
output: true
|
42
|
-
|
43
59
|
exclude:
|
44
60
|
- README.md
|
45
|
-
- LICENSE
|
61
|
+
- LICENSE
|
46
62
|
- Gemfile
|
47
63
|
- askclass-news-theme.gemspec
|
48
64
|
- CNAME
|
65
|
+
- runme.sh
|
49
66
|
|
data/_includes/footer.html
CHANGED
data/_includes/grid.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
{% for post in include.posts %}
|
3
3
|
<li class="card-tab {{ post.color }}">
|
4
4
|
<div class="top-bar">
|
5
|
-
{{ post.date | date:
|
5
|
+
{{ post.date | date: site.acn.date_format }}
|
6
6
|
</div>
|
7
7
|
{% if post.icon %}
|
8
8
|
<div class="tab"><span class="material-icons">{{ post.icon }}</span></div>
|
@@ -11,12 +11,11 @@
|
|
11
11
|
<div class="tab">{{ words.size }}<small>words</small></div>
|
12
12
|
{% endif %}
|
13
13
|
<div class="header">
|
14
|
-
{%
|
15
|
-
|
14
|
+
{% include writer.html info=post %}
|
15
|
+
{% if writer_url %}
|
16
|
+
<a href="{{ writer_url }}">{{ writer }}</a>
|
16
17
|
{% else %}
|
17
|
-
|
18
|
-
{{ post.category | replace: "_", " " }}
|
19
|
-
</a>
|
18
|
+
{{ writer }}
|
20
19
|
{% endif %}
|
21
20
|
</div>
|
22
21
|
<div class="body">
|
data/_includes/head/common.html
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
{% assign acn = site.acn %}
|
2
|
+
{% assign desc = page.excerpt | default: site.description | strip_html | strip_newlines %}
|
3
|
+
{% assign families = acn.font_families | join: "&family=" %}
|
1
4
|
|
2
5
|
<meta charset="utf-8" />
|
3
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
4
6
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
5
7
|
|
6
8
|
<meta name="application-name" content="{{ site.title }}" />
|
@@ -9,32 +11,28 @@
|
|
9
11
|
<meta name="mobile-web-app-capable" content="yes" />
|
10
12
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
11
13
|
|
12
|
-
<meta name="theme-color" content="{{
|
13
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="{{
|
14
|
+
<meta name="theme-color" content="{{ acn.color.theme }}" />
|
15
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="{{ acn.color.theme }}" />
|
16
|
+
<meta name="description" content="{{ desc }}" />
|
14
17
|
|
15
18
|
<meta property="og:site_name" content="{{ site.title }}" />
|
16
|
-
{
|
17
|
-
<meta
|
19
|
+
<meta property="og:description" content="{{ desc }}" />
|
20
|
+
<meta property="og:title" content="{{ page.title | default: site.title }}" />
|
21
|
+
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
|
22
|
+
<meta property="og:image" content="{{ page.image | default: acn.meta.og_image }}" />
|
23
|
+
{% if acn.twitter %}
|
24
|
+
<meta name="twitter:site" content="{{ acn.social.twitter }}" />
|
18
25
|
<meta name="twitter:card" content="summary_large_image">
|
19
26
|
{% endif % %}
|
20
27
|
|
21
|
-
<link rel="manifest" href="/
|
22
|
-
{% assign families = site.font_families | join: "&family=" %}
|
28
|
+
<link rel="manifest" href="/assets/site.webmanifest" />
|
23
29
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family={{ families }}&display=swap" />
|
24
30
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
25
|
-
<link rel="shortcut icon"
|
26
|
-
<link rel="icon" type="
|
27
|
-
<link rel="icon" type="image/svg+xml" href="/assets/logo
|
28
|
-
|
29
|
-
<link rel="apple-touch-icon" href="/assets/
|
30
|
-
|
31
|
-
<link rel="apple-touch-icon" sizes="
|
32
|
-
|
33
|
-
<link rel="apple-touch-icon" sizes="192x192" href="/assets/logo-192.png" />
|
34
|
-
<link rel="apple-touch-icon" sizes="512x512" href="/assets/logo-512.png" />
|
35
|
-
|
36
|
-
<script type="module">
|
37
|
-
import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
|
38
|
-
const el = document.createElement('pwa-update');
|
39
|
-
document.body.appendChild(el);
|
40
|
-
</script>
|
31
|
+
<link rel="shortcut icon" href="/assets/{{ acn.meta.shortcut.favicon }}" />
|
32
|
+
<link rel="icon" type="{{ acn.meta.shotcut.type }}" href="/assets/{{ acn.meta.shortcut.image }}" />
|
33
|
+
<link rel="icon" type="image/svg+xml" href="/assets/{{ acn.logo.image }}" />
|
34
|
+
|
35
|
+
<link rel="apple-touch-icon" href="/assets/{{ acn.meta.apple_icon }}" />
|
36
|
+
{% for size in acn.logo.sizes %}
|
37
|
+
<link rel="apple-touch-icon" sizes="{{size}}x{{size}}" href="/assets/logo-{{size}}.png" />
|
38
|
+
{% endfor %}
|
data/_includes/head/meta.html
CHANGED
@@ -1,24 +1,11 @@
|
|
1
1
|
{% if page.title %}
|
2
|
-
<title>{{ site.title }}
|
3
|
-
{% assign desc = page.excerpt | strip_html | strip_newlines %}
|
4
|
-
<meta name="description" content="{{ desc }}" />
|
5
|
-
<meta property="og:description" content="{{ desc }}" />
|
6
|
-
<meta property="og:title" content="{{ page.title }}" />
|
7
|
-
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
|
2
|
+
<title>{{ site.title }} • {{ page.title }}</title>
|
8
3
|
<meta property="og:type" content="article" />
|
9
4
|
<meta property="og:article:author" content="{{ page.writer }}" />
|
10
5
|
<meta property="og:article:published" content="{{ page.date }}" />
|
11
|
-
{% if page.image %}
|
12
|
-
<meta property="og:image" content="{{ page.image }}" />
|
13
|
-
{% endif %}
|
14
6
|
{% elsif site.title %}
|
15
7
|
<title>{{ site.title }}</title>
|
16
|
-
<meta
|
17
|
-
<meta property="og:description" content="{{ site.description }}" />
|
18
|
-
<meta property="og:title" content="{{ site.title }}" />
|
19
|
-
<meta property="og:url" content="{{ site.url }}" />
|
20
|
-
<meta property="og:image" content="/assets/logo-square-300.png" />
|
8
|
+
<meta property="og:type" content="website" />
|
21
9
|
<meta property="og:image:width" content="300" />
|
22
10
|
<meta property="og:image:height" content="300" />
|
23
|
-
<meta property="og:type" content="website" />
|
24
11
|
{% endif %}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{% assign file = site.static_files | where: "path", "/pwabuilder-sw.js" %}
|
2
|
+
{% if file.size != 0 %}
|
3
|
+
<script type="module">
|
4
|
+
import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
|
5
|
+
const el = document.createElement('pwa-update');
|
6
|
+
document.body.appendChild(el);
|
7
|
+
</script>
|
8
|
+
{% endif %}
|
data/_includes/header.html
CHANGED
data/_includes/logo.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<section class="center-align">
|
2
2
|
<a href="/">
|
3
|
-
<img src="/assets/{{ include.image | default: site.logo.image }}"
|
4
|
-
width="{{ include.size | default: site.logo.size }}"
|
3
|
+
<img src="/assets/{{ include.image | default: site.acn.logo.image }}"
|
4
|
+
width="{{ include.size | default: site.acn.logo.size }}"
|
5
5
|
title="{{ site.title }}"/>
|
6
6
|
</a>
|
7
7
|
<h3 class="special">{{ include.title | default: site.title }}</h3>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
{% assign _value = include.info.writer | default: include.info.category %}
|
2
|
+
{% assign writer = _value | default: 'Ghostwriter' | replace: "_", " " %}
|
3
|
+
{% if include.info.category %}
|
4
|
+
{% assign writer_url = writer | downcase | replace: " ", "_" | prepend: "/writers/" %}
|
5
|
+
{% endif %}
|
data/_layouts/post.html
CHANGED
@@ -12,15 +12,13 @@
|
|
12
12
|
{% endif %}
|
13
13
|
|
14
14
|
<h1>{{ page.title }}</h1>
|
15
|
-
<small>{{ page.date | date:
|
16
|
-
|
17
|
-
|
18
|
-
{%
|
19
|
-
<h5><a href="
|
20
|
-
{{ page.category | replace: "_", " " }}
|
21
|
-
</a></h5>
|
15
|
+
<small>{{ page.date | date: site.acn.date_format }}</small>
|
16
|
+
|
17
|
+
{% include writer.html info=page %}
|
18
|
+
{% if writer_url %}
|
19
|
+
<h5><a href="{{ writer_url }}">{{ writer }}</a></h5>
|
22
20
|
{% else %}
|
23
|
-
<h5>
|
21
|
+
<h5>{{ writer }}</h5>
|
24
22
|
{% endif %}
|
25
23
|
</header>
|
26
24
|
|
data/_layouts/writer.html
CHANGED
@@ -12,7 +12,16 @@
|
|
12
12
|
<html lang="en">
|
13
13
|
{% include header.html %}
|
14
14
|
<body>
|
15
|
-
{% include logo.html image=site.logo.alt_image size=site.logo.alt_size title=author %}
|
15
|
+
{% include logo.html image=site.acn.logo.alt_image size=site.acn.logo.alt_size title=author %}
|
16
|
+
|
17
|
+
{% if content %}
|
18
|
+
<article class="{{ page.style | default: 'center' }}" >
|
19
|
+
{% if page.image %}
|
20
|
+
<img src="{{ page.image }}" alt="{{ author }}" width="{{ page.size }}" />
|
21
|
+
{% endif %}
|
22
|
+
{{ content }}
|
23
|
+
</article>
|
24
|
+
{% endif %}
|
16
25
|
|
17
26
|
{% if posts.size and author %}
|
18
27
|
{% include grid.html posts=posts %}
|
data/_sass/_default.scss
CHANGED
data/_sass/_grid.scss
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
---
|
2
2
|
---
|
3
3
|
{
|
4
|
-
"background_color": "{{ site.color.bg }}",
|
5
|
-
"theme_color": "{{ site.color.theme }}",
|
4
|
+
"background_color": "{{ site.acn.color.bg }}",
|
5
|
+
"theme_color": "{{ site.acn.color.theme }}",
|
6
6
|
"name": "{{ site.title }}",
|
7
|
-
"short_name": "{{ site.
|
8
|
-
"categories": [ "{{ site.
|
7
|
+
"short_name": "{{ site.acn.short_name }}",
|
8
|
+
"categories": [ "{{ site.acn.categories | join: '","' }}" ],
|
9
9
|
"display": "standalone",
|
10
10
|
"scope": "/",
|
11
11
|
"start_url": "/",
|
12
|
-
"description": "{{ site.description }}",
|
12
|
+
"description": "{{ site.description | strip_newlines }}",
|
13
13
|
"orientation": "portrait-primary",
|
14
14
|
"dir": "auto",
|
15
15
|
"icons": [
|
16
16
|
{
|
17
|
-
"src": "
|
17
|
+
"src": "logo-300.png",
|
18
18
|
"type": "image/png",
|
19
19
|
"sizes": "300x300"
|
20
20
|
},
|
21
21
|
{
|
22
|
-
"src": "
|
22
|
+
"src": "logo-48.png",
|
23
23
|
"sizes": "48x48",
|
24
24
|
"type": "image/png",
|
25
25
|
"purpose": "maskable"
|
26
26
|
},
|
27
27
|
{
|
28
|
-
"src": "
|
28
|
+
"src": "logo-96.png",
|
29
29
|
"sizes": "96x96",
|
30
30
|
"type": "image/png",
|
31
31
|
"purpose": "maskable"
|
32
32
|
},
|
33
33
|
{
|
34
|
-
"src": "
|
34
|
+
"src": "logo-144.png",
|
35
35
|
"sizes": "144x144",
|
36
36
|
"type": "image/png",
|
37
37
|
"purpose": "maskable"
|
38
38
|
},
|
39
39
|
{
|
40
|
-
"src": "
|
40
|
+
"src": "logo-192.png",
|
41
41
|
"sizes": "192x192",
|
42
42
|
"type": "image/png",
|
43
43
|
"purpose": "maskable"
|
44
44
|
},
|
45
45
|
{
|
46
|
-
"src": "
|
46
|
+
"src": "logo-512.png",
|
47
47
|
"sizes": "512x512",
|
48
48
|
"type": "image/png",
|
49
49
|
"purpose": "maskable"
|
50
50
|
},
|
51
51
|
{
|
52
|
-
"src": "
|
52
|
+
"src": "logo-icon.svg",
|
53
53
|
"type": "image/png",
|
54
54
|
"sizes": "any"
|
55
55
|
}
|
@@ -14,7 +14,7 @@ Founded the Academy (c.387<sub>B.C.</sub>) in Athens, the most influential and i
|
|
14
14
|
A pupil and friend of Socrates, and taught one of the greatest philosopher, Aristotle.
|
15
15
|
<!--more-->
|
16
16
|
|
17
|
-
Plato produced 35 dialogues and 13 letters
|
17
|
+
Plato produced 35 dialogues and 13 letters including:
|
18
18
|
|
19
19
|
- Early (Socratic dialogues):
|
20
20
|
- The Apology
|
@@ -31,7 +31,8 @@ Plato produced 35 dialogues and 13 letters works including:
|
|
31
31
|
- The Laws
|
32
32
|
- Parmenides
|
33
33
|
|
34
|
-
In <cite>The Republic</cite>
|
35
|
-
"understands the harmony of all parts of the universe with the Idea of the Good,
|
34
|
+
In his magnum opus, <cite>The Republic</cite> Plato argues for the philosopher-king as best kind of ruler;
|
35
|
+
only a philosopher "understands the harmony of all parts of the universe with the Idea of the Good,"
|
36
|
+
and therefore, "is capable of ruling the just state."
|
36
37
|
|
37
38
|
> Virtue consists in the harmony of the human soul with the universe of Ideas, which assure order, intelligence, and pattern to a world in constant flux. Supreme among them is the Idea of the Good, analogous to the sun in the physical world.
|
data/content/_writers/plato.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
2
|
layout: writer
|
3
|
+
size: 100
|
4
|
+
style: left
|
5
|
+
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Plato_Silanion_Musei_Capitolini_MC1377.jpg/800px-Plato_Silanion_Musei_Capitolini_MC1377.jpg"
|
3
6
|
---
|
4
7
|
|
5
8
|
Ancient Greek philosopher Plato was a student of Socrates and a teacher of Aristotle. His writings explored justice, beauty and equality, and also contained discussions in aesthetics, political philosophy, theology, cosmology, epistemology and the philosophy of language. Plato founded the Academy in Athens, one of the first institutions of higher learning in the Western world.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: askclass-news-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AskClass
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -38,10 +38,12 @@ files:
|
|
38
38
|
- _includes/grid.html
|
39
39
|
- _includes/head/common.html
|
40
40
|
- _includes/head/meta.html
|
41
|
+
- _includes/head/pwaupdate.html
|
41
42
|
- _includes/header.html
|
42
43
|
- _includes/logo.html
|
43
44
|
- _includes/post/nextprev.html
|
44
45
|
- _includes/post/paginator.html
|
46
|
+
- _includes/writer.html
|
45
47
|
- _layouts/default.html
|
46
48
|
- _layouts/page.html
|
47
49
|
- _layouts/post.html
|
@@ -76,11 +78,9 @@ files:
|
|
76
78
|
- assets/logo-square-96.png
|
77
79
|
- assets/logo.png
|
78
80
|
- assets/logo.svg
|
81
|
+
- assets/site.webmanifest
|
79
82
|
- content/_posts/2022-06-15-the-academy.md
|
80
83
|
- content/_writers/plato.md
|
81
|
-
- index.html
|
82
|
-
- manifest.json
|
83
|
-
- pwabuilder-sw.js
|
84
84
|
homepage: https://news.askclass.com
|
85
85
|
licenses:
|
86
86
|
- MPL-2.0
|
data/index.html
DELETED
data/pwabuilder-sw.js
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
//This is the service worker with the Advanced caching
|
2
|
-
|
3
|
-
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
|
4
|
-
|
5
|
-
const HTML_CACHE = "html";
|
6
|
-
const JS_CACHE = "javascript";
|
7
|
-
const STYLE_CACHE = "stylesheets";
|
8
|
-
const IMAGE_CACHE = "images";
|
9
|
-
const FONT_CACHE = "fonts";
|
10
|
-
|
11
|
-
self.addEventListener("message", (event) => {
|
12
|
-
if (event.data && event.data.type === "SKIP_WAITING") {
|
13
|
-
self.skipWaiting();
|
14
|
-
}
|
15
|
-
});
|
16
|
-
|
17
|
-
workbox.routing.registerRoute(
|
18
|
-
({event}) => event.request.destination === 'document',
|
19
|
-
new workbox.strategies.NetworkFirst({
|
20
|
-
cacheName: HTML_CACHE,
|
21
|
-
plugins: [
|
22
|
-
new workbox.expiration.ExpirationPlugin({
|
23
|
-
maxEntries: 10,
|
24
|
-
}),
|
25
|
-
],
|
26
|
-
})
|
27
|
-
);
|
28
|
-
|
29
|
-
workbox.routing.registerRoute(
|
30
|
-
({event}) => event.request.destination === 'script',
|
31
|
-
new workbox.strategies.StaleWhileRevalidate({
|
32
|
-
cacheName: JS_CACHE,
|
33
|
-
plugins: [
|
34
|
-
new workbox.expiration.ExpirationPlugin({
|
35
|
-
maxEntries: 15,
|
36
|
-
}),
|
37
|
-
],
|
38
|
-
})
|
39
|
-
);
|
40
|
-
|
41
|
-
workbox.routing.registerRoute(
|
42
|
-
({event}) => event.request.destination === 'style',
|
43
|
-
new workbox.strategies.StaleWhileRevalidate({
|
44
|
-
cacheName: STYLE_CACHE,
|
45
|
-
plugins: [
|
46
|
-
new workbox.expiration.ExpirationPlugin({
|
47
|
-
maxEntries: 15,
|
48
|
-
}),
|
49
|
-
],
|
50
|
-
})
|
51
|
-
);
|
52
|
-
|
53
|
-
workbox.routing.registerRoute(
|
54
|
-
({event}) => event.request.destination === 'image',
|
55
|
-
new workbox.strategies.StaleWhileRevalidate({
|
56
|
-
cacheName: IMAGE_CACHE,
|
57
|
-
plugins: [
|
58
|
-
new workbox.expiration.ExpirationPlugin({
|
59
|
-
maxEntries: 15,
|
60
|
-
}),
|
61
|
-
],
|
62
|
-
})
|
63
|
-
);
|
64
|
-
|
65
|
-
workbox.routing.registerRoute(
|
66
|
-
({event}) => event.request.destination === 'font',
|
67
|
-
new workbox.strategies.StaleWhileRevalidate({
|
68
|
-
cacheName: FONT_CACHE,
|
69
|
-
plugins: [
|
70
|
-
new workbox.expiration.ExpirationPlugin({
|
71
|
-
maxEntries: 15,
|
72
|
-
}),
|
73
|
-
],
|
74
|
-
})
|
75
|
-
);
|