askclass-course-theme 0.5.2 → 0.7.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: 34b83bf2032e0eadf41513ce254b31ff03bacb69404ec7c9efbc458d8037dba0
4
- data.tar.gz: 1bb6346d5cdd5a2ff00f800af3233e80fbc564560e14860f38f5a4cda3e9a8e2
3
+ metadata.gz: 57efa5d11fc6fc2aaad9c2f429f6a6bae67b1023e96cbad3d1c0176261718346
4
+ data.tar.gz: 7b562ae2cd815ab1e613bfb32bd22dac861616970a3e53b1e4ca6b17e66f0a31
5
5
  SHA512:
6
- metadata.gz: cdfccd1f7eff0e2076bd2b9df0dc78925598ab5a412bdb8ef1248d1533cbd3afccf1e8d521bdfd4351db082474b878c9baef16b34a04774e2bdf8b1f822d8dad
7
- data.tar.gz: 6f41b51e1f7ae700b64db41aa029f37b8a48dcd0eeb5690cebdd00b7112ae8ecaaf6b25726f009c8cbc5f1e156ee1ace0ca60adf207853ab57dbca0caf15999c
6
+ metadata.gz: 1d9122a69c606cb3b773ce0087ae87000502f33fd91850c1ce9620de795730d41b3d892ac294e5c514eb3092654aeeec06a76fb409a7d9c08571949399851f93
7
+ data.tar.gz: 05010cb3e4df78795af24a3b9a1464e114acdc0f7c053fab2d05feb42d45473a946aa53684f142f76e88f4156feb0a0c57a47c03c250fe6a07dbd712c8dcf024
data/_config.yml CHANGED
@@ -22,6 +22,10 @@ acc:
22
22
  alt_image: "logo.svg"
23
23
  alt_size: 200
24
24
  sizes: [ 48, 96, 144, 192, 300, 512 ]
25
+ shortcut:
26
+ name: Syllabus
27
+ url: https://acc.askclass.com/session/session-01
28
+ desc: Class syllabus and contact information
25
29
  meta:
26
30
  apple_icon: "logo-300.png"
27
31
  og_image: "logo-square-512.png"
@@ -65,7 +69,7 @@ collections:
65
69
 
66
70
  defaults:
67
71
  - scope:
68
- path: ""
72
+ path: "*.html"
69
73
  values:
70
74
  layout: "default"
71
75
  - scope:
@@ -51,7 +51,8 @@
51
51
  <div class="control">
52
52
  <a class="button" href="/segment/{{ segment }}">
53
53
  {{ info.title }}&nbsp;
54
- <span class="middle-align material-symbols-outlined">rocket_launch</span>
54
+ <span data-date="{{ info.end }}"
55
+ class="middle-align material-symbols-outlined rocket">rocket_launch</span>
55
56
  </a>
56
57
  </div>
57
58
  </li>
@@ -61,10 +62,19 @@
61
62
 
62
63
  <script defer>
63
64
  const due = document.querySelectorAll('.due');
65
+ const rocket = document.querySelectorAll('.rocket');
64
66
  due.forEach( el => {
65
67
  const d = new Date(el.dataset.date.split('-')).getTime();
66
68
  if (d < Date.now()) {
67
69
  el.classList.add('past');
68
70
  }
69
71
  });
72
+ rocket.forEach( el => {
73
+ if (el.dataset.date) {
74
+ const d = new Date(el.dataset.date.split('-')).getTime();
75
+ if (d < Date.now()) {
76
+ el.innerText = 'rocket';
77
+ }
78
+ }
79
+ });
70
80
  </script>
@@ -1,5 +1,6 @@
1
- {% assign file = site.static_files | where: "path", "/pwabuilder-sw.js" %}
2
- {% if file.size != 0 %}
1
+ {% assign pwafile = site.static_files | where: "path", "/pwabuilder-sw.js" %}
2
+ {% assign offlinefile = site.static_files | where: "path", "/offline.html" %}
3
+ {% if file.size != 0 && offlinefile.size != 0 %}
3
4
  <script defer type="module">
4
5
  import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
5
6
  const el = document.createElement('pwa-update');
@@ -3,7 +3,9 @@
3
3
  <ul>
4
4
  {% for item in site.acc.footer -%}
5
5
  <li>
6
- <span class="material-symbols-outlined">{{ item.icon }}</span>
6
+ {%- if item.icon -%}
7
+ <span class="material-symbols-outlined">{{ item.icon }}</span>
8
+ {%- endif -%}
7
9
  <a href="{{ item.href }}">{{ item.text }}</a>
8
10
  </li>
9
11
  {%- endfor %}
@@ -41,5 +41,5 @@
41
41
 
42
42
  <link rel="apple-touch-icon" href="{{ assets}}{{ acc.meta.apple_icon }}" />
