askclass-news-theme 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b13ded5da26f0b7adc34fa295fc9d018f642812c38510c25713b5c241e0e907d
4
- data.tar.gz: 4de0c2c07f7f5cb3781819d2b6762dcbe612cf5c03a9f5b24e55755a7e230576
3
+ metadata.gz: b1d4f09a3dc76c677cd16cdddfe9c78e80e49c15fe31f32396a07e5ae6331831
4
+ data.tar.gz: 768058d2afcd1c9a4a94911e7f642b9ffc9b086d8391abce7f32b875556917c9
5
5
  SHA512:
6
- metadata.gz: ce1854fc325620f7d67a3b145d279b857d2c75d016befed85f4061604e82fc1b0c0ece15d57194174660b514dd0484f912e4e106a5d3a80c4772bcd9145b1f61
7
- data.tar.gz: 6391618c039a147c1076f3a47c0fc0ebe2f3d9d57f7b9fe1d79ddc01177cb76d50756f5be119a6ed36740e94fe243f7c15752602cb4b56f58fef53c9176dfa43
6
+ metadata.gz: 702cbabd277ac22b72d7bec4df42eaa82536b4206e5e218323ca53c5ea4070c7c37ae4d158aadc780d82a0eeb78c7e0140b6c3dc008102739ff16a341b9db604
7
+ data.tar.gz: 2de7cffd8d36c265ca56141aab34b62ffc0cb1ade81c6c7c34d1b712ac68c5e5c7863654370d4dbebdb31c33b7e538a9fea0f5d5adad1eddb855e4f893763ebd
data/README.md CHANGED
@@ -54,6 +54,7 @@ Field | Example | Description
54
54
  `writer` | `J.R.R. Tolkien` | Non-clickable writer's name (note no `_`)
55
55
  `color` | `c5` | Values: `c1` .. `c10` (see [Card Colors]);
56
56
  `tags` | `fantasy fiction` | Alphanumeric words, use `-` to connect words
57
+ `thumb` | URL | Optional thumb image
57
58
  `image` | URL | Optional main image
58
59
  `source` | `The Tolkien Society` | Optional main source
59
60
  `source_url` | URL | Optional link to `source`
data/_config.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  # Custom fields
2
- title: "AskClass News"
2
+ title: "AskClass News Template"
3
3
  description: >
4
4
  Exploring the intersection between education and technology;
5
5
  how innovations in cross-disciplinary learning reorients our
@@ -19,6 +19,7 @@ acn:
19
19
  logo:
20
20
  image: "logo-icon.svg"
21
21
  size: 70
22
+ height: 70
22
23
  alt_image: "logo.svg"
23
24
  alt_size: 200
24
25
  sizes: [ 48, 96, 144, 192, 300, 512 ]
@@ -45,6 +46,9 @@ acn:
45
46
  - icon: "copyright"
46
47
  href: "https://askclass.com"
47
48
  text: "AskClass"
49
+ - icon: "newspaper"
50
+ href: "https://news.askclass.com"
51
+ text: "News"
48
52
  - icon: "toys"
49
53
  href: "https://app.askclass.com"
50
54
  text: "Icebreakers"
@@ -1,2 +1,2 @@
1
- <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
2
- <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
1
+ <script defer src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
2
+ <script async id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
@@ -1,6 +1,6 @@
1
1
  {% assign file = site.static_files | where: "path", "/pwabuilder-sw.js" %}
2
2
  {% if file.size != 0 %}
3
- <script type="module">
3
+ <script defer type="module">
4
4
  import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
5
5
  const el = document.createElement('pwa-update');
6
6
  document.body.appendChild(el);
@@ -9,4 +9,3 @@
9
9
  {%- endfor %}
10
10
  </ul>
11
11
  </footer>
12
- {% include foot/mathjax.html -%}
data/_includes/grid.html CHANGED
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  <div class="body">
22
22
  {% if post.image %}
23
- <img src="{{ post.image }}" alt="{{ post.title }}" />
23
+ <img src="/assets/loading.svg" data="{{ post.thumb | default: post.image }}" alt="{{ post.title }}" />
24
24
  {% endif %}
25
25
  <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
