jekyll-theme-miniplex 0.3.0 → 0.5.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: a62d87e97bcc76a60a5dbc91c666fb5b5713e3965bd69db3f8eac87aaecc1ede
4
- data.tar.gz: 348e4bf7f940ec454be9821d987ecd11470735ada2d5ddc58197778e4ad4fb5b
3
+ metadata.gz: 7c7bb9146d5165d0e9a5413fcd8ad712e1152299b9e689104587a7d28057ba32
4
+ data.tar.gz: b0a1b5114c139f367c2727cdfe8d8ccc9cffe487a7f244c41ebccc5d5f137f4f
5
5
  SHA512:
6
- metadata.gz: 55d7c422976ae93ebcc7cfd1302e6478ab460d6031ff3350d7e3513585d174a2495723a544cfd49a4858e8903d966d1ad2ce7bf5bd3a0232bd4ec7a4097b57a0
7
- data.tar.gz: 68242ad962ebb5871f483b913dd32b2f406a9bd64933c18beb2ada58cd90445db8a6cffe0d17730e10a8b994f4d7d7267de132b8be261e476ef2517bc19c15b6
6
+ metadata.gz: 3b898bf2b5a6d844fff3dc53939acbf38a5956e570470288d35e4bbb2f8c9216db856ba7826a09981b63284d791541ef42baf01cd72f75a67252ab856866414a
7
+ data.tar.gz: 10042b2fd039b19964165d5f7015fb586e49164bdb4510c95b493cbc96131722fcf121b4e667a4443d62cf6ff22923448401b0f95bca696d4164f4789eb06a8d
data/README.md CHANGED
@@ -22,6 +22,9 @@ Add the following to your Jekyll site's `Gemfile`:
22
22
  ```ruby
23
23
  gem "jekyll-theme-miniplex"
24
24
 
25
+ # jekyll-theme-miniplex depends on this.
26
+ gem "jekyll-titles-from-headings", "~> 0.5.3"
27
+
25
28
  # Use the most recent version of jekyll-sass-converter, to force Dart Sass
26
29
  gem "sass-embedded"
27
30
  gem "jekyll-sass-converter", github: "jekyll/jekyll-sass-converter"
@@ -53,6 +56,18 @@ miniplex:
53
56
  mobile_nav_menu_title: "Menü"
54
57
  ```
55
58
 
59
+ ## ToDos & Missing Features
60
+
61
+ - [ ] Add a post's date to the page layout, or to a separate post layout
62
+ - [ ] Print CSS
63
+ - [ ] Breadcrumbs
64
+ - [ ] In-page navigation
65
+ - [ ] Footer
66
+ - [ ] Maximizable tables
67
+ - [ ] Side notes, if possible
68
+ - [ ] Dark mode
69
+
70
+
56
71
  ## License
57
72
 
58
73
  The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/_config.yml CHANGED
@@ -6,6 +6,7 @@ title: Miniplex Theme for Jekyll
6
6
 
7
7
  plugins:
8
8
  - jekyll-coffeescript
9
+ - jekyll-titles-from-headings
9
10
 
10
11
  exclude:
11
12
  - .sass-cache/
@@ -23,3 +24,7 @@ exclude:
23
24
  - vendor/gems/
24
25
  - vendor/ruby/
25
26
 
27
+ titles_from_headings:
28
+ enabled: true
29
+ strip_title: true
30
+ collections: true # This makes it work for posts as well
@@ -6,7 +6,7 @@
6
6
  {% assign site_pages = site.pages %}
7
7
  {% for listed_page in site_pages %}
8
8
  {% if listed_page.url == page.url %}
9
- <li><a href="{{listed_page.url}}" class="active">{{listed_page.title}}</a></li>
9
+ <li><a href="{{listed_page.url}}" class="active">{{listed_page.title}} <span class="visually-hidden">(Current page)</span></a></li>
10
10
  {% else %}
11
11
  <li><a href="{{listed_page.url}}">{{listed_page.title}}</a></li>
12
12
  {% endif %}
@@ -19,7 +19,7 @@
19
19
  {% assign site_posts = site.posts %}
20
20
  {% for listed_post in site_posts %}
21
21
  {% if listed_post.url == page.url %}
