jekyll-theme-noesya 1.1.0 → 1.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: f88c787a5f8bc4de7ae052a174e8dd95d1629db78b9cfb1cd49d5310ddd4d53d
4
- data.tar.gz: f0b7067e2b26ccbe5f793e288fa0b89157f4f41f402727c0e0bcdbc0c84c1528
3
+ metadata.gz: 9974f3fac6e3ca4c29a5b1be65a186754d51f54904c0595de0457337d1262e40
4
+ data.tar.gz: ebf8c8444d4f8ecac1a67b78329aa84163330078449c454e985b03c3eaf56121
5
5
  SHA512:
6
- metadata.gz: 5943a0ba3740ada5c6d556c62a5040756d8b6b70d8b931d88ddfdfff0995a988a65a1d5c3c3b56b15294c256bdc8d6f1cf8c1e933c3c35b644d4cf70c4f756df
7
- data.tar.gz: 83e8212ceaaa52e8d15260f48f12f895e036ebaf840eba2a46b1308af1f65bf73163de56a3ac9d9d528763e24f6b03c53d8fe94ff1488cd7965d74566a75fb8a
6
+ metadata.gz: 796bf9fbb7d9abe3b6846defefa85944b462fa5662922a8bfb3088b172f0c7cbcaa95d57fb94bfc049c9d452860ca698b0316df78154d849da4254f30aa5d60f
7
+ data.tar.gz: 67807b539a9308f7404a0fe7a1f20ba24c24f001fcf973ada9035a0073edbc8952dacc34dcfa6296da74f89f26412a3d50e0112009efb2f17468ef93a5b1163c
@@ -5,6 +5,8 @@ window.menu = {
5
5
  'use strict';
6
6
  this.dom = document.querySelector('#header');
7
7
  this.button = this.dom.querySelector('button');
8
+ this.menu = this.dom.querySelector('.menu');
9
+ this.links = this.menu.querySelectorAll('a');
8
10
 
9
11
  this.bind();
10
12
 
@@ -18,10 +20,21 @@ window.menu = {
18
20
  this.button.addEventListener('click', function () {
19
21
  document.documentElement.classList.toggle('is-menu-opened');
20
22
  this.isOpened = !this.isOpened;
23
+ this.toggleMenu();
21
24
  }.bind(this));
22
25
 
23
26
  window.addEventListener('scroll', this.scroll.bind(this));
24
27
  },
28
+ toggleMenu: function () {
29
+ 'use strict';
30
+ var i = 0;
31
+ this.menu.setAttribute('aria-hidden', !this.isOpened);
32
+
33
+ for(i = 0; i < this.links.length; i += 1) {
34
+ this.links[i].setAttribute('tabindex', this.isOpened ? 0 : -1);
35
+ }
36
+
37
+ },
25
38
  scroll: function () {
26
39
  'use strict';
27
40
  var y = window.scrollY;
@@ -1,8 +1,8 @@
1
- <nav class="menu" aria-label="Navigation principale">
1
+ <nav class="menu" aria-label="Navigation principale" aria-hidden="true">
2
2
  <ul>
3
3
  {% for item in site.data.menus.primary %}
4
4
  <li>
5
- <a href="{{ item.url }}"{% if page.url contains item.url %} class="active"{% endif %}>{{ item.title }}</a>
5
+ <a href="{{ item.url }}" tabindex="-1" {% if page.url contains item.url %} class="active"{% endif %}>{{ item.title }}</a>
6
6
  </li>
7
7
  {% endfor %}
8
8
  </ul>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-noesya
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Moulène
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-09-07 00:00:00.000000000 Z
13
+ date: 2023-01-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jekyll