26
26
  {{ post.excerpt }}
@@ -40,3 +40,12 @@
40
40
  </li>
41
41
  {% endfor %}
42
42
  </ul>
43
+
44
+ <script defer>
45
+ const samps = document.querySelectorAll('img');
46
+ samps.forEach( el => {
47
+ if (el.src.match(/loading\.svg$/) && el.attributes.data) {
48
+ el.src = el.attributes.data.value;
49
+ }
50
+ } );
51
+ </script>
@@ -27,8 +27,13 @@
27
27
  {% endif % %}
28
28
 
29
29
  <link rel="manifest" href="/assets/site.webmanifest" />
30
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family={{ families }}&display=swap" />
30
+ <link rel="preconnect" href="https://cdn.jsdelivr.net" />
31
+ <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
31
32
  <link rel="preconnect" href="https://fonts.googleapis.com" />
33
+ <link rel='preconnect' href="https://fonts.googleapis.com" crossorigin />
34
+ <link rel="preload" as="style"
35
+ href="https://fonts.googleapis.com/css2?family={{ families }}&display=swap"
36
+ onload='this.onload=null;this.rel="stylesheet"' />
32
37
  <link rel="shortcut icon" href="/assets/{{ acn.meta.shortcut.favicon }}" />
33
38
  <link rel="icon" type="{{ acn.meta.shotcut.type }}" href="/assets/{{ acn.meta.shortcut.image }}" />
34
39
  <link rel="icon" type="image/svg+xml" href="/assets/{{ acn.logo.image }}" />
@@ -1,12 +1,12 @@
1
1
  <head>
2
2
  {% include head/meta.html %}
3
3
  {% include head/common.html %}
4
- {% include head/pwaupdate.html %}
5
4
  {% if page.collection == 'posts' %}
6
- <link href="{{ 'assets/css/md.css' | relative_url }}" rel="stylesheet" />
5
+ <link rel="preload" as="style" href="{{ 'assets/css/md.css' | relative_url }}"
6
+ onload='this.onload=null;this.rel="stylesheet"' />
7
7
  {% else %}
8
- <link href="{{ 'assets/css/grid.css' | relative_url }}" rel="stylesheet" />
9
- <link href="{{ 'assets/css/tab.css' | relative_url }}" rel="stylesheet" />
8
+ <link rel="stylesheet" href="{{ 'assets/css/grid.css' | relative_url }}" />
9
+ <link rel="stylesheet" href="{{ 'assets/css/tab.css' | relative_url }}" />
10
10
  {% endif %}
11
- <link href="{{ 'assets/css/style.css' | relative_url }}" rel="stylesheet" />
11
+ <link rel="stylesheet" href="{{ 'assets/css/style.css' | relative_url }}" />
12
12
  </head>
data/_includes/logo.html CHANGED
@@ -2,6 +2,7 @@
2
2
  <a href="/">
3
3
  <img src="/assets/{{ include.image | default: site.acn.logo.image }}"
4
4
  width="{{ include.size | default: site.acn.logo.size }}"
5
+ height="{{ include.height | default: site.acn.logo.height | default: site.acn.logo.size }}"
5
6
  title="{{ site.title }}"/>
6
7
  </a>
7
8
  {%- if include.href %}
@@ -4,6 +4,7 @@
4
4
  <body>
5
5
  {{ content }}
6
6
  {% include footer.html %}
7
+ {% include foot/pwaupdate.html %}
7
8
  </body>
8
9
  </html>
9
10
 
data/_layouts/post.html CHANGED
@@ -49,5 +49,6 @@
49
49
 
50
50
  {% include post/paginator.html %}
51
51
  {% include footer.html %}
52
+ {% include foot/mathjax.html -%}
52
53
  </body>
53
54
  </html>
data/_sass/_default.scss CHANGED
@@ -81,12 +81,13 @@ h6 { font-size: 1em }
81
81
  }
82
82
 
83
83
  code, pre {
84
- font-family: $font-special;
84
+ font-family: $font-mono;
85
+ font-size: 19px;
85
86
  }
86
87
 
87
88
  code {
88
89
  white-space: pre-wrap;
89
- color: $color-primary;
90
+ color: $color-secondary;
90
91
  }
