askclass-home-theme 0.0.4 → 0.1.1

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: b394cb0ccaff8e07e1741e2480f78a1e002733d7cb3bc94830ceded61dda80d1
4
- data.tar.gz: dd103398ab46a34bca8802f46b8e048dd0dbf73e2858ce345ad2cf3bbcc095ac
3
+ metadata.gz: 3413b1e939a63599c28707462a98e60c85002af9bf43be2c73d834daa3d19d22
4
+ data.tar.gz: 246359b8287e23b34da0f777ffa6420752e1bb4428a91f8a1c4586a1233fe530
5
5
  SHA512:
6
- metadata.gz: 7c5327bac9a6b5b01d6b32539355357adb478f5c47a2c55ea0d783ecd7c0ee64202adf0bbf3c07f36b8027b2a16ad1e626d728f0d671a6662097023a816887af
7
- data.tar.gz: 955011743e641ee956a626a253795cd31e3231755b5c4eb7dc8ce901e26caef14500763a97401b14f949cd79c0f45f5fffa6cd8009e28e1238b830fec791e06b
6
+ metadata.gz: 764cb5e4f6736052744cf3c85e0e27614047028de61ae5ff0a882468388c07359ba14076a5b9fd573eca02bafb397b8730ccd350e5d372a7dc6b583da6853ff5
7
+ data.tar.gz: e33660c4bb31751539ac8798ec029db4e0ce608f4c795895a945ec46c178110a76a43db187917e87310ea2eb4392df702b1ee71b02376cb11a54ee36ef578e6f
data/_config.yml CHANGED
@@ -23,10 +23,7 @@ ach:
23
23
  meta:
24
24
  apple_icon: "logo-300.png"
25
25
  og_image: "logo-square-512.png"
26
- shortcut:
27
- favicon: "favicon.ico"
28
- type: "image/png"
29
- image: "logo-96.png"
26
+ favicon: "favicon.ico"
30
27
  keywords: >
31
28
  edtech,
32
29
  education,
@@ -36,11 +33,6 @@ ach:
36
33
  student,
37
34
  educator,
38
35
  university
39
- footer:
40
- - href: "https://askclass.com"
41
- text: "© 2023 AskClass."
42
- - href: "https://app.askclass.com"
43
- text: "Keep Asking®"
44
36
  font_families:
45
37
  - Lora
46
38
  - Open+Sans:ital,wght@0,300;0,400;0,500;0,700;1,400;1,700
@@ -41,7 +41,7 @@
41
41
  <p>{{ info.text }}</p>
42
42
  {%- endif %}
43
43
  {%- if info.more %}
44
- <a class='a-button link' href='{{ info.more.href }}'>
44
+ <a class='a-button link {{ info.more.size }}' href='{{ info.more.href }}'>
45
45
  {{ info.more.label }}
46
46
  </a>
47
47
  {%- endif %}
@@ -17,16 +17,22 @@
17
17
  '>
18
18
  {%- if box.image %}
19
19
  <div class='image-overlay'>
20
- <img src='{{ box.image.src }}' title='{{ box.image.text }}' width='{{ box.image.width }}' />
20
+ <img onclick='playGif(this)'
21
+ src='{{ box.image.src }}'
22
+ data-gif='{{ box.image.gif }}'
23
+ title='{{ box.image.text }}'
24
+ width='{{ box.image.width | default: "100%" }}' />
21
25
  </div>
22
26
  {%- endif %}
23
- <h1 class='{{ smaller }}'>{{ box.title }}</h1>
24
- <p>{{ box.text }}</p>
25
- {%- if box.button %}
26
- <a class='a-button link' href='{{ box.button.href }}'>
27
- {{ box.button.label }}
28
- </a>
29
- {%- endif %}
27
+ <div class='text-content'>
28
+ <h1 class='{{ smaller }}'>{{ box.title }}</h1>
29
+ <p>{{ box.text }}</p>
30
+ {%- if box.button %}
31
+ <a class='a-button link' href='{{ box.button.href }}'>
32
+ {{ box.button.label }}
33
+ </a>
34
+ {%- endif %}
35
+ </div>
30
36
  </div>
