askclass-course-theme 0.5.0 → 0.5.2

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: 9958814e12fcc66a3b3d3ec65d7b9fc566936da0d9a4f50c476a2060be0d5fdc
4
- data.tar.gz: e58a07a1d503e7eadd08e7a24ce01d978ff3817dbe2a58f0fcdceb03d6c59ebf
3
+ metadata.gz: 34b83bf2032e0eadf41513ce254b31ff03bacb69404ec7c9efbc458d8037dba0
4
+ data.tar.gz: 1bb6346d5cdd5a2ff00f800af3233e80fbc564560e14860f38f5a4cda3e9a8e2
5
5
  SHA512:
6
- metadata.gz: e5b62e020c12935fbd5b5f994e28329c1a74893c2a2671b6499ccd5320d3a890a379feee401e9b0840289e1babaa68f07cbe02afdf64312a3968041cb7d97781
7
- data.tar.gz: 03f964ecebe9f4b5b4d005eefe83ea2a820e1def34ed20afe530a4882f802b3ab5cdb24a60ad92ee6711a3d8031a5d52d068e940c74c9c516d6c2b68f1f5134f
6
+ metadata.gz: cdfccd1f7eff0e2076bd2b9df0dc78925598ab5a412bdb8ef1248d1533cbd3afccf1e8d521bdfd4351db082474b878c9baef16b34a04774e2bdf8b1f822d8dad
7
+ data.tar.gz: 6f41b51e1f7ae700b64db41aa029f37b8a48dcd0eeb5690cebdd00b7112ae8ecaaf6b25726f009c8cbc5f1e156ee1ace0ca60adf207853ab57dbca0caf15999c
@@ -23,7 +23,13 @@
23
23
  <div class="item">
24
24
  <div class="middle-align">
25
25
  <span class="material-symbols-outlined">{{ session.icon }}</span>
26
- <h3>{{ session.header }}</h3>
26
+ {%- if session.url -%}
27
+ <a href="/session/{{ session.url }}" title="{{ session.title }}">
28
+ <h3>{{ session.header }}</h3>
29
+ </a>
30
+ {%- else -%}
31
+ <h3>{{ session.header }}</h3>
32
+ {%- endif -%}
27
33
  </div>
28
34
  {%- if session.due -%}
29
35
  <small class="due"
@@ -34,11 +40,7 @@
34
40
  </small>
35
41
  {%- endif -%}
36
42
 
37
- {%- if session.url -%}
38
- <a href="/session/{{ session.url }}" title="{{ session.title }}">{{ session.title }}</a>
39
- {%- else -%}
40
- {{ session.title }}
41
- {%- endif -%}
43
+ {{ session.title }}
42
44
 
43
45
  {%- if session.part -%}
44
46
  <small>(Part {{ session.part }})</small>
@@ -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-{{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
- <h4 class="special" style="color: var(--color-secondary); margin: 0 0 1em 0">{{ include.title }}</h4>
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,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
@@ -17,6 +17,7 @@
17
17
 
18
18
  --color-card-fg: #{$color-card-fg};
19
19
  --color-card-bg: #{$color-card-bg};
20
+ --color-code-bg: #{$color-code-bg};
20
21
 
21
22
  --content-width: #{$content-width};
22
23
 
@@ -92,7 +93,7 @@ code {
92
93
  }
93
94
 
94
95
  pre {
95
- background: linear-gradient(rgba(0,0,0,0.05),rgba(0,0,0,0.05));
96
+ background: linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5));
96
97
  padding: 10px;
97
98
  code {
98
99
  color: inherit;
@@ -147,6 +148,23 @@ sub {
147
148
  margin-top: 100px;
148
149
  }
149
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
+
150
168
  footer {
151
169
  @include margin-top();
152
170
  @include align-center();
data/_sass/_post.scss CHANGED
@@ -1,3 +1,10 @@
1
+ @mixin boxed() {
2
+ margin-top: 100px;
3
+ border-radius: 5px;
4
+ padding: 2px 5px;
5
+ background-color: var(--color-code-bg);
6
+ }
7
+
1
8
  article {
2
9
  max-width: var(--content-width);
3
10
  width: 100%;
@@ -15,6 +22,38 @@ article {
15
22
  font-size: 15px;
16
23
  }
17
24
  }
25
+ h1, h2, h3, h4 {
26
+ & + * {
27
+ margin-top: 0.5em;
28
+ }
29
+ & > code {
30
+ font-size: 0.8em;
31
+ }
32
+ }
33
+ code {
34
+ @include boxed();
35
+ }
36
+ pre {
37
+ margin: 0;
38
+ code {
39
+ border: 0;
40
+ background-color: inherit;
41
+ border-radius: 0;
42
+ padding: 0;
43
+ margin: 0;
44
+ }
45
+ }
46
+ p:has(> sub) {
47
+ margin: 1em 0 0 0;
48
+ sub {
49
+ font-family: var(--font-special);
50
+ color: var(--color-tertiary);
51
+ font-size: 0.9rem;
52
+ }
53
+ & + h1, & + h2, & + h3, & + h4 {
54
+ margin-top: 0;
55
+ }
56
+ }
18
57
  address {
19
58
  font-style: normal;
20
59
  font-family: var(--font-secondary);
@@ -64,7 +103,7 @@ samp {
64
103
  cursor: pointer;
65
104
  &.on {
66
105
  filter: none;
67
- color: var(--color-secondary);
106
+ color: var(--color-tertiary);
68
107
  }
69
108
  }
70
109
 
data/_sass/_table.scss CHANGED
@@ -4,7 +4,7 @@ table {
4
4
  background-color: var(--color-row-odd, '#2a2a2a');
5
5
  }
6
6
  th, tr:nth-child(even) {
7
- background-color: var(--color-row,even, '#2f2f2f');
7
+ background-color: var(--color-row-even, '#2f2f2f');
8
8
  }
9
9
  td, th {
10
10
  word-break: normal;
data/_sass/init.scss CHANGED
@@ -3,10 +3,10 @@ $font-secondary: 'Teko', sans-serif;
3
3
  $font-special: 'Josefin Sans', sans-serif;
4
4
  $font-mono: 'Share Tech Mono', monospace;
5
5
 
6
- $color-primary: aliceblue;
7
- $color-secondary: skyblue;
6
+ $color-primary: white;
7
+ $color-secondary: floralwhite;
8
8
  $color-tertiary: #2cdd88;
9
- $color-bg: #222;
9
+ $color-bg: #3a3a3a;
10
10
  $color-fg: ivory;
11
11
  $color-dark: gray;
12
12
  $color-link: deeppink;
@@ -15,8 +15,10 @@ $color-theme: #ffc100;
15
15
  $color-row-odd: #2a2a2a;
16
16
  $color-row-even: #2f2f2f;
17
17
 
18
+ $color-code-bg: #222;
18
19
  $color-card-bg: whitesmoke;
19
20
  $color-card-fg: #444;
21
+
20
22
  $card-font-size: 16px;
21
23
 
22
24
  $content-width: 600px;
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.0
4
+ version: 0.5.2
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-07 00:00:00.000000000 Z
11
+ date: 2022-10-08 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