91
92
 
92
93
  pre {
@@ -165,7 +166,7 @@ footer {
165
166
  @include align-middle();
166
167
  margin: 0 5px;
167
168
  a {
168
- color: $color-dark;
169
+ color: $color-secondary;
169
170
  }
170
171
  }
171
172
  }
data/_sass/_post.scss CHANGED
@@ -11,14 +11,14 @@ article {
11
11
  margin-bottom: 0;
12
12
  & + time {
13
13
  color: var(--darkColor);
14
- font-size: 16px;
14
+ font-size: 15px;
15
15
  }
16
16
  }
17
17
  address {
18
18
  font-style: normal;
19
19
  font-family: var(--secondaryFont);
20
20
  margin-top: 1.5em;
21
- font-size: 1.3em;
21
+ font-size: 1.4em;
22
22
  a {
23
23
  color: var(--tertiaryColor);
24
24
  }
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
2
+ <g transform="translate(50 50)">
3
+ <g>
4
+ <animateTransform attributeName="transform" type="rotate" values="0;45" keyTimes="0;1" dur="0.2s" repeatCount="indefinite"></animateTransform><path d="M29.491524206117255 -5.5 L37.491524206117255 -5.5 L37.491524206117255 5.5 L29.491524206117255 5.5 A30 30 0 0 1 24.742744050198738 16.964569457146712 L24.742744050198738 16.964569457146712 L30.399598299691117 22.621423706639092 L22.621423706639096 30.399598299691114 L16.964569457146716 24.742744050198734 A30 30 0 0 1 5.5 29.491524206117255 L5.5 29.491524206117255 L5.5 37.491524206117255 L-5.499999999999997 37.491524206117255 L-5.499999999999997 29.491524206117255 A30 30 0 0 1 -16.964569457146705 24.742744050198738 L-16.964569457146705 24.742744050198738 L-22.621423706639085 30.399598299691117 L-30.399598299691117 22.621423706639092 L-24.742744050198738 16.964569457146712 A30 30 0 0 1 -29.491524206117255 5.500000000000009 L-29.491524206117255 5.500000000000009 L-37.491524206117255 5.50000000000001 L-37.491524206117255 -5.500000000000001
5
+ L-29.491524206117255 -5.500000000000002 A30 30 0 0 1 -24.742744050198738 -16.964569457146705 L-24.742744050198738 -16.964569457146705 L-30.399598299691117 -22.621423706639085 L-22.621423706639092 -30.399598299691117 L-16.964569457146712 -24.742744050198738 A30 30 0 0 1 -5.500000000000011 -29.491524206117255 L-5.500000000000011 -29.491524206117255 L-5.500000000000012 -37.491524206117255 L5.499999999999998 -37.491524206117255 L5.5 -29.491524206117255 A30 30 0 0 1 16.964569457146702 -24.74274405019874 L16.964569457146702 -24.74274405019874 L22.62142370663908 -30.39959829969112 L30.399598299691117 -22.6214237066391 L24.742744050198738 -16.964569457146716 A30 30 0 0 1 29.491524206117255 -5.500000000000013 M0 -20A20 20 0 1 0 0 20 A20 20 0 1 0 0 -20" fill="#eee"></path></g></g>
6
+ </svg>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: askclass-news-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AskClass
@@ -35,11 +35,11 @@ files:
35
35
  - README.md
36
36
  - _config.yml
37
37
  - _includes/foot/mathjax.html
38
+ - _includes/foot/pwaupdate.html
38
39
  - _includes/footer.html
39
40
  - _includes/grid.html
40
41
  - _includes/head/common.html
41
42
  - _includes/head/meta.html
42
- - _includes/head/pwaupdate.html
43
43
  - _includes/header.html
44
44
  - _includes/logo.html
45
45
  - _includes/post/nextprev.html
@@ -64,6 +64,7 @@ files:
64
64
  - assets/css/style.scss
65
65
  - assets/css/tab.scss
66
66
  - assets/favicon.ico
67
+ - assets/loading.svg
67
68
  - assets/logo-144.png
68
69
  - assets/logo-192.png
69
70
  - assets/logo-300.png