askclass-course-theme 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/course.html +15 -14
- data/_includes/segment/index.html +9 -6
- data/_includes/session/next_prev.html +4 -1
- data/_includes/session/paginator.html +24 -18
- data/_includes/session/points.html +3 -1
- data/_sass/_paginator.scss +4 -2
- data/_sass/_tab-colors.scss +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5e2964997b8ef423879ee89d636d0ef5a843926cd4e9dcddce7ec640ece573b
|
4
|
+
data.tar.gz: 131b3047ff12ca211a4bc0adcb98d87a1ff196b99b23a4490edcf631f63dc72d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1451500fc7ab750b6d3a7a22fd3750335a5695516e1b1de4afcb31de0c9af1f4c3409e2caef2a904c0889861d9ff174da693235b457b2c00616127882e20ac4f
|
7
|
+
data.tar.gz: dc40402bbf632ee19b011afd297a999e978ed69f5f1caf8fb66d607d5881d60a93cd1f14f40799a7f4028722f144a2a01ede7e113b25cc629f3bb9e5337bfda7
|
data/_includes/course.html
CHANGED
@@ -63,18 +63,19 @@
|
|
63
63
|
<script defer>
|
64
64
|
const due = document.querySelectorAll('.due');
|
65
65
|
const rocket = document.querySelectorAll('.rocket');
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
66
|
+
const ymd2ms = d => {
|
67
|
+
const ymd = d.split('-');
|
68
|
+
ymd[1]--;
|
69
|
+
return new Date(...ymd).getTime();
|
70
|
+
};
|
71
|
+
due.forEach( el =>
|
72
|
+
ymd2ms(el.dataset.date) < Date.now() &&
|
73
|
+
el.classList.add('past')
|
74
|
+
);
|
75
|
+
|
76
|
+
rocket.forEach( el =>
|
77
|
+
el.dataset.date &&
|
78
|
+
ymd2ms(el.dataset.date) < Date.now() &&
|
79
|
+
(el.innerText = 'rocket')
|
80
|
+
);
|
80
81
|
</script>
|
@@ -49,10 +49,13 @@
|
|
49
49
|
|
50
50
|
<script defer>
|
51
51
|
const due = document.querySelectorAll('.alarm');
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
52
|
+
const ymd2ms = d => {
|
53
|
+
const ymd = d.split('-');
|
54
|
+
ymd[1]--;
|
55
|
+
return new Date(...ymd).getTime();
|
56
|
+
};
|
57
|
+
due.forEach( el =>
|
58
|
+
ymd2ms(el.dataset.date) < Date.now() &&
|
59
|
+
el.parentNode.removeChild(el)
|
60
|
+
);
|
58
61
|
</script>
|
@@ -10,13 +10,16 @@
|
|
10
10
|
|
11
11
|
{%- assign _p = include.item -%}
|
12
12
|
|
13
|
-
<div class="paginator">
|
13
|
+
<div class="paginator {{ arrow }}">
|
14
14
|
{%- if _p %}
|
15
15
|
<div class="{{ align }}">
|
16
16
|
<span>{{ indicator }}</span>
|
17
17
|
<span class="material-symbols-outlined">navigate_{{ arrow }}</span>
|
18
18
|
</div>
|
19
19
|
<a href="/session/{{ _p.url }}">
|
20
|
+
{%- if _p.header -%}
|
21
|
+
{{ _p.header }} •
|
22
|
+
{%- endif -%}
|
20
23
|
{{ _p.title }}
|
21
24
|
</a>
|
22
25
|
{%- else %}
|
@@ -1,26 +1,32 @@
|
|
1
|
-
{
|
2
|
-
{
|
3
|
-
{
|
4
|
-
{
|
5
|
-
{
|
6
|
-
{
|
1
|
+
{%- for s in segment_data.items -%}
|
2
|
+
{%- if s == session_id -%}
|
3
|
+
{%- assign _index = forloop.index0 -%}
|
4
|
+
{%- break -%}
|
5
|
+
{%- endif -%}
|
6
|
+
{%- endfor -%}
|
7
7
|
|
8
|
-
{
|
9
|
-
{
|
10
|
-
{
|
8
|
+
{%- assign _nidx = _index | plus: 1 -%}
|
9
|
+
{%- assign _next_segment = segment_data.items[_nidx] -%}
|
10
|
+
{%- assign _next_item = site.data.sessions[_next_segment] -%}
|
11
11
|
|
12
|
-
{
|
13
|
-
{
|
14
|
-
{
|
15
|
-
{
|
16
|
-
{
|
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
17
|
|
18
18
|
<section class="spacer center-align">
|
19
19
|
|
20
|
-
{
|
20
|
+
{%- include segment/nav.html segment=session_data.segment -%}
|
21
|
+
<div>
|
22
|
+
{%- if session_data.header -%}
|
23
|
+
{{ session_data.header }} •
|
24
|
+
{%- endif -%}
|
25
|
+
{{ session_data.title }}
|
26
|
+
</div>
|
21
27
|
|
22
|
-
<div class="paginator-container">
|
23
|
-
{
|
24
|
-
{
|
28
|
+
<div class="paginator-container spacer">
|
29
|
+
{%- include session/next_prev.html p="previous" item=_prev_item -%}
|
30
|
+
{%- include session/next_prev.html p="next" item=_next_item -%}
|
25
31
|
</div>
|
26
32
|
</section>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
{%- if session_data.points or session_data.due -%}
|
2
|
-
<table style="width: max-content">
|
2
|
+
<table style="width: max-content; table-layout: auto; white-space: nowrap">
|
3
|
+
<tbody>
|
3
4
|
{%- if session_data.points -%}
|
4
5
|
<tr>
|
5
6
|
<td>Points</td>
|
@@ -12,5 +13,6 @@
|
|
12
13
|
<td>{{ session_data.due | date: '%B %d, %Y' }}</td>
|
13
14
|
</tr>
|
14
15
|
{%- endif -%}
|
16
|
+
</tbody>
|
15
17
|
</table>
|
16
18
|
{%- endif -%}
|
data/_sass/_paginator.scss
CHANGED
@@ -10,7 +10,6 @@ $size-width: 150px;
|
|
10
10
|
.paginator {
|
11
11
|
width: $size-width;
|
12
12
|
a {
|
13
|
-
text-align: center;
|
14
13
|
display: block;
|
15
14
|
font-size: 14px;
|
16
15
|
line-height: 1.3;
|
@@ -20,10 +19,13 @@ $size-width: 150px;
|
|
20
19
|
width: 100%;
|
21
20
|
height: 100px;
|
22
21
|
}
|
22
|
+
&.next a {
|
23
|
+
text-align: right;
|
24
|
+
}
|
23
25
|
}
|
24
26
|
|
25
27
|
.pull-left, .pull-right {
|
26
|
-
color: var(--
|
28
|
+
color: var(--color-dark);
|
27
29
|
display: flex;
|
28
30
|
align-items: center;
|
29
31
|
justify-content: flex-end;
|
data/_sass/_tab-colors.scss
CHANGED
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.7.
|
4
|
+
version: 0.7.3
|
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-
|
11
|
+
date: 2022-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|