22
- <li><a href="{{listed_post.url}}" class="active">{{listed_post.title}}</a></li>
22
+ <li><a href="{{listed_post.url}}" class="active">{{listed_post.title}} <span class="visually-hidden">(Current page)</span></a></li>
23
23
  {% else %}
24
24
  <li><a href="{{listed_post.url}}">{{listed_post.title}}</a></li>
25
25
  {% endif %}
@@ -1,13 +1,13 @@
1
1
  <div id="transparent-nav-close-area">
2
2
  </div>
3
- <ul id="navigation-items">
3
+ <ul id="navigation-items" aria-hidden="true">
4
4
  <li>Pages</li>
5
5
  <li>
6
6
  <ul>
7
7
  {% assign site_pages = site.pages %}
8
8
  {% for listed_page in site_pages %}
9
9
  {% if listed_page.url == page.url %}
10
- <li><a href="{{listed_page.url}}" class="active">{{listed_page.title}}</a></li>
10
+ <li><a href="{{listed_page.url}}" class="active">{{listed_page.title}} <span class="visually-hidden">(Current page)</span></a></li>
11
11
  {% else %}
12
12
  <li><a href="{{listed_page.url}}">{{listed_page.title}}</a></li>
13
13
  {% endif %}
@@ -20,7 +20,7 @@
20
20
  {% assign site_posts = site.posts %}
21
21
  {% for listed_post in site_posts %}
22
22
  {% if listed_post.url == page.url %}
23
- <li><a href="{{listed_post.url}}" class="active">{{listed_post.title}}</a></li>
23
+ <li><a href="{{listed_post.url}}" class="active">{{listed_post.title}} <span class="visually-hidden">(Current page)</span></a></li>
24
24
  {% else %}
25
25
  <li><a href="{{listed_post.url}}">{{listed_post.title}}</a></li>
26
26
  {% endif %}
@@ -31,6 +31,6 @@
31
31
  <ul id="navigation-controls">
32
32
  <li id="site-title"><a href="/">{{ site.title | default: "Your site has no title yet. Set it in _config.yml." }}</a></li>
33
33
  <li>
34
- <button id="mobile-navigation-toggle">{{ site.miniplex.mobile_nav_menu_title | default: "Menu" }}</button>
34
+ <button id="mobile-navigation-toggle" aria-label="Open Menu" aria-expanded="false">{{ site.miniplex.mobile_nav_menu_title | default: "Menu" }}</button>
35
35
  </li>
36
36
  </ul>
@@ -16,16 +16,18 @@
16
16
  </head>
17
17
 
18
18
  <body>
19
+ <a href="#content" class="visually-hidden" id="skiplink">Skip to Content</a>
19
20
  <div id="layout">
20
21
  <main id="content">
21
22
  <section>
23
+ <h1>{{ page.title }}</h1>
22
24
  {{ content }}
23
25
  </section>
24
26
  </main>
25
- <nav id="navigation-desktop">
27
+ <nav id="navigation-desktop" role="navigation">
26
28
  {% include navigation_desktop.html %}
27
29
  </nav>
28
- <nav id="navigation-mobile" data-state="closed">
30
+ <nav id="navigation-mobile" data-state="closed" role="navigation">
29
31
  {% include navigation_mobile.html %}
30
32
  </nav>
31
33
  </div>
@@ -196,7 +196,6 @@ $group_color_level_2: #dddddd
196
196
  font-style: italic
197
197
  src: url("../fonts/IBMPlexSerif-BoldItalic.woff2")
198
198
 
199
-
200
199
  @mixin default_font
201
200
  font-family: IBMPlexSans
202
201
  @include responsive_property(font-size, $xs: 0.875 * $unit, $s: 1 * $unit, $m: 1.125 * $unit, $otherwise: 1.125 * $unit)
@@ -220,6 +219,23 @@ $group_color_level_2: #dddddd
220
219
  font-style: italic
221
220
  color: $accent_color_1
222
221
 
222
+ // Accessibility
223
+ .visually-hidden
224
+ position: absolute
225
+ left: -10000px
226
+ top: auto
227
+ width: 1px
228
+ height: 1px
229
+ overflow: hidden
230
+
231
+ &:focus
232
+ color: $primary_foreground_color
233
+ display: inline-block
234
+ height: auto
235
+ width: auto
236
+ position: static
237
+ margin: auto
238
+
223
239
  body
224
240
  @include default_font
225
241
  background: $outer_background_color
