askclass-news-theme 0.2.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: 1dae1360fff3b56f4c9bbe48777b2a881869bcd2cd9268a09ceef39ed6cb2aa7
4
- data.tar.gz: b51fb4f09145c4b5324c5d4a85f7ba2b74bc23182a392eae102701c21dc56bcd
3
+ metadata.gz: 8354498de7cb9770db4ea5ddb0a3bc5503f016b95e3ec0bea9faf1d248eb25b8
4
+ data.tar.gz: 96c2df326807b9f577084cfabf161c3d08e378afb01dcf49e89030382fc90637
5
5
  SHA512:
6
- metadata.gz: 8d61f5cbf890178f022c7bffdb5068d5710905699fb7620dfd44222a47d3d2510d2fc53c09a52961787209daf073d7aeadf2c0a54f49cc3cc3b6c414ceb054e8
7
- data.tar.gz: '0961284c53078cd938536ab9c5f3c56ccd4a2fd1a87ce7646b9df33e995acf83a9a3cc10d599908a562a85ce5d9122f828a27f9532bc11cd304d297af7da02e0'
6
+ metadata.gz: 87bc15d808552c187c23e6f7afe69c0e3ac01211635251a6fb1270064c2b72c54e8eee4768264f5864cb2ae0f2bd657879d85da0e7a1fcfdec690fb4b7ac0961
7
+ data.tar.gz: c9ce5360b2188217466df84e8daef98a0ea8ca9a240d11fa32b48aeaec92a9609acbeecddf3468b497827001a8837c0a52af80d8524efd08cf57f9bc770ffb6a
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 }}" />
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,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: 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,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.1
4
+ version: 0.2.2
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