43
43
  {% for size in acc.logo.sizes %}
44
- <link rel="apple-touch-icon" sizes="{{size}}x{{size}}" href="{{ assets }}logo-{{size}}.png" />
44
+ <link rel="apple-touch-icon" sizes="{{size}}x{{size}}" href="{{ assets }}logo-square-{{size}}.png" />
45
45
  {% endfor %}
@@ -21,7 +21,7 @@
21
21
 
22
22
  {%- if session.due -%}
23
23
  <div class="header">
24
- <span class="material-symbols-outlined">alarm_on</span>
24
+ <span data-date="{{ session.due }}" class="material-symbols-outlined alarm">alarm_on</span>
25
25
  {{ session.due | date: '%b %e, %y' }}
26
26
  </div>
27
27
  {%- elsif session.type -%}
@@ -46,3 +46,13 @@
46
46
  </li>
47
47
  {%- endfor -%}
48
48
  </ul>
49
+
50
+ <script defer>
51
+ const due = document.querySelectorAll('.alarm');
52
+ due.forEach( el => {
53
+ const d = new Date(el.dataset.date.split('-')).getTime();
54
+ if (d < Date.now()) {
55
+ el.parentNode.removeChild(el);
56
+ }
57
+ });
58
+ </script>
@@ -19,6 +19,7 @@
19
19
  {% endif %}
20
20
  <a href="/segment/{{ prev }}" class="material-symbols-outlined md-48">navigate_before</a>
21
21
  {% else %}
22
+ &nbsp;
22
23
  <span class="material-symbols-outlined md-48 md-disabled">navigate_before</span>
23
24
  {% endif %}
24
25
 
@@ -0,0 +1,25 @@
1
+ {%- if include.p == 'previous' -%}
2
+ {%- assign align = 'pull-left' -%}
3
+ {%- assign arrow = 'before' -%}
4
+ {%- assign indicator = 'Previous' -%}
5
+ {%- else -%}
6
+ {%- assign align = 'pull-right' -%}
7
+ {%- assign arrow = 'next' -%}
8
+ {%- assign indicator = 'Next' -%}
9
+ {%- endif -%}
10
+
11
+ {%- assign _p = include.item -%}
12
+
13
+ <div class="paginator">
14
+ {%- if _p %}
15
+ <div class="{{ align }}">
16
+ <span>{{ indicator }}</span>
17
+ <span class="material-symbols-outlined">navigate_{{ arrow }}</span>
18
+ </div>
19
+ <a href="/session/{{ _p.url }}">
20
+ {{ _p.title }}
21
+ </a>
22
+ {%- else %}
23
+ <div class="{{ align }}">&nbsp;</div>
24
+ {% endif -%}
25
+ </div>
@@ -0,0 +1,26 @@
1
+ {% for s in segment_data.items %}
2
+ {% if s == session_id %}
3
+ {% assign _index = forloop.index0 %}
4
+ {% break %}
5
+ {% endif %}
6
+ {% endfor %}
7
+
8
+ {% assign _nidx = _index | plus: 1 %}
9
+ {% assign _next_segment = segment_data.items[_nidx] %}
10
+ {% assign _next_item = site.data.sessions[_next_segment] %}
11
+
12
+ {% if _index > 0 %}
13
+ {% assign _pidx = _index | minus: 1 %}
14
+ {% assign _prev_segment = segment_data.items[_pidx] %}
15
+ {% assign _prev_item = site.data.sessions[_prev_segment] %}
16
+ {% endif %}
17
+
18
+ <section class="spacer center-align">
19
+
20
+ {% include segment/nav.html segment=session_data.segment icon=1 %}
21
+
22
+ <div class="paginator-container">
23
+ {% include session/next_prev.html p="previous" item=_prev_item %}
24
+ {% include session/next_prev.html p="next" item=_next_item %}
25
+ </div>
26
+ </section>
@@ -5,8 +5,10 @@
5
5
  {% include logo.html %}
6
6
  {% if page.url == '/' %}
7
7
  {% include course.html %}
8
- {% elsif page.url == '/404' %}
8
+ {% elsif page.url == '/404.html' %}
9
9
  <h2 class="center-align">Page not found!</h2>
10
+ {% elsif page.url == '/offline.html' %}
11
+ <h2 class="center-align">You're Currently Offline</h2>
10
12
  {% else %}
11
13
  {{ content }}
12
14
  {% endif %}
@@ -18,7 +18,7 @@
18
18
  </article>
19
19
  </section>
20
20
 
21
- {% include session/footer.html %}
21
+ {% include session/paginator.html %}
22
22
  {% include session/content_revealer.html %}
23
23
  {% include footer.html %}
24
24
  {% include foot/mathjax.html -%}
