elixir-toolkit-theme 3.1.0 → 3.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: 3267c907281c8601c8ef5b4050bc50cd5ed9ec81fdf1597ff1df9324b02c722f
4
- data.tar.gz: 44102163b9642fc43400aeaa54c0e2c54a6ae16adba516b1158fb26b1116a59a
3
+ metadata.gz: 835542e6c518dcc697a20243eb8c8303a8fa1d98b5117ce937bfe958cc51ac0e
4
+ data.tar.gz: 52b5a026310216076d6cf9785ff0b1ca2a4fac57c4237ca872671d129924c776
5
5
  SHA512:
6
- metadata.gz: ad2244937003421f31a83b4a01c9b23a91dc6d22ebaba3b2f8f8788361650a647b829027c6c7308c6aa7ec235ddbe772a5391686a15cdc8508574d7b90ed0506
7
- data.tar.gz: cc977bc1c224160e2cda1d8b3f1d8c002606a86f9c42e76c6d4d8463f0deb0a4b9452d9c605a8031bdec11dafddab638c375b2e6247cf561a3cbe9c0f9673421
6
+ metadata.gz: '094092b18afb88f57338879cf1bd51de9c213bc4510fbecc60da757496d5e819cff6dd78874c5f575f7c7992cfd13c08a34ad345f96736855c17c7872a473572'
7
+ data.tar.gz: 8ed3aecd937f496cf845edea7085541ee5debe33204c1a8acbda42177295131e49e830eb7b0560005ec0ac87d6d7da78d472a863acd80068c6cc96b125744204
@@ -38,15 +38,25 @@
38
38
  {%- endif %}
39
39
  {%- endfor %}
40
40
  {%- endif %}
41
- {%- if page.page_id %}
41
+ {%- if page.page_id and site.theme_variables.headings.resource-table-all-collapse%}
42
42
  {%- assign tools = site.data.tool_and_resource_list | where:"related_pages", page.page_id %}
43
- {%- unless tools.size == 0 or tools == nil %}
44
- {%- if site.theme_variables.headings.resource-table-all-collapse %}
43
+ {%- unless tools.size == 0 %}
45
44
  {%- assign actual_tools = 1 %}
46
- {%- endif %}
45
+ {%- endunless %}
46
+ {%- assign country_pages = site.pages | where_exp: "item", "item.search_exclude != true" | where_exp:"item","item.national_resources != nil" %}
47
+ {%- unless country_pages.size == 0 %}
48
+ {%- assign tool_matches_total = 0 %}
49
+ {%- assign query = "related_pages." | append: page.type %}
50
+ {%- for country_page in country_pages %}
51
+ {%- assign tool_matches = country_page.national_resources | where_exp:"resource","resource.related_pages != nil" | where: query, page.page_id %}
52
+ {%- assign tool_matches_total = tool_matches_total | plus: tool_matches.size %}
53
+ {%- endfor %}
54
+ {%- endunless %}
55
+ {%- unless tool_matches_total == 0 %}
56
+ {%- assign actual_nat_tools = 1 %}
47
57
  {%- endunless %}
48
58
  {%- endif %}
49
- {%- if actual_fairsharing or actual_faircookbook or actual_dsw or actual_rdmkit or actual_dsw or actual_training or actual_tools %}
59
+ {%- if actual_fairsharing or actual_faircookbook or actual_dsw or actual_rdmkit or actual_dsw or actual_training or actual_tools or actual_nat_tools %}
50
60
  <h2 class="mb-4">{{site.theme_variables.headings.more-information-tiles | default: 'More information' }}</h2>
51
61
  {%- endif %}
52
62
 
@@ -18,8 +18,8 @@
18
18
  {%- endif %}
19
19
  {%- endfor %}
20
20
  {%- endunless %}
21
- {%- unless tools.size == 0 and tool_matches_total.size == 0 %}
22
- {%- if include.tag %}
21
+ {%- unless tools.size == 0 and tool_matches_total == 0 %}
22
+ {%- if include.tag and tools.size != 0 %}
23
23
  <a class="visually-hidden-focusable" href='#skip-tool-table'>Skip tool table</a>
24
24
  {%- if site.theme_variables.headings.resource-table-all-collapse %}
25
25
  <a data-bs-toggle="collapse" href="#tools_collapse" role="button" aria-expanded="false" aria-controls="tools_collapse" class="d-flex align-items-baseline pb-3 border-top info-collapse">
@@ -30,6 +30,8 @@
30
30
  </a>
31
31
  <div class="collapse info-card" id="tools_collapse">
32
32
  {%- endif %}
33
+ {%- elsif tools.size == 0 and site.theme_variables.headings.resource-table-all-collapse == false or site.theme_variables.headings.resource-table-all-collapse == nil %}
34
+ <h2 class="h2-like fs-2">{{site.theme_variables.headings.resource-table-all | default: 'Tools and resources on this page' }}</h2>
33
35
  {%- endif %}
34
36
  {%- unless tools.size == 0 %}
35
37
  <div class="table-responsive mt-4">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elixir-toolkit-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bedroesb