@@ -274,18 +290,20 @@ body
274
290
  @include default_font
275
291
  @include responsive_property(margin-bottom, $xs: 0.75 * $unit, $s: 0.875 * $unit, $m: 1 * $unit, $otherwise:1 * $unit)
276
292
 
277
- strong
293
+ strong, b
278
294
  font-weight: bold
279
295
  color: $heading_foreground_color
280
296
 
281
297
 
282
- em
298
+ em, i
283
299
  font-style: italic
284
300
 
285
301
  a
286
302
  color: $interactive-color
287
303
  background-color: $interactive_background_color
288
304
  text-decoration: none
305
+ padding-left: math.div($unit, 4)
306
+ padding-right: math.div($unit, 4)
289
307
 
290
308
  h1
291
309
  @include title_font
@@ -317,12 +335,21 @@ body
317
335
  h5
318
336
  @include heading_font
319
337
  color: $heading_foreground_color
320
-
321
-
322
338
  @include responsive_property(font-size, $xs: 0.75 * $unit, $s: 0.875 * $unit, $m: 1 * $unit, $otherwise: 1 * $unit)
323
339
  @include responsive_property(margin-top, $xs: 0.75 * $unit, $s: 0.875 * $unit, $m: 1 * $unit, $otherwise: 1 * $unit)
324
340
  @include responsive_property(margin-bottom, $xs: 0.75 * $unit, $s: 0.875 * $unit, $m: 1 * $unit, $otherwise: 1 * $unit)
325
-
341
+
342
+ h6
343
+ @include heading_font
344
+ color: $primary_foreground_color
345
+ @include responsive_property(font-size, $xs: 0.625 * $unit, $s: 0.75 * $unit, $m: 0.875 * $unit, $otherwise: 0.875 * $unit)
346
+ @include responsive_property(margin-top, $xs: 0.625 * $unit, $s: 0.75 * $unit, $m: 0.875 * $unit, $otherwise: 0.875 * $unit)
347
+ @include responsive_property(margin-bottom, $xs: 0.625 * $unit, $s: 0.75 * $unit, $m: 0.875 * $unit, $otherwise: 0.875 * $unit)
348
+
349
+ hr
350
+ border: 0
351
+ border-top: 1px solid $accent_color_1
352
+ border-bottom: 1px solid $accent_color_1
326
353
 
327
354
  // Ordered lists
328
355
  ol
@@ -624,7 +651,11 @@ body
624
651
  width: 100vw
625
652
  height: 100vh
626
653
 
654
+ #transparent-nav-close-area
655
+ display: block
656
+
627
657
  #navigation-items
658
+ display: block
628
659
  box-shadow: 0 math.div($unit, 2) math.div($unit, 1) rgba($heading_foreground_color, 0.4)
629
660
 
630
661
  #navigation-controls
@@ -14,6 +14,7 @@ document.addEventListener "DOMContentLoaded", (DOMLoadedEvent) ->
14
14
 
15
15
  # Mobile navigation
16
16
  mobileNavigation = document.querySelector "nav#navigation-mobile"
17
+ mobileNavigationItems = document.querySelector "nav#navigation-mobilenav#navigation-mobile ul#navigation-items"
17
18
  navigationToggleButton = document.querySelector "button#mobile-navigation-toggle"
18
19
  transparentNavCloseArea = document.querySelector "div#transparent-nav-close-area"
19
20
  body = document.querySelector "body"
@@ -22,9 +23,13 @@ document.addEventListener "DOMContentLoaded", (DOMLoadedEvent) ->
22
23
  switch mobileNavigation.dataset.state
23
24
  when "closed"
24
25
  mobileNavigation.dataset.state = "open"
26
+ navigationToggleButton.setAttribute "aria-expanded", "true"
27
+ mobileNavigationItems.setAttribute "aria-hidden", "false"
25
28
  body.style.overflow = "hidden"
26
29
  when "open"
30
+ navigationToggleButton.setAttribute "aria-expanded", "false"
27
31
  mobileNavigation.dataset.state = "closed"
32
+ mobileNavigationItems.setAttribute "aria-hidden", "true"
28
33
  body.style.overflow = "initial"
29
34
 
30
35
  navigationToggleButton.addEventListener "click", toggleNavigation
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-miniplex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timo Würsch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-28 00:00:00.000000000 Z
11
+ date: 2023-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll