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 +4 -4
- data/_includes/js/menu-burger.js +13 -0
- data/_includes/nav/primary.html +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9974f3fac6e3ca4c29a5b1be65a186754d51f54904c0595de0457337d1262e40
|
4
|
+
data.tar.gz: ebf8c8444d4f8ecac1a67b78329aa84163330078449c454e985b03c3eaf56121
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 796bf9fbb7d9abe3b6846defefa85944b462fa5662922a8bfb3088b172f0c7cbcaa95d57fb94bfc049c9d452860ca698b0316df78154d849da4254f30aa5d60f
|
7
|
+
data.tar.gz: 67807b539a9308f7404a0fe7a1f20ba24c24f001fcf973ada9035a0073edbc8952dacc34dcfa6296da74f89f26412a3d50e0112009efb2f17468ef93a5b1163c
|
data/_includes/js/menu-burger.js
CHANGED
@@ -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;
|
data/_includes/nav/primary.html
CHANGED
@@ -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.
|
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:
|
13
|
+
date: 2023-01-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jekyll
|