askclass-news-theme 0.2.0 → 0.2.3

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: 04ab0a742b4f5ad92ad983ea6232402d0d7b3680f88f1a3d900447fb5199d059
4
- data.tar.gz: 6a7733536f26e2c35abc21dd1ad11204620d0707d34e9742a313e56d9bdc7e40
3
+ metadata.gz: 30695dc170c68778546db94cd907c9c1e2e1f67b726697dc5926768cc6018f64
4
+ data.tar.gz: e0027ef4e0b274527a5f4c75036acddbac47de4ccb88e341a9aa9500abbf2fcb
5
5
  SHA512:
6
- metadata.gz: 408ef5fc8b97e65da1c8d1ea8e15644db507d3f4f8d88a9e72e53686b8e721b4c89c8ea3ee532ba37643d93b63acbe5f0349a7e6b7ba20197084c9c1a1b87c96
7
- data.tar.gz: a6d6ecfb7fa12dec2c1d9d5368ca169cb88cbee9d1230bdd947c8423227f5ea40b0c88d78ef6d7658f9b2767b322ed7c61a99a8f0e638686444732a00b7f4e11
6
+ metadata.gz: dace346dd826e13722fc0a0cca89cd478dfc401faabe676c16f73221b8848de2ae89b05c3f1dc686004fb18e8763b2e56e807c45afd2fc6553f2644e6bfc9fff
7
+ data.tar.gz: cca267996538e16a91f2ddfc37835ee7707e7b7a958b50ce3b4ba0c8bdc9ad6bbe2c122edcca426c51503d1a7537d250faad9dc8e0c3ec9265c529c9a105a6ea
data/_config.yml CHANGED
@@ -1,41 +1,55 @@
1
+ # Custom fields
2
+ title: "AskClass News"
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.
8
+
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
46
+
1
47
  # Add the below to your _config.yml
2
48
  collections_dir: content
3
49
  collections:
4
50
  writers:
5
51
  output: true
6
52
 
7
- # Custom fields
8
- title: "AskClass News"
9
- description: "News and discussions on learning and education"
10
- site_url: "https://news.askclass.com"
11
- site_cat:
12
- - education
13
- twitter: "askclass_com"
14
- logo:
15
- image: "logo-icon.svg"
16
- size: 70
17
- alt_image: "logo.svg"
18
- alt_size: 200
19
- color:
20
- theme: "#ffc100"
21
- bg: "#222"
22
- date_format: "%b %d, %Y"
23
-
24
- footer:
25
- - icon: "copyright"
26
- href: "https://askclass.com"
27
- text: "AskClass"
28
- - icon: "toys"
29
- href: "https://app.askclass.com"
30
- text: "Icebreakers"
31
-
32
- font_families:
33
- - Teko
34
- - Open+Sans
35
- - Josefin+Sans
36
- - Share+Tech+Mono
37
- - Material+Icons
38
-
39
53
  # Theme
40
54
  excerpt_separator: "<!--more-->"
41
55
 
@@ -44,8 +58,9 @@ sass:
44
58
 
45
59
  exclude:
46
60
  - README.md
47
- - LICENSE.txt
61
+ - LICENSE
48
62
  - Gemfile
49
63
  - askclass-news-theme.gemspec
50
64
  - CNAME
65
+ - runme.sh
51
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: site.date_format }}
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,3 +1,6 @@
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
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
@@ -8,32 +11,28 @@
8
11
  <meta name="mobile-web-app-capable" content="yes" />
9
12
  <meta name="apple-mobile-web-app-capable" content="yes" />
10
13
 
11
- <meta name="theme-color" content="{{ site.color.theme }}" />
12
- <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 }}" />
13
17
 
14
18
  <meta property="og:site_name" content="{{ site.title }}" />
15
- {% if site.twitter %}
16
- <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 }}" />
17
25
  <meta name="twitter:card" content="summary_large_image">
18
26
  {% endif % %}
19
27
 
20
28
  <link rel="manifest" href="/assets/site.webmanifest" />
21
- {% assign families = site.font_families | join: "&family=" %}
22
29
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family={{ families }}&display=swap" />
23
30
  <link rel="preconnect" href="https://fonts.googleapis.com" />
24
- <link rel="shortcut icon" type="image/png" href="/assets/favicon.png" />
25
- <link rel="icon" type="image/png" href="/assets/favicon.png" />
26
- <link rel="icon" type="image/svg+xml" href="/assets/logo-icon.svg" />
27
-
28
- <link rel="apple-touch-icon" href="/assets/logo-300.png" />
29
- <link rel="apple-touch-icon" sizes="48x48" href="/assets/logo-48.png" />
30
- <link rel="apple-touch-icon" sizes="96x96" href="/assets/logo-96.png" />
31
- <link rel="apple-touch-icon" sizes="144x144" href="/assets/logo-144.png" />
32
- <link rel="apple-touch-icon" sizes="192x192" href="/assets/logo-192.png" />
33
- <link rel="apple-touch-icon" sizes="512x512" href="/assets/logo-512.png" />
34
-
35
- <script type="module">
36
- import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
37
- const el = document.createElement('pwa-update');
38
- document.body.appendChild(el);
39
- </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 }}" height="{{ 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,19 @@ footer {
171
171
  }
172
172
  }
173
173
  }
174
+
175
+ article {
176
+ &.center {
177
+ @include align-center();
178
+ }
179
+ &.center img {
180
+ border-radius: 50%;
181
+ object-fit: cover;
182
+ }
183
+ &.left img {
184
+ float: left;
185
+ object-fit: cover;
186
+ margin: 5px 10px 0 0;
187
+ display: inline-block;
188
+ }
189
+ }
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,15 +1,15 @@
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": [
@@ -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: center
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,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.2.0
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - AskClass
@@ -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