31
37
  {%- endfor %}
32
38
  </div>
@@ -0,0 +1 @@
1
+ <script src='/assets/js/scripts.js' />
@@ -1,12 +1,22 @@
1
+ {%- assign FOOTER = site.data[LANG].footer | default: site.data.footer %}
2
+ {%- if FOOTER %}
1
3
  <footer>
2
4
  <ul>
3
- {% for item in site.ach.footer -%}
5
+ {%- for item in FOOTER -%}
4
6
  <li>
7
+ {%- if item.copyright %}
8
+ &copy; {{ site.time | date: "%Y" }}&nbsp;
9
+ {%- endif %}
5
10
  {%- if item.icon -%}
6
11
  <span class="material-symbols-outlined">{{ item.icon }}</span>
7
12
  {%- endif -%}
8
- <a href="{{ item.href }}">{{ item.text }}</a>
13
+ {%- if item.href %}
14
+ <a href="{{ item.href }}">{{ item.text }}</a>
15
+ {%- else %}
16
+ {{ item.text }}
17
+ {%- endif %}
9
18
  </li>
10
19
  {%- endfor %}
11
20
  </ul>
12
21
  </footer>
22
+ {%- endif %}
@@ -1,7 +1,11 @@
1
- {% assign ach = site.ach %}
2
- {% assign desc = page.excerpt | default: site.description | strip_html | strip_newlines %}
3
- {% assign assets = '/assets/' | prepend: site.url %}
4
- {% assign families = ach.font_families | join: "&family=" %}
1
+ {%- assign ach = site.ach %}
2
+ {%- assign desc = SEGMENTS[slug].text
3
+ | default: page.excerpt
4
+ | default: site.description
5
+ | strip_html
6
+ | strip_newlines %}
7
+ {%- assign assets = '/assets/' | prepend: site.url %}
8
+ {%- assign families = ach.font_families | join: "&family=" %}
5
9
  {%- assign og_image = ach.meta.og_image | prepend: '/assets/' %}
6
10
 
7
11
  <meta charset="utf-8" />
@@ -21,11 +25,11 @@
21
25
  <meta property="og:site_name" content="{{ site.title }}" />
22
26
  <meta property="og:description" content="{{ desc }}" />
23
27
  <meta property="og:url" content="{{ site.url }}{{ page.url }}" />
24
- <meta property="og:image" content="{{ page.image | default: og_image }}" />
25
- {% if ach.twitter %}
28
+ <meta property="og:image" content="{{ SEGMENTS[slug].image.src | default: page.image | default: og_image }}" />
29
+ {%- if ach.social.twitter %}
26
30
  <meta name="twitter:site" content="{{ ach.social.twitter }}" />
27
31
  <meta name="twitter:card" content="summary_large_image">
28
- {% endif % %}
32
+ {%- endif % -%}
29
33
 
30
34
  <link rel="manifest" href="/assets/site.webmanifest" />
31
35
  <link rel="preconnect" href="https://cdn.jsdelivr.net" />
@@ -35,11 +39,12 @@
35
39
  <link rel="preload" as="style"
36
40
  href="https://fonts.googleapis.com/css2?family={{ families }}&display=swap"
37
41
  onload='this.onload=null;this.rel="stylesheet"' />
38
- <link rel="shortcut icon" href="/assets/{{ ach.meta.shortcut.favicon }}" />
39
- <link rel="icon" type="{{ ach.meta.shotcut.type }}" href="/assets/{{ ach.meta.shortcut.image }}" />
40
- <link rel="icon" type="image/svg+xml" href="/assets/{{ ach.logo.alt_image }}" />
42
+ <link rel="shortcut icon" href="/assets/{{ ach.meta.favicon }}" />
43
+ {%- for icon in site.data.icons %}
44
+ <link rel="icon" type="{{ icon.type }}" href="{{ icon.href }}" />
45
+ {%- endfor %}
41
46
 
42
47
  <link rel="apple-touch-icon" href="/assets/{{ ach.meta.apple_icon }}" />
43
- {% for size in ach.logo.sizes %}
48
+ {%- for size in ach.logo.sizes %}
44
49
  <link rel="apple-touch-icon" sizes="{{size}}x{{size}}" href="/assets/logo-square-{{size}}.png" />
45
50
  {%- endfor %}
@@ -0,0 +1,15 @@
1
+ {%- if _langCount > 1 %}
2
+ {%- for lang in _langs %}
3
+ {%- assign linkText = lang.text | default: lang.tag %}
4
+ {%- if LANG == lang.tag %}
5
+ <a href="javascript:void(0)"
6
+ class="a-button small">{{ linkText }}</a>
7
+ {%- elsif lang.tag == _langs[0].tag %}
8
+ <a href="/"
9
+ class="a-button small link">{{ linkText }}</a>
10
+ {%- else %}
11
+ <a href="/{{ lang.tag }}"
12
+ class="a-button small link">{{ linkText }}</a>
13
+ {%- endif %}
14
+ {%- endfor %}
15
+ {%- endif %}
@@ -1,10 +1,11 @@
1
- {%- if session_data.title -%}
2
- {%- assign title = session_data.title | append: " &bull; " | append: site.title -%}
1
+ {%- assign slug = page.name | remove_first: '.md' %}
2
+ {%- if SEGMENTS[slug].headers -%}
3
+ {%- assign title = SEGMENTS[slug].headers | join: ' ' | append: " &bull; " | append: site.title -%}
3
4
  {%- elsif site.title -%}
4
5
  <meta property="og:type" content="website" />
5
6
  <meta property="og:image:width" content="150" />
6
7
  <meta property="og:image:height" content="150" />
7
8
  {%- endif -%}
9
+
8
10
  <title>{{ title | default: site.title }}</title>
9
11
  <meta property="og:title" content="{{ title | default: site.title }}" />
10
- <meta name="author" content="{{ writer | default: site.title }}" />
@@ -0,0 +1,8 @@
1
+ {%- assign _nav = site.data[LANG].nav | default: site.data.nav %}
2
+ <div class='nav-buttons'>
3
+ {%- include head/languages.html %}
4
+ {%- for button in _nav.buttons %}
5
+ <a href="{{ button.url }}" class="a-button {{ button.color }} {{ button.hidden }}">{{ button.text }}</a>
6
+ {%- endfor %}
7
+ </div>
8
+
@@ -0,0 +1,7 @@
1
+ <section class="center-align">
2
+ <article class="space-between max-width">
3
+ {%- include logo.html %}
4
+ {%- include head/top-nav-buttons.html %}
5
+ </article>
6
+ </section>
7
+
@@ -0,0 +1,10 @@
1
+ {%- assign _langs = site.data.nav.languages %}
2
+ {%- assign _langCount = _langs | size %}
3
+ {%- if _langCount > 1 %}
4
+ {%- assign LANG = page.lang | default: _langs[0].tag %}
5
+ {%- else %}
6
+ {%- assign LANG = 'en' %}
7
+ {%- endif %}
8
+ {%- assign TEXT = site.data.text[LANG] | default: site.data.text %}
9
+ {%- assign BASEURL = page.lang | default: '' | prepend: '/' %}
10
+ {%- assign SEGMENTS = site.data[LANG].segments | default: site.data.segments %}
data/_includes/logo.html CHANGED
@@ -1,14 +1,5 @@
1
- <section class="center-align">
2
- <article class="space-between max-width">
3
- <a href="/">
4
- <img src="/assets/{{ include.image | default: site.ach.logo.image }}"
5
- width="{{ include.size | default: site.ach.logo.size }}"
6
- title="{{ site.title }}" />
7
- </a>
8
- <div class='nav-buttons'>
9
- {%- for button in site.data.nav %}
10
- <a href="{{ button.url }}" class="a-button">{{ button.text }}</a>
11
- {%- endfor %}
12
- </div>
13
- </article>
14
- </section>
1
+ <a href="{{ BASEURL }}">
2
+ <img src="/assets/{{ include.image | default: site.ach.logo.image }}"
3
+ width="{{ include.size | default: site.ach.logo.size }}"
4
+ title="{{ site.title }}" />
5
+ </a>
data/_includes/main.html CHANGED
@@ -1,4 +1,5 @@
1
- {%- for segment in site.data.main.segments %}
2
- {%- assign info = site.data.segments[segment] %}
3
- {%- include boxes/{{ info.type | default: 'fullpage' }}.html data=info %}
1
+ {%- assign _slist = site.data[LANG].main.segments | default: site.data.main.segments %}
2
+ {%- for segment in _slist %}
3
+ {%- assign _info = SEGMENTS[segment] %}
4
+ {%- include boxes/{{ _info.type | default: 'fullpage' }}.html data=_info %}
4
5
  {%- endfor %}
