Skip to content

Commit 1ef68e5

Browse files
committed
Add shared resource table category template
1 parent 08c7690 commit 1ef68e5

7 files changed

Lines changed: 62 additions & 6 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{%- if include.tag %}
2+
{%- assign tools = site.data.tool_and_resource_list | add_related_pages | where:"related_pages", include.tag | sort_natural: "name" %}
3+
{%- else %}
4+
{%- assign tools = site.data.tool_and_resource_list | add_related_pages | sort_natural: "name" %}
5+
{%- endif %}
6+
{%- assign country_pages = site.pages | where_exp: "item", "item.search_exclude != true" | where_exp:"item","item.national_resources != nil" %}
7+
{%- unless tools.size == 0 or tools == nil %}
8+
<a class="visually-hidden-focusable" href='#skip-tool-table'>Skip tool table</a>
9+
<div class="table-responsive mt-4 mb-5">
10+
<table class="tooltable table display">
11+
<thead>
12+
<tr class="text-nowrap">
13+
<th>How-to Guide or resource {%- if include.tag -%}
14+
<a data-bs-toggle="tooltip" data-bs-original-title="This is a curated list which means that not all tools or resources that exist for this topic are listed here. This is mainly because we do not intend to be a registry.">
15+
<i class="fa-solid fa-info-circle"></i>
16+
</a>{%- endif %}
17+
</th>
18+
<th>Description</th>
19+
</tr>
20+
</thead>
21+
<tbody>
22+
{%- for tool in tools %}
23+
{% assign found = false %}
24+
{% for desc in tool.Type %}
25+
{% if desc == include.category %}
26+
{% assign found = true %}
27+
{% endif %}
28+
{% endfor %}
29+
{% if found %}
30+
<tr>
31+
{% if tool.URL %}
32+
<td><a href="{{tool.URL}}">{{tool.Title}}</a></td>
33+
{%- else %}
34+
<td>{{tool.Title}}</td>
35+
{%- endif %}
36+
<td>{{tool.Description}}
37+
{%- if tool.instance_of or tool.how_to_access or instances_tool != 0 and total_county_tools != 0 and include.tag != nil %}
38+
{%- assign linked_tool = site.data.tool_and_resource_list | where:"id", tool.instance_of | first %}
39+
<div class="d-block mt-1">
40+
{%- if linked_tool %}
41+
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="This resource is an instance of {{linked_tool.name}}"><span class="badge text-primary border border-primary">{{linked_tool.name}}</span></span>
42+
{%- endif %}
43+
{%- if tool.how_to_access %}
44+
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="{{tool.how_to_access}}"><span class="badge text-primary border border-primary"> <i class="fa-solid fa-key"></i></span></span>
45+
{%- endif %}
46+
</div>
47+
{%- endif %}
48+
</td>
49+
</tr>
50+
{%- endif %}
51+
{%- endfor %}
52+
</tbody>
53+
</table>
54+
</div>
55+
{%- endunless %}
56+
<div id="skip-tool-table"></div>

pages/resources/external_communities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ datatable: true
55
#type: resources
66
---
77

8-
{% include resource-table-communities.html %}
8+
{% include resource-table-category.html category="Online communities" %}

pages/resources/external_databases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ datatable: true
55
#type: resources
66
---
77

8-
{% include resource-table-dbs.html %}
8+
{% include resource-table-category.html category="Reference databases" %}

pages/resources/external_guides.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ datatable: true
55
#type: resources
66
---
77

8-
{% include resource-table-guides.html %}
8+
{% include resource-table-category.html category="Computational structural bio guides and tutorials" %}

pages/resources/external_servers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ datatable: true
55
#type: resources
66
---
77

8-
{% include resource-table-servers.html %}
8+
{% include resource-table-category.html category="Webservers and computing resources" %}

pages/resources/external_videos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ datatable: true
55
#type: resources
66
---
77

8-
{% include resource-table-videos.html %}
8+
{% include resource-table-category.html category="YouTube talks and tutorials" %}

pages/resources/external_viz.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ datatable: true
55
#type: resources
66
---
77

8-
{% include resource-table-viz.html %}
8+
{% include resource-table-category.html category="Protein viz guides and tutorials" %}

0 commit comments

Comments
 (0)