Skip to content

Commit 667743a

Browse files
authored
Related pages separate from more information (#15)
* separation of the read next section * rename to related pages * renaming the resources
1 parent ccf6c08 commit 667743a

File tree

4 files changed

+48
-40
lines changed

4 files changed

+48
-40
lines changed

_includes/more-information-tiles.html

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,8 @@
1-
{%- assign actual_related = nil %}
2-
{%- for section in page.related_pages %}
3-
{%- unless section[1].size == 0 %}
4-
{%- assign actual_related = 1 %}
5-
{%- endunless %}
6-
{%- endfor %}
7-
{%- if actual_related != nil or page.faircookbook or page.fairsharing or page.training or page.dsw %}
1+
{%- if page.faircookbook or page.fairsharing or page.training or page.dsw %}
82
<!-- More information -->
93
<h2>More information</h2>
104

115
<div class="row row-cols-1 row-cols-md-2 g-4 mt-2">
12-
{%- if page.related_pages %}
13-
<!-- Related pages -->
14-
{%- for section in page.related_pages %}
15-
{%- unless section[1].size == 0 %}
16-
<div class="col">
17-
<div class="card h-100 info-card">
18-
<div class="card-header fw-bold">Related {{site.title}} pages in "{{ section[0] | replace: "_", " " | capitalize }}"</div>
19-
<div class="card-body">
20-
<ul class="list-unstyled">
21-
{%- for page_id in section[1] %}
22-
{%- assign section_pages = site.pages | where:"type", section[0] %}
23-
{%- assign metadata = section_pages | where:"page_id", page_id %}
24-
{%- for page_hit in metadata %}
25-
<li class="d-grid">
26-
<a class="btn bg-white hover-primary text-start" href="{{ page_hit.url | relative_url }}"><span>{{page_hit.title}}{% if page_hit.description %}</span><br><small class="text-muted">{{ page_hit.description | capitalize }}</small>{% endif %}</a>
27-
</li>
28-
{%- endfor %}
29-
{%- endfor %}
30-
</ul>
31-
</div>
32-
</div>
33-
</div>
34-
{%- endunless %}
35-
{%- endfor %}
36-
{%- endif %}
376
{%- if page.training %}
387
<!-- Training -->
398
<div class="col">

_includes/related-pages.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{%- assign actual_related = nil %}
2+
{%- for section in page.related_pages %}
3+
{%- unless section[1].size == 0 %}
4+
{%- assign actual_related = 1 %}
5+
{%- endunless %}
6+
{%- endfor %}
7+
{%- if actual_related != nil %}
8+
<!-- Read next -->
9+
<h2>Related pages</h2>
10+
11+
<div class="row row-cols-1 row-cols-md-2 g-4 mt-2">
12+
{%- if page.related_pages %}
13+
<!-- Related pages -->
14+
{%- for section in page.related_pages %}
15+
{%- unless section[1].size == 0 %}
16+
<div class="col">
17+
<div class="card h-100 info-card">
18+
<div class="card-header fw-bold">Related {{site.title}} pages in "{{ section[0] | replace: "_", " " | capitalize }}"</div>
19+
<div class="card-body">
20+
<ul class="list-unstyled">
21+
{%- for page_id in section[1] %}
22+
{%- assign section_pages = site.pages | where:"type", section[0] %}
23+
{%- assign metadata = section_pages | where:"page_id", page_id %}
24+
{%- for page_hit in metadata %}
25+
<li class="d-grid">
26+
<a class="btn bg-white hover-primary text-start" href="{{ page_hit.url | relative_url }}"><span>{{page_hit.title}}{% if page_hit.description %}</span><br><small class="text-muted">{{ page_hit.description | capitalize }}</small>{% endif %}</a>
27+
</li>
28+
{%- endfor %}
29+
{%- endfor %}
30+
</ul>
31+
</div>
32+
</div>
33+
</div>
34+
{%- endunless %}
35+
{%- endfor %}
36+
{%- endif %}
37+
</div>
38+
{%- endif %}

_includes/resource-table-all.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,23 @@ <h2>Relevant tools and resources</h2>
6161
<td class="align-middle text-center">
6262
{%- if tool.registry.biotools %}
6363
<a data-bs-toggle="tooltip"
64-
data-bs-original-title="Find a scientific and technical description of the resource" href="https://bio.tools/{{tool.registry.biotools}}"
65-
><span class="badge bg-dark text-white hover-primary">bio.tools</span></a>
64+
data-bs-original-title="Bio.tools" href="https://bio.tools/{{tool.registry.biotools}}"
65+
><span class="badge bg-dark text-white hover-primary">Tool info</span></a>
6666
{%- endif %}
6767
{%- if tool.registry.fairsharing %}
6868
<a data-bs-toggle="tooltip"
69-
data-bs-original-title="Find related policies and standards" href="https://fairsharing.org/FAIRsharing.{{tool.registry.fairsharing}}"
70-
><span class="badge bg-dark text-white hover-primary">FAIRsharing</span></a>
69+
data-bs-original-title="FFAIRsharing" href="https://fairsharing.org/FAIRsharing.{{tool.registry.fairsharing}}"
70+
><span class="badge bg-dark text-white hover-primary">Standards/Databases</span></a>
7171
{%- endif %}
7272
{%- if tool.registry.fairsharing-coll %}
7373
<a data-bs-toggle="tooltip"
74-
data-bs-original-title="Find related policies and standards" href="https://fairsharing.org/{{tool.registry.fairsharing-coll}}"
75-
><span class="badge bg-dark text-white hover-primary">FAIRsharing</span></a>
74+
data-bs-original-title="FAIRsharing collection" href="https://fairsharing.org/{{tool.registry.fairsharing-coll}}"
75+
><span class="badge bg-dark text-white hover-primary">Standards/Databases</span></a>
7676
{%- endif %}
7777
{%- if tool.registry.tess %}
7878
<a data-bs-toggle="tooltip"
79-
data-bs-original-title="Find training for this resource" href="https://tess.elixir-europe.org/search?q={{tool.registry.tess}}"
80-
><span class="badge bg-dark text-white hover-primary">TeSS</span></a>
79+
data-bs-original-title="TeSS" href="https://tess.elixir-europe.org/search?q={{tool.registry.tess}}"
80+
><span class="badge bg-dark text-white hover-primary">Training</span></a>
8181
{%- endif %}
8282
</td>
8383
</tr>

_layouts/page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ <h1>{% unless subtitle == nil or subtitle == blank or subtitle == "" %}<span cla
2323
{%- endunless %}
2424
{{content}}
2525
{% include resource-table-page.html %}
26+
{% include related-pages.html %}
2627
{% include more-information-tiles.html %}
2728
{%- if page.page_id %}
2829
{% include resource-table-all.html tag=page.page_id %}

0 commit comments

Comments
 (0)