@@ -1,18 +1,20 @@
1
1
  <!doctype html>
2
- <html lang="en">
2
+ {%- include localize.html %}
3
+ <html lang="{{ LANG }}">
3
4
  {% include header.html %}
4
5
  <body>
5
- {% include logo.html %}
6
- {% if page.url == '/' %}
6
+ {% include head/top-nav.html %}
7
+ {% if page.url == '/' or page.lang %}
7
8
  {% include main.html %}
8
9
  {% elsif page.url == '/404.html' %}
9
- <h2 class="center-align">Page not found!</h2>
10
+ <h2 class="center-align">{{ TEXT.page-not-found }}</h2>
10
11
  {% elsif page.url == '/offline.html' %}
11
- <h2 class="center-align">You're Currently Offline</h2>
12
+ <h2 class="center-align">{{ TEXT.offline }}</h2>
12
13
  {% else %}
13
14
  {{ content }}
14
15
  {% endif %}
15
16
  {% include footer.html %}
17
+ {% include foot/js.html %}
16
18
  {% include foot/pwaupdate.html %}
17
19
  </body>
18
20
  </html>
@@ -1,8 +1,9 @@
1
1
  <!doctype html>
2
- <html lang="en">
2
+ {%- include localize.html %}
3
+ <html lang="{{ LANG }}">
3
4
  {% include header.html %}
4
5
  <body>
5
- {% include logo.html %}
6
+ {% include head/top-nav.html %}
6
7
  <section class="center-align content">
7
8
  <article class='max-width'>
8
9
  {{ content }}
data/_sass/_base.scss CHANGED
@@ -20,6 +20,7 @@
20
20
  --color-button-bg: #{$color-button-bg};
21
21
  --color-button2-fg: #{$color-button2-fg};
22
22
  --color-button2-bg: #{$color-button2-bg};
23
+
23
24
  --color-code-bg: #{$color-code-bg};
24
25
 
25
26
  --content-width: #{$content-width};
@@ -143,19 +144,16 @@ sub {
143
144
  justify-content: space-between;
144
145
  }
145
146
 
146
- .spacer {
147
- margin-top: 100px;
148
- }
149
-
150
147
  .max-width {
151
148
  max-width: var(--content-width);
152
149
  width: 100%;
153
150
  }
154
151
 
155
152
  footer {
156
- @include margin-top();
157
153
  @include align-center();
158
- color: var(--color-dark);
154
+ margin: $margin-footer;
155
+ color: $color-footer-fg;
156
+ background-color: $color-footer-bg;
159
157
  font-size: 14px;
160
158
  ul {
161
159
  padding: 0;
@@ -164,47 +162,10 @@ footer {
164
162
  @include align-middle();
165
163
  margin: 0 5px;
166
164
  a {
167
- color: var(--color-dark);
165
+ color: $color-footer-link;
168
166
  }
169
167
  }
170
168
  }
171
169
  }
172
170
 
