askclass-course-theme 0.5.1 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 514905a300536f3d6b73949c54dcc1fdc181aea33c93887c3f8dcc055b8e37d0
4
- data.tar.gz: c58f8934c0a99269473f7b5a99d39a3ebb64ae55c025d8737a92c2e51220cb11
3
+ metadata.gz: aafc1e9d45a313b35dda95263c6056b6a5dbcdce114afe55c5f10bd3fbee28e7
4
+ data.tar.gz: ddce588ee85b9ff572bc25bf01d1fd97d1b417f6bf9595a5cb91a5128564b191
5
5
  SHA512:
6
- metadata.gz: 73208823dff0cd482574dc8456826e57c0dc1e18a3617338c61b35577a1999ded9bb82c351fd2ed7d5fc712125f8dc7a754c4d163fa41b41cd54e5dad2499a31
7
- data.tar.gz: fc9dbb0d4c4ffc48f6275ea6ec77eccd4254c7ee57971d946998b7d44e3f4ee9d49dd076cf3241885dc37a5ff6daac0b7129f28814cb6b06277974983403c16f
6
+ metadata.gz: c5d8f4e9f1cb99e737051a652647da6145d33d58da498578670ced451cfdd5f89906e8ad3640b1472f880208d0ae253ef0bcecc5509da704fc1a9a43d6d48a30
7
+ data.tar.gz: cf79699e5bf8348347b83b4e1b89b2c7c5e4c4a7727582799b3ca6ea2215e464681f21117eb038564efe8003dcdec07c523561cf6a07960774a9f1efc4e8950b
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:
@@ -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');
@@ -1,7 +1,8 @@
1
1
  {% assign acc = site.acc %}
2
2
  {% assign desc = page.excerpt | default: site.description | strip_html | strip_newlines %}
3
+ {% assign assets = '/assets/' | prepend: site.url %}
3
4
  {% assign families = acc.font_families | join: "&family=" %}
4
- {% assign og_image = acc.meta.og_image | prepend: '/assets/' | prepend: site.url %}
5
+ {% assign og_image = acc.meta.og_image | prepend: assets %}
5
6
 
6
7
  <meta charset="utf-8" />
7
8
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
@@ -26,7 +27,7 @@
26
27
  <meta name="twitter:card" content="summary_large_image">
27
28
  {% endif % %}
28
29
 
29
- <link rel="manifest" href="/assets/site.webmanifest" />
30
+ <link rel="manifest" href="{{ assets }}site.webmanifest" />
30
31
  <link rel="preconnect" href="https://cdn.jsdelivr.net" />
31
32
  <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
32
33
  <link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -34,11 +35,11 @@
34
35
  <link rel="preload" as="style"
35
36
  href="https://fonts.googleapis.com/css2?family={{ families }}&display=swap"
36
37
  onload='this.onload=null;this.rel="stylesheet"' />
37
- <link rel="shortcut icon" href="/assets/{{ acc.meta.shortcut.favicon }}" />
38
- <link rel="icon" type="{{ acc.meta.shotcut.type }}" href="/assets/{{ acc.meta.shortcut.image }}" />
39
- <link rel="icon" type="image/svg+xml" href="/assets/{{ acc.logo.image }}" />
38
+ <link rel="shortcut icon" href="{{ assets }}{{ acc.meta.shortcut.favicon }}" />
39
+ <link rel="icon" type="{{ acc.meta.shotcut.type }}" href="{{ assets}}{{ acc.meta.shortcut.image }}" />
40
+ <link rel="icon" type="image/svg+xml" href="{{ assets}}{{ acc.logo.image }}" />
40
41
 
41
- <link rel="apple-touch-icon" href="/assets/{{ acc.meta.apple_icon }}" />
42
+ <link rel="apple-touch-icon" href="{{ assets}}{{ acc.meta.apple_icon }}" />
42
43
  {% for size in acc.logo.sizes %}
43
- <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" />
44
45
  {% endfor %}
data/_includes/logo.html CHANGED
@@ -3,13 +3,13 @@
3
3
  <img src="/assets/{{ include.image | default: site.acc.logo.image }}"
4
4
  width="{{ include.size | default: site.acc.logo.size }}"
5
5
  height="{{ include.height | default: site.acc.logo.height | default: site.acc.logo.size }}"
6
- title="{{ site.title }}"/>
6
+ title="{{ site.title }}" />
7
7
  </a>
8
8
  {%- if include.href %}
9
9
  <h4 class="special"><a href="{{ include.href }}">{{ include.title | default: site.title }}</a></h4>
10
10
  {% elsif include.title %}
