Skip to content

Commit

Permalink
Add structural biology collection (#15)
Browse files Browse the repository at this point in the history
* Update table_conversion.py

* Update resource-table-all.html

* update library

* Wording change in jobs for update_library.yml

* change all references to 'tools' to 'resources'

* Remove code related to countries

* Create structural_biology.md

* Delete _data/tool_and_resource_list.yml

* Delete _data/full_resource_list.yml

* Update topnav.yml

* Add structural biology to navigation pane

* update library

* Update main.yml fix syntax

* Update resource-table-all.html

* Update table_conversion.py

* update library

* Update topnav.yml

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
PatCapon39 and actions-user authored Dec 17, 2024
1 parent 6e4003b commit f9ba8d0
Show file tree
Hide file tree
Showing 8 changed files with 341 additions and 384 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:

update_guides:
update_library:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
378 changes: 298 additions & 80 deletions _data/tool_and_resource_list.yml → _data/all_content_list.yml

Large diffs are not rendered by default.

269 changes: 0 additions & 269 deletions _data/full_resource_list.yml

This file was deleted.

2 changes: 2 additions & 0 deletions _data/sidebars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ subitems:
subitems:
- title: Data management
url: /data_management
- title: Structural biology
url: /structural_biology
- title: About
url: /about
- title: Contact us
Expand Down
8 changes: 2 additions & 6 deletions _data/topnav.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
##
## if you want to list an external url, use external_url instead of url. the theme will apply a different link base.
#subitems:
#- title: About
# url: /index

## The learning library does not use topnav.yml. Use /sidebars/main.yml to adjust the navigation buttons
## See https://github.com/AustralianBioCommons/how-to-guide-template/blob/main/_data/topnav.yml and https://australianbiocommons.github.io/how-to-guide-template/ for an example of how the topnav works
38 changes: 18 additions & 20 deletions _includes/resource-table-all.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,46 @@
{%- if include.tag %}
{%- assign tools = site.data.tool_and_resource_list | add_related_pages | where:"related_pages", include.tag | sort_natural: "name" %}
{%- assign resources = site.data.all_content_list | add_collection | where:"collection", include.tag | sort_natural: "name" %}
{%- else %}
{%- assign tools = site.data.tool_and_resource_list | add_related_pages | sort_natural: "name" %}
{%- assign resources = site.data.all_content_list | add_collection | sort_natural: "name" %}
{%- endif %}
{%- assign country_pages = site.pages | where_exp: "item", "item.search_exclude != true" | where_exp:"item","item.national_resources != nil" %}
{%- unless tools.size == 0 or tools == nil %}
<a class="visually-hidden-focusable" href='#skip-tool-table'>Skip tool table</a>
{%- unless resources.size == 0 or resources == nil %}
<a class="visually-hidden-focusable" href='#skip-resource-table'>Skip resource table</a>
<div class="table-responsive mt-4 mb-5">
<table class="tooltable table display">
<table class="resourcetable table display">
<thead>
<tr class="text-nowrap">
<th>Resource</th>
<th>Description</th>
<th>Topic(s)</th>
<th>Format</th>

<th>Provider</th>
</tr>
</thead>
<tbody>
{%- for tool in tools %}
{%- for resource in resources %}
<tr>
{% if tool.url %}
<td><a href="{{tool.url}}">{{tool.name}}</a></td>
{% if resource.url %}
<td><a href="{{resource.url}}">{{resource.name}}</a></td>
{%- else %}
<td>{{tool.name}}</td>
<td>{{resource.name}}</td>
{%- endif %}
<td>{{tool.description}}
{%- if tool.instance_of or tool.how_to_access or instances_tool != 0 and total_county_tools != 0 and include.tag != nil %}
{%- assign linked_tool = site.data.tool_and_resource_list | where:"id", tool.instance_of | first %}
<td>{{resource.description}}
{%- if resource.instance_of or resource.how_to_access or instances_resource != 0 and total_county_resources != 0 and include.tag != nil %}
{%- assign linked_resource = site.data.all_content_list | where:"id", resource.instance_of | first %}
<div class="d-block mt-1">
{%- if tool.how_to_access %}
<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>
{%- if resource.how_to_access %}
<span class="d-inline-block" tabindex="0" data-bs-toggle="resourcetip" title="{{resource.how_to_access}}"><span class="badge text-primary border border-primary"> <i class="fa-solid fa-key"></i></span></span>
{%- endif %}
</div>
{%- endif %}
</td>
<td>{{tool.Topics}}</td>
<td>{{tool.type}}</td>
<td>{{tool.provider}}</td>
<td>{{resource.topics}}</td>
<td>{{resource.type}}</td>
<td>{{resource.provider}}</td>
</tr>
{%- endfor %}
</tbody>
</table>
</div>
{%- endunless %}
<div id="skip-tool-table"></div>
<div id="skip-resource-table"></div>
12 changes: 12 additions & 0 deletions pages/structural_biology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Structural biology
type: Collection
page_id: structural_biology
contributors:
description:
affiliations:
datatable: true
---
The structural biology collection is maintained by the <a href="https://australian-structural-biology-computing.github.io/website/">Australian Structural Biology Community</a> and endorsed by Australian BioCommons.

### Browse the collection
Loading

0 comments on commit f9ba8d0

Please sign in to comment.