173
- .a-button {
174
- font-size: 1em;
175
- line-height: 1em;
176
- transition: all .2s ease-in-out;
177
- border: 2px solid transparent;
178
- padding: 15px 20px;
179
- height: auto;
180
- letter-spacing: .75px;
181
- display: inline-flex;
182
- justify-content: center;
183
- align-items: center;
184
- box-sizing: border-box;
185
- border-radius: 5px;
186
- color: var(--color-button-fg);
187
- background-color: var(--color-button-bg);
188
- text-align: center;
189
- text-transform: uppercase;
190
- font-weight: bold;
191
- &:hover {
192
- opacity: 0.8;
193
- transform: translateY(-3px);
194
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
195
- }
196
- &.link {
197
- color: var(--color-fg);
198
- background-color: transparent;
199
- }
200
- &.secondary {
201
- color: var(--color-button2-fg);
202
- background-color: var(--color-button2-bg);
203
- }
204
- }
205
-
206
- .nav-buttons {
207
- margin: 0 1em;
208
- }
209
-
210
- @import "media";
171
+ @import "buttons", "media";
data/_sass/_bullets.scss CHANGED
@@ -1,15 +1,34 @@
1
+ ul, ol {
2
+ padding-inline-start: 2em;
3
+ margin-block-start: 0.5em;
4
+ margin-block-end: 0.5em;
5
+ ul, ol {
6
+ padding-inline-start: 1.2em;
7
+ }
8
+ blockquote {
9
+ padding-left: 0.8em;
10
+ margin-left: 0.2em;
11
+ margin-right: 0.5em;
12
+ }
13
+ }
14
+ ol ::marker, ul ::marker {
15
+ color: var(--color-bullet);
16
+ }
1
17
  ol > li {
2
18
  ul > li {
3
- list-style-type: disc;
19
+ list-style-type: initial;
4
20
  }
5
21
  ol > li {
6
22
  list-style: lower-alpha;
23
+ ol > li {
24
+ list-style: lower-greek;
25
+ }
7
26
  }
8
27
  }
9
28
 
10
29
  ul > li > ul > li {
11
- list-style-type: square;
30
+ list-style-type: initial;
12
31
  ul > li {
13
- list-style-type: circle;
32
+ list-style-type: initial;
14
33
  }
15
34
  }
@@ -0,0 +1,39 @@
1
+ .a-button {
2
+ font-size: 1em;
3
+ line-height: 1em;
4
+ transition: all .2s ease-in-out;
5
+ border: 2px solid transparent;
6
+ padding: 15px 20px;
7
+ height: auto;
8
+ letter-spacing: .75px;
9
+ display: inline-flex;
10
+ justify-content: center;
11
+ align-items: center;
12
+ box-sizing: border-box;
13
+ border-radius: 5px;
14
+ color: var(--color-button-fg);
15
+ background-color: var(--color-button-bg);
16
+ text-align: center;
17
+ text-transform: uppercase;
18
+ font-weight: bold;
19
+ &:hover {
20
+ opacity: 0.8;
21
+ transform: translateY(-3px);
22
+ box-shadow: 0 2px 4px rgba(0,0,0,0.2);
23
+ }
24
+ &.link {
25
+ color: var(--color-fg);
26
+ background-color: transparent;
27
+ }
28
+ &.secondary {
29
+ color: var(--color-button2-fg);
30
+ background-color: var(--color-button2-bg);
31
+ }
32
+ &.small {
33
+ padding: 5px;
34
+ }
35
+ }
36
+
37
+ .nav-buttons {
38
+ margin: 0 1em;
39
+ }
data/_sass/_defaults.scss CHANGED
@@ -20,6 +20,13 @@ $color-button-fg: #fff;
20
20
  $color-button-bg: #ff4713;
21
21
  $color-button2-fg: #fff;
22
22
  $color-button2-bg: #222;
23
+
23
24
  $color-code-bg: #222;
24
25
 
26
+ $color-footer-bg: transparent;
27
+ $color-footer-fg: #444;
28
+ $color-footer-link: #222;
29
+
30
+ $margin-footer: 100px 0 0 0;
31
+
25
32
  $content-width: 1200px;