11
11
  <h4 class="special" style="color: var(--color-theme); margin: 0 0 1em 0">{{ include.title }}</h4>
12
12
  {% else %}
13
- <h4 class="special">{{ include.title | default: site.title }}</h4>
13
+ <h3 class="special" style="color: var(--color-theme)">{{ include.title | default: site.title }}</h3>
14
14
  {% endif -%}
15
15
  </section>
@@ -0,0 +1,25 @@
1
+ <section class="course-id">
2
+ <a href="/">
3
+ <img src="/assets/{{ include.image | default: site.acc.logo.image }}"
4
+ width="{{ include.size | default: site.acc.logo.size }}"
5
+ height="{{ include.height | default: site.acc.logo.height | default: site.acc.logo.size }}"
6
+ title="{{ site.title }}" />
7
+ </a>
8
+ <a href="/segment/{{ session_data.segment }}">{{ site.acc.short_name }}</a>
9
+ </section>
10
+
11
+ <script defer>
12
+ const e = document.querySelector('section.course-id');
13
+ window.onscroll = () => {
14
+ const top = window.pageYOffset;
15
+ if (window.innerHeight + top >= document.body.offsetHeight - 2) {
16
+ e.style.opacity = 1;
17
+ e.style.top = 'unset';
18
+ e.style.bottom = '70px';
19
+ } else {
20
+ e.style.top = '5px';
21
+ e.style.bottom = 'unset';
22
+ e.style.opacity = top > 100 ? 0.5 : 1;
23
+ }
24
+ }
25
+ </script>
@@ -1,4 +1,4 @@
1
- <section class="center-align special">
1
+ <section class="center-align special spacer">
2
2
  {%- if session_data.header -%}
3
3
  <div>{{ session_data.header }}</div>
4
4
  {%- endif -%}
@@ -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 %}
@@ -5,7 +5,7 @@
5
5
  <html lang="en">
6
6
  {% include header.html %}
7
7
  <body>
8
- {% include logo.html size=50 %}
8
+ {% include logo.html size=50 title=site.title %}
9
9
  {% include segment/header.html info=info %}
10
10
 
11
11
  {% include segment/index.html info=info %}
@@ -6,7 +6,7 @@
6
6
  <html lang="en">
7
7
  {% include header.html %}
8
8
  <body>
9
- {% include logo.html size=50 title=site.acc.short_name %}
9
+ {% include logo_static.html size=30 height=30 %}
10
10
  {% include session/header.html %}
11
11
 
12
12
  <section class="center-align spacer content">
data/_sass/_base.scss CHANGED
@@ -148,6 +148,23 @@ sub {
148
148
  margin-top: 100px;
149
149
  }
150
150
 
151
+ .course-id {
152
+ @include align-middle();
153
+ font-family: var(--font-special);
154
+ flex-direction: row-reverse;
155
+ position: fixed;
156
+ top: 5px;
157
+ right: 5px;
158
+ a {
159
+ color: var(--color-theme);
160
+ display: flex;
161
+ margin-left: 5px;
162
+ }
163
+ & a:nth-child(2) {
164
+ margin-top: 3px;
165
+ }
166
+ }
167
+
151
168
  footer {
152
169
  @include margin-top();
153
170
  @include align-center();
data/_sass/_post.scss CHANGED
@@ -47,7 +47,7 @@ article {
47
47
  margin: 1em 0 0 0;
48
48
  sub {
49
49
  font-family: var(--font-special);
50
- color: var(--color-dark);
50
+ color: var(--color-tertiary);
51
51
  font-size: 0.9rem;
52
52
  }
53
53
  & + h1, & + h2, & + h3, & + h4 {
@@ -103,7 +103,7 @@ samp {
103
103
  cursor: pointer;
104
104
  &.on {
105
105
  filter: none;
106
- color: var(--color-secondary);
106
+ color: var(--color-tertiary);
107
107
  }
108
108
  }
109
109
 
@@ -50,8 +50,21 @@
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
+ "name": "{{ site.acc.shortcut.name }}",
66
+ "url": "{{ site.acc.shortcut.url }}",
67
+ "description": "{{ site.acc.shortcut.desc }}"
55
68
  }
56
69
  ]
57
70
  }
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.1
4
+ version: 0.6.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-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -43,6 +43,7 @@ files:
43
43
  - _includes/head/meta.html
44
44
  - _includes/header.html
45
45
  - _includes/logo.html
46
+ - _includes/logo_static.html
46
47
  - _includes/segment/header.html
47
48
  - _includes/segment/index.html
48
49
  - _includes/segment/nav.html