askclass-home-theme 0.0.4 → 0.1.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: b394cb0ccaff8e07e1741e2480f78a1e002733d7cb3bc94830ceded61dda80d1
4
- data.tar.gz: dd103398ab46a34bca8802f46b8e048dd0dbf73e2858ce345ad2cf3bbcc095ac
3
+ metadata.gz: b0f03ea8c017b448577a6d7b3eb98ec48786956f92a5aa2352d9c2467022ad47
4
+ data.tar.gz: 98efd2469bc09be241ba3154192ac15bf3468327dd29f6abd5a18ddb25761358
5
5
  SHA512:
6
- metadata.gz: 7c5327bac9a6b5b01d6b32539355357adb478f5c47a2c55ea0d783ecd7c0ee64202adf0bbf3c07f36b8027b2a16ad1e626d728f0d671a6662097023a816887af
7
- data.tar.gz: 955011743e641ee956a626a253795cd31e3231755b5c4eb7dc8ce901e26caef14500763a97401b14f949cd79c0f45f5fffa6cd8009e28e1238b830fec791e06b
6
+ metadata.gz: 6f3b15cce31936a05f2767439aa59a23de8d0547bf49bf1cf40f6cb20084ec420937c22d61b9e25face3650a70df0b8bab2d0294e765295998ad2ebe7a5c27f1
7
+ data.tar.gz: 37392c6e0d3374deb99dfe88145da1eedaae97dd6b6ff504d511d24b4848745d0e27e0558f6743021e35833110bb79658bc0a8ea728293a602f10c06cb208322
data/_config.yml CHANGED
@@ -36,11 +36,6 @@ ach:
36
36
  student,
37
37
  educator,
38
38
  university
39
- footer:
40
- - href: "https://askclass.com"
41
- text: "© 2023 AskClass."
42
- - href: "https://app.askclass.com"
43
- text: "Keep Asking®"
44
39
  font_families:
45
40
  - Lora
46
41
  - Open+Sans:ital,wght@0,300;0,400;0,500;0,700;1,400;1,700
@@ -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 %}
@@ -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 %}
@@ -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.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,9 @@
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: '/' %}
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,6 @@
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
+ {%- assign SEGMENTS = site.data[LANG].segments | default: site.data.segments %}
3
+ {%- for segment in _slist %}
4
+ {%- assign _info = SEGMENTS[segment] %}
5
+ {%- include boxes/{{ _info.type | default: 'fullpage' }}.html data=_info %}
4
6
  {%- endfor %}
@@ -1,14 +1,15 @@
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 %}
@@ -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";
@@ -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;
metadata CHANGED
@@ -1,7 +1,7 @@
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.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AskClass
@@ -39,9 +39,13 @@ files:
39
39
  - _includes/foot/pwaupdate.html
40
40
  - _includes/footer.html
41
41
  - _includes/head/common.html
42
+ - _includes/head/languages.html
42
43
  - _includes/head/meta.html
44
+ - _includes/head/top-nav-buttons.html
45
+ - _includes/head/top-nav.html
43
46
  - _includes/header.html
44
47
  - _includes/image.html
48
+ - _includes/localize.html
45
49
  - _includes/logo.html
46
50
  - _includes/main.html
47
51
  - _includes/video.html
@@ -49,6 +53,7 @@ files:
49
53
  - _layouts/modules.html
50
54
  - _sass/_base.scss
51
55
  - _sass/_bullets.scss
56
+ - _sass/_buttons.scss
52
57
  - _sass/_colors.scss
53
58
  - _sass/_defaults.scss
54
59
  - _sass/_media.scss