jekyll-theme-noesya 1.0.21 → 1.0.22

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: 5a6e29207f3bc4c283ccd58315934efc9836da9f5ea2e2f975f8b3cf45191e53
4
- data.tar.gz: e87a4e0d20feba7d2878cf8756a2a5f57256aa7c1c9d728e519629e035b3ab1f
3
+ metadata.gz: b7e56e7b5e6006e05cb21341571ca47665186f29bb15f638a95ce55d879b7f43
4
+ data.tar.gz: 263aca04c2d38797ad0a12081a37a64a685e10c81ab2e507af097b01c22ae9bf
5
5
  SHA512:
6
- metadata.gz: cb996758213248c7d8d3ad1ebca0568edecbe7d0dde84fe74bc650694b0b43acfd340dc3f90274224135da6743f29262894d00233e53447cb3b1c0b05cd4c489
7
- data.tar.gz: c1e7e3ca54c6f75514d275319a04fbc343882521d21cd8d221a49b162bce6be377b4f3b24d85596206f0f39a9f34b516fe034545e6f2e7c9cf206f08e2aabfbb
6
+ metadata.gz: 186aed2f2617b7083401745466fdbfaf192ca36c414898a113e9ab0fc0597f02cd3f1292b870720b280200fd2e3fe8eecef323adf954b579c292d381c1297645
7
+ data.tar.gz: a176e88b1054bfc67cae6e9cca5baf97e211ac8540d52c9111258d1e96f1f6f78ace0f53e47df124129d0cc6fbb2078bab185cd1c923bbfe21da70aefec6c255
@@ -1,16 +1,45 @@
1
+ {% assign previous = false %}
2
+ {% assign next = false %}
1
3
  {% if page.nav %}
2
- <nav>
4
+ {% assign previous = page.nav.previous %}
5
+ {% assign next = page.nav.next %}
6
+ {% elsif include.auto %}
7
+ {% assign collection = site[page.collection] %}
8
+
9
+ {% for item in collection %}
10
+ {% if item.title == page.title %}
11
+ {% unless forloop.first %}
12
+ {% assign previous = iterator %}
13
+ {% endunless %}
14
+ {% unless forloop.last %}
15
+ {% assign next = collection[forloop.index] %}
16
+ {% endunless %}
17
+ {% endif %}
18
+ {% assign iterator = item %}
19
+ {% endfor %}
20
+
21
+ {% unless previous %}
22
+ {% assign previous = collection | last %}
23
+ {% endunless %}
24
+
25
+ {% unless next %}
26
+ {% assign next = collection | first %}
27
+ {% endunless %}
28
+ {% endif %}
29
+
30
+ {% if previous and next %}
31
+ <nav>
3
32
  <ul>
4
33
  <li data-link-delay="3">
5
- <a href="{{page.nav.previous.url}}">
6
- <span>{{page.nav.previous.title}}</span><br>
7
- {{- page.nav.previous.text -}}
34
+ <a href="{{previous.url}}">
35
+ <span>{{previous.text | default: 'Précédent'}}</span><br>
36
+ {{- previous.title -}}
8
37
  </a>
9
38
  </li>
10
- <li data-link-delay="3">
11
- <a href="{{page.nav.next.url}}">
12
- <span>{{page.nav.next.title}}</span><br>
13
- {{- page.nav.next.text -}}
39
+ <li data-link-delay="3">
40
+ <a href="{{next.url}}">
41
+ <span>{{next.text | default: 'Suivant'}}</span><br>
42
+ {{- next.title -}}
14
43
  </a>
15
44
  </li>
16
45
  </ul>
@@ -18,7 +18,7 @@
18
18
  {% include header.html %}
19
19
  <main aria-label="Content" class="{{ page.class | default: layout.class }}">
20
20
  {{ content }}
21
- {% include navigation-between-pages.html %}
21
+ {% include navigation-between-pages.html auto=true %}
22
22
  </main>
23
23
  {% include footer.html %}
24
24
 
data/_sass/main.sass CHANGED
@@ -17,6 +17,7 @@
17
17
 
18
18
  @import "components/header"
19
19
  @import "components/menu"
20
+ @import "components/nav-between.sass"
20
21
 
21
22
  @import "layouts/legal"
22
23
  @import "layouts/page"
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.0.21
4
+ version: 1.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Moulène