data/_sass/_section.scss CHANGED
@@ -1,6 +1,5 @@
1
1
  .animated {
2
2
  margin: 0;
3
- line-height: 1.2;
4
3
  animation-name: taglineEmerge;
5
4
  animation-fill-mode: forwards;
6
5
  animation-duration: 1400ms;
@@ -29,11 +28,14 @@ article {
29
28
  width: 100%;
30
29
  }
31
30
  .image-overlay {
32
- margin-bottom: 20px;
33
31
  img {
34
- border-radius: 1em;
32
+ border-radius: 1em 1em 0 0;
35
33
  }
36
34
  }
35
+ .text-content {
36
+ margin-top: 2em;
37
+ padding: 0 2em;
38
+ }
37
39
  }
38
40
 
39
41
  &.fullpage {
@@ -70,8 +72,7 @@ article {
70
72
  .box {
71
73
  width: 100%;
72
74
  box-sizing: border-box;
73
- border-radius: 2em;
74
- padding: 2em;
75
+ border-radius: 1em;
75
76
  margin: 1em 0;
76
77
  h1 {
77
78
  margin: 0;
@@ -87,23 +88,26 @@ article {
87
88
  h1 { font-size: 80px; }
88
89
  h1.smaller { font-size: 70px; }
89
90
  h4, p { font-size: 35px; }
91
+ ul { font-size: 33px; }
92
+ .hide-large { display: none; }
90
93
  }
91
94
 
92
95
  @mixin medium() {
93
96
  h1 { font-size: 50px; }
94
97
  h1.smaller { font-size: 40px; }
95
- h4, p { font-size: 30px; }
98
+ h4, p, ul { font-size: 30px; }
99
+ .hide-medium { display: none; }
96
100
  }
97
101
 
98
102
  @mixin small() {
99
103
  h1 { font-size: 40px; }
100
104
  h1.smaller { font-size: 30px; }
101
105
  h4, p { font-size: 24px; }
106
+ ul { font-size: 23px; }
107
+ .hide-small { display: none; }
102
108
  }
103
109
 
104
- @media screen and (min-width:1024px) {
105
- @include large();
106
- }
110
+ @media screen and (max-width:767px) { @include small(); }
107
111
 
108
112
  @media screen and (min-width:767px) {
109
113
  @include medium();
@@ -117,7 +121,10 @@ article {
117
121
  }
118
122
  }
119
123
  }
120
- @media screen and (max-width:767px) { @include small(); }
124
+
125
+ @media screen and (min-width:1024px) {
126
+ @include large();
127
+ }
121
128
 
122
129
  &.rounded .max-width,
123
130
  .split-content { @include small(); }
@@ -0,0 +1,6 @@
1
+ function playGif(e) {
2
+ if (!e.dataset.gif) return ;
3
+ const bak = e.src;
4
+ e.src = e.dataset.gif;
5
+ e.dataset.gif = bak;
6
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: askclass-home-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AskClass
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-06 00:00:00.000000000 Z
11
+ date: 2023-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -36,12 +36,17 @@ files:
36
36
  - _config.yml
37
37
  - _includes/boxes/fullpage.html
38
38
  - _includes/boxes/rounded.html
39
+ - _includes/foot/js.html
39
40
  - _includes/foot/pwaupdate.html
40
41
  - _includes/footer.html
41
42
  - _includes/head/common.html
43
+ - _includes/head/languages.html
42
44
  - _includes/head/meta.html
45
+ - _includes/head/top-nav-buttons.html
46
+ - _includes/head/top-nav.html
43
47
  - _includes/header.html
44
48
  - _includes/image.html
49
+ - _includes/localize.html
45
50
  - _includes/logo.html
46
51
  - _includes/main.html
47
52
  - _includes/video.html
@@ -49,6 +54,7 @@ files:
49
54
  - _layouts/modules.html
50
55
  - _sass/_base.scss
51
56
  - _sass/_bullets.scss
57
+ - _sass/_buttons.scss
52
58
  - _sass/_colors.scss
53
59
  - _sass/_defaults.scss
54
60
  - _sass/_media.scss
@@ -59,6 +65,7 @@ files:
59
65
  - assets/css/default.scss
60
66
  - assets/css/modules.scss
61
67
  - assets/favicon.ico
68
+ - assets/js/scripts.js
62
69
  - assets/loading.svg
63
70
  - assets/logo-144.png
64
71
  - assets/logo-192.png