askclass-course-theme 0.6.0 → 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: aafc1e9d45a313b35dda95263c6056b6a5dbcdce114afe55c5f10bd3fbee28e7
4
- data.tar.gz: ddce588ee85b9ff572bc25bf01d1fd97d1b417f6bf9595a5cb91a5128564b191
3
+ metadata.gz: 57efa5d11fc6fc2aaad9c2f429f6a6bae67b1023e96cbad3d1c0176261718346
4
+ data.tar.gz: 7b562ae2cd815ab1e613bfb32bd22dac861616970a3e53b1e4ca6b17e66f0a31
5
5
  SHA512:
6
- metadata.gz: c5d8f4e9f1cb99e737051a652647da6145d33d58da498578670ced451cfdd5f89906e8ad3640b1472f880208d0ae253ef0bcecc5509da704fc1a9a43d6d48a30
7
- data.tar.gz: cf79699e5bf8348347b83b4e1b89b2c7c5e4c4a7727582799b3ca6ea2215e464681f21117eb038564efe8003dcdec07c523561cf6a07960774a9f1efc4e8950b
6
+ metadata.gz: 1d9122a69c606cb3b773ce0087ae87000502f33fd91850c1ce9620de795730d41b3d892ac294e5c514eb3092654aeeec06a76fb409a7d9c08571949399851f93
7
+ data.tar.gz: 05010cb3e4df78795af24a3b9a1464e114acdc0f7c053fab2d05feb42d45473a946aa53684f142f76e88f4156feb0a0c57a47c03c250fe6a07dbd712c8dcf024
@@ -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>
@@ -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 %}
@@ -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>
@@ -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",
@@ -62,6 +62,9 @@
62
62
  ],
63
63
  "shortcuts": [
64
64
  {
65
+ icons: [
66
+ "src": "/assets/logo-96.png"
67
+ ],
65
68
  "name": "{{ site.acc.shortcut.name }}",
66
69
  "url": "{{ site.acc.shortcut.url }}",
67
70
  "description": "{{ site.acc.shortcut.desc }}"
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.6.0
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-09 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>