@@ -0,0 +1,34 @@
1
+ $size-width: 150px;
2
+
3
+ .paginator-container {
4
+ max-width: var(--content-width);
5
+ width: 100%;
6
+ display: flex;
7
+ justify-content: space-between;
8
+ }
9
+
10
+ .paginator {
11
+ width: $size-width;
12
+ a {
13
+ text-align: center;
14
+ display: block;
15
+ font-size: 14px;
16
+ line-height: 1.3;
17
+ }
18
+ img {
19
+ object-fit: cover;
20
+ width: 100%;
21
+ height: 100px;
22
+ }
23
+ }
24
+
25
+ .pull-left, .pull-right {
26
+ color: var(--darkColor);
27
+ display: flex;
28
+ align-items: end;
29
+ justify-content: flex-end;
30
+ }
31
+
32
+ .pull-left {
33
+ flex-direction: row-reverse;
34
+ }
data/_sass/_post.scss CHANGED
@@ -141,4 +141,5 @@ a.lesson-number{
141
141
  "bullets",
142
142
  "table",
143
143
  "tab-colors",
144
+ "paginator",
144
145
  "video";
@@ -13,11 +13,6 @@
13
13
  "orientation": "portrait-primary",
14
14
  "dir": "auto",
15
15
  "icons": [
16
- {
17
- "src": "logo-300.png",
18
- "type": "image/png",
19
- "sizes": "300x300"
20
- },
21
16
  {
22
17
  "src": "logo-48.png",
23
18
  "sizes": "48x48",
@@ -42,6 +37,11 @@
42
37
  "type": "image/png",
43
38
  "purpose": "maskable"
44
39
  },
40
+ {
41
+ "src": "logo-300.png",
42
+ "type": "image/png",
43
+ "sizes": "300x300"
44
+ },
45
45
  {
46
46
  "src": "logo-512.png",
47
47
  "sizes": "512x512",
@@ -50,8 +50,24 @@
50
50
  },
51
51
  {
52
52
  "src": "logo-icon.svg",
53
- "type": "image/png",
54
- "sizes": "any"
53
+ "type": "image/svg+xml",
54
+ "sizes": "any",
55
+ "purpose": "any"
56
+ }
57
+ ],
58
+ "lang": "en",
59
+ "display_override": [
60
+ "standalone",
61
+ "fullscreen"
62
+ ],
63
+ "shortcuts": [
64
+ {
65
+ icons: [
66
+ "src": "/assets/logo-96.png"
67
+ ],
68
+ "name": "{{ site.acc.shortcut.name }}",
69
+ "url": "{{ site.acc.shortcut.url }}",
70
+ "description": "{{ site.acc.shortcut.desc }}"
55
71
  }
56
72
  ]
57
73
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: askclass-course-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AskClass
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-08 00:00:00.000000000 Z
11
+ date: 2022-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -48,9 +48,10 @@ files:
48
48
  - _includes/segment/index.html
49
49
  - _includes/segment/nav.html
50
50
  - _includes/session/content_revealer.html
51
- - _includes/session/footer.html
52
51
  - _includes/session/header.html
53
52
  - _includes/session/item.html
53
+ - _includes/session/next_prev.html
54
+ - _includes/session/paginator.html
54
55
  - _includes/session/points.html
55
56
  - _includes/session/videos.html
56
57
  - _includes/session/youtube.html
@@ -60,6 +61,7 @@ files:
60
61
  - _sass/_base.scss
61
62
  - _sass/_bullets.scss
62
63
  - _sass/_grid.scss
64
+ - _sass/_paginator.scss
63
65
  - _sass/_post.scss
64
66
  - _sass/_tab-colors.scss
65
67
  - _sass/_tab.scss
@@ -1,29 +0,0 @@
1
- {% for s in segment_data.items %}
2
- {% if s == session_id %}
3
- {% assign _index = forloop.index0 %}
4
- {% break %}
5
- {% endif %}
6
- {% endfor %}
7
-
8
- <div class="center-align spacer special">
9
- {% include segment/nav.html segment=session_data.segment icon=1 %}
10
-
11
- {% assign _next_index = _index | plus: 1 %}
12
- {% assign _next_segment = segment_data.items[_next_index] %}
13
- <div class="middle-align">
14
- <span>{% include session/item.html item=session_data %}</span>
15
-
16
-
17
- {% assign _next_item = site.data.sessions[_next_segment] %}
18
- {% if _next_item %}
19
- <span class="material-symbols-outlined md-24">navigate_next</span>
20
- {% if _next_item.url %}
21
- <a href="/session/{{ _next_item.url }}">
22
- {% include session/item.html item=_next_item %}
23
- </a>
24
- {% else %}
25
- {% include session/item.html item=_next_item %}
26
- {% endif %}
27
- {% endif %}
28
- </div>
29
- </div>