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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78a5be2cc3406c90bd9af6a0ea34f40f237837fb2973a5474cdfdefade9c9043
4
- data.tar.gz: 684c377efe7863c6b266d13e743291aa6f0c18d694bd3ce3c6c4081729a497b2
3
+ metadata.gz: 8354498de7cb9770db4ea5ddb0a3bc5503f016b95e3ec0bea9faf1d248eb25b8
4
+ data.tar.gz: 96c2df326807b9f577084cfabf161c3d08e378afb01dcf49e89030382fc90637
5
5
  SHA512:
6
- metadata.gz: 00c3b9630de25fb0d83232e3fdb3094e1698b74657810486f8bf241b983d616ebd723435a89a17c4e49c53d7b6a4bcd73b60baa228f995ae8b667aa2e28169ee
7
- data.tar.gz: a8b4f8216ad25ee4b3bbac2060374280dd51d5add4dd691364bdf29733a18684de7cd9c12000707470be32e76370a67092ec8506f76ab52e82a977711c824ddd
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: "News and discussions on learning and education"
4
- site_url: "https://news.askclass.com"
5
- site_cat:
6
- - education
7
- twitter: "askclass_com"
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
- footer:
18
- - icon: "copyright"
19
- href: "https://askclass.com"
20
- text: "AskClass"
21
- - icon: "toys"
22
- href: "https://app.askclass.com"
23
- text: "Icebreakers"
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
- font_families:
26
- - Teko
27
- - Open+Sans
28
- - Josefin+Sans
29
- - Share+Tech+Mono
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.txt
61
+ - LICENSE
46
62
  - Gemfile
47
63
  - askclass-news-theme.gemspec
48
64
  - CNAME
65
+ - runme.sh
49
66
 
@@ -1,6 +1,6 @@
1
1
  <footer>
2
2
  <ul>
3
- {% for item in site.footer %}
3
+ {% for item in site.acn.footer %}
4
4
  <li>
5
5
  <span class="material-icons">{{ item.icon }}</span>
6
6
  <a href="{{ item.href }}">{{ item.text }}</a>
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: "%b %d, %Y" }}
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
- {% if post.writer %}
15
- {{ post.writer }}
14
+ {% include writer.html info=post %}
15
+ {% if writer_url %}
16
+ <a href="{{ writer_url }}">{{ writer }}</a>
16
17
  {% else %}
17
- <a href="/writers/{{ post.category | downcase }}">
18
- {{ post.category | replace: "_", " " }}
19
- </a>
18
+ {{ writer }}
20
19
  {% endif %}
21
20
  </div>
22
21
  <div class="body">
@@ -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="{{ site.color.theme }}" />
13
- <meta name="apple-mobile-web-app-status-bar-style" content="{{ site.color.theme }}" />
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
- {% if site.twitter %}
17
- <meta name="twitter:site" content="{{ site.twitter }}" />
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="/manifest.json" />
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" type="image/png" href="/assets/favicon.png" />
26
- <link rel="icon" type="image/png" href="/assets/favicon.png" />
27
- <link rel="icon" type="image/svg+xml" href="/assets/logo-icon.svg" />
28
-
29
- <link rel="apple-touch-icon" href="/assets/logo-300.png" />
30
- <link rel="apple-touch-icon" sizes="48x48" href="/assets/logo-48.png" />
31
- <link rel="apple-touch-icon" sizes="96x96" href="/assets/logo-96.png" />
32
- <link rel="apple-touch-icon" sizes="144x144" href="/assets/logo-144.png" />
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 %}
@@ -1,24 +1,11 @@
1
1
  {% if page.title %}
2
- <title>{{ site.title }}: {{ page.title }}</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 }} &bull; {{ 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 name="description" content="{{ site.description }}" />
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 %}
@@ -1,6 +1,7 @@
1
1
  <head>
2
2
  {% include head/meta.html %}
3
3
  {% include head/common.html %}
4
+ {% include head/pwaupdate.html %}
4
5
 
5
6
  <link href="{{ 'assets/css/style.css' | relative_url }}" rel="stylesheet" />
6
7
 
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: "%b %m, %Y" }}</small>
16
- {% if page.writer %}
17
- <h5>{{ page.writer }}</h5>
18
- {% elsif page.category %}
19
- <h5><a href="/writers/{{ page.category | downcase }}">
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>Ghost Writer</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
@@ -171,3 +171,14 @@ footer {
171
171
  }
172
172
  }
173
173
  }
174
+
175
+ article {
176
+ &.center {
177
+ @include align-center();
178
+ }
179
+ &.left img {
180
+ float: left;
181
+ margin: 10px 10px 0 0;
182
+ display: inline-block;
183
+ }
184
+ }
data/_sass/_grid.scss CHANGED
@@ -7,6 +7,7 @@ ul.grid {
7
7
  display: grid;
8
8
  grid-gap: 1rem;
9
9
  grid-template-columns: repeat(auto-fit, minmax($width, 1fr));
10
+ clear: both;
10
11
 
11
12
  li {
12
13
  position: relative;
@@ -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.title }}",
8
- "categories": [ "{{ site.site_cat | join: '","' }}" ],
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": "assets/logo-300.png",
17
+ "src": "logo-300.png",
18
18
  "type": "image/png",
19
19
  "sizes": "300x300"
20
20
  },
21
21
  {
22
- "src": "assets/logo-48.png",
22
+ "src": "logo-48.png",
23
23
  "sizes": "48x48",
24
24
  "type": "image/png",
25
25
  "purpose": "maskable"
26
26
  },
27
27
  {
28
- "src": "assets/logo-96.png",
28
+ "src": "logo-96.png",
29
29
  "sizes": "96x96",
30
30
  "type": "image/png",
31
31
  "purpose": "maskable"
32
32
  },
33
33
  {
34
- "src": "assets/logo-144.png",
34
+ "src": "logo-144.png",
35
35
  "sizes": "144x144",
36
36
  "type": "image/png",
37
37
  "purpose": "maskable"
38
38
  },
39
39
  {
40
- "src": "assets/logo-192.png",
40
+ "src": "logo-192.png",
41
41
  "sizes": "192x192",
42
42
  "type": "image/png",
43
43
  "purpose": "maskable"
44
44
  },
45
45
  {
46
- "src": "assets/logo-512.png",
46
+ "src": "logo-512.png",
47
47
  "sizes": "512x512",
48
48
  "type": "image/png",
49
49
  "purpose": "maskable"
50
50
  },
51
51
  {
52
- "src": "assets/logo-icon.svg",
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 works including:
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> he argues for the philosopher-king because only a philosopher
35
- "understands the harmony of all parts of the universe with the Idea of the Good, is capable of ruling the just state."
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.
@@ -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.1.1
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-15 00:00:00.000000000 Z
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
@@ -1,6 +0,0 @@
1
- ---
2
- layout: default
3
- ---
4
-
5
- {% include logo.html %}
6
- {% include grid.html posts=site.posts %}
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
- );