Skip to content

Commit

Permalink
Merge pull request #5028 from galaxyproject/platypus-achernar
Browse files Browse the repository at this point in the history
Document a couple snippets
  • Loading branch information
hexylena authored Jun 14, 2024
2 parents 13f2db1 + 0f169c0 commit 08003f6
Show file tree
Hide file tree
Showing 33 changed files with 405 additions and 181 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ tool_test_output*
plnmotmp*.json
# Planemo output for workflow autoupdate
tools.yml
api/**
75 changes: 54 additions & 21 deletions _includes/default-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,71 @@
<hr />
<div class="container">
<div class="row">
<div class="col-sm-6" style="text-align: left">
<div class="col-sm-3">
<span style="font-size: 2em">GTN</span>
<p>
The <a href="https://galaxyproject.org/teach/gtn/">Galaxy Training Network</a>
provides researchers with online training materials, connects them with local trainers, and helps promoting FAIR and Open Science practices worldwide. All contributions are subject to the <a rel="code-of-conduct" href="https://galaxyproject.org/community/coc/">Galaxy Project Code of Conduct</a>.
The GTN provides researchers with a free, open repository of online training
materials, with a focus on hands-on training that aims to be directly applicable for learners.
We aim to connect researchers and learners with local trainers, and events worldwide.
</p>
<p>
The GTN infrastructure is licensed under <a rel="license" href="https://github.com/galaxyproject/training-material/blob/main/LICENSE.md">MIT</a>
We promote FAIR and Open Science practices worldwide, are committed to the accessibility of this platform and training for everyone.
</p>

</div>
<div class="col-sm-3">
<p>
Revision <a href="https://github.com/galaxyproject/training-material/commit/{{ site.git_revision }}">{{ site.git_revision_short }}</a>, built with Jekyll ({{ jekyll.version }} | {{ jekyll.environment }})
<span style="font-size: 1.3em">About Us</span>
<ul class="no-bullets">
<li><a href="{% link faqs/gtn/gtn-what-is-it.md %}">About</a></li>
<li><a rel="code-of-conduct" href="https://galaxyproject.org/community/coc/">Code of Conduct</a></li>
<li><a href="{% link accessibility.md %}">Accessibility</a></li>
<li><a href="{% link faqs/gtn/fair_training.md %}">100% FAIR Training</a></li>
<li><a href="{% link faqs/gtn/collaborative_development.md %}">Collaborative Development</a></li>
</ul>
</p>
</div>
<div class="col-sm-6" style="text-align: right">
{% if page.short_id %}
<p>
Resource {% icon purl %}<abbr title="Persistent URL">PURL</abbr>: <a href="https://gxy.io/GTN:{{ page.short_id }}">https://gxy.io/GTN:{{ page.short_id }}</a>
<span style="font-size: 1.3em">Contact</span>
<ul class="no-bullets">
<li><span style="fill: var(--hyperlink);">{{ "assets/images/mastodon.svg" | load_svg }}</span> <a rel="me" href="https://mstdn.science/@gtn">Mastodon</a></li>
<li><span style="fill: var(--hyperlink);">{{ "assets/images/bluesky-logo.svg" | load_svg }}</span><a rel="me" href="https://bsky.app/profile/galaxytraining.bsky.social">Bluesky</a></li>
<li><a rel="me" href="https://matrix.to/#/%23Galaxy-Training-Network_Lobby%3Agitter.im">Matrix Channel</a></li>
</ul>
</p>
{% endif %}
</div>
<div class="col-sm-3">
<p>
<i>This Material</i>:
{% if page.copyright %}
is {{ page.copyright }}.
{% endif %}
is licensed under
<a rel="license" href="https://spdx.org/licenses/{% if page.license %}{{ page.license }}{% else %}CC-BY-4.0{% endif %}">
{% if page.license %}{{ page.license }}{% else %}Creative Commons Attribution 4.0 International License{% endif %}
</a>
<span style="font-size: 1.3em">Framework</span>
<ul class="no-bullets">
<li>Revision <a href="https://github.com/galaxyproject/training-material/commit/{{ site.git_revision }}">{{ site.git_revision_short }}</a></li>
<li><a rel="license" href="https://github.com/galaxyproject/training-material/blob/main/LICENSE.md">MIT</a> Licensed</li>
<li><a href="https://jekyllrb.com/">Jekyll({{ jekyll.version }} | {{ jekyll.environment }})</a></li>
</ul>
</p>
</div>
<div class="col-sm-3">
<span style="font-size: 1.3em">Page</span>
<p>
<a href="{{ site.github_repository }}/edit/{{ site.github_repository_branch }}/{{ page.path }}" title="Edit on GitHub">
{% icon github %} Edit on GitHub
</a>
<ul class="no-bullets">
{% if page.short_id %}
<li>{% icon purl %}<abbr title="Persistent URL">PURL</abbr>: <a href="https://gxy.io/GTN:{{ page.short_id }}">gxy.io/GTN:{{ page.short_id }}</a></li>
{% endif %}

{% if page.copyright %}
<li>{{ page.copyright }}</li>
{% endif %}

<li>
<a rel="license" href="https://spdx.org/licenses/{% if page.license %}{{ page.license }}{% else %}CC-BY-4.0{% endif %}">
Content licensed under {% if page.license %}{{ page.license }}{% else %}Creative Commons Attribution 4.0 International License{% endif %}
</a>
</li>
<li>
<a href="{{ site.github_repository }}/edit/{{ site.github_repository_branch }}/{{ page.path }}" title="Edit on GitHub">
{% icon github %} Edit on GitHub
</a>
</li>
</ul>
</p>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions _includes/schema-render.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% if include.key == "=" %}
Any key permitted
{% else %}
<code>{{ include.key }}</code>
(Required) <code>{{ include.key }}</code>
{% endif %}
{% else %}
<button type="button" aria-expanded="true" aria-label="Toggle tip box: {{ include.key }}">
Expand Down Expand Up @@ -41,15 +41,15 @@



{% if include.value.examples or include.value.enum %}
{% if include.value._examples or include.value.enum %}
<p>
<b>Example(s)</b>

{%- if include.value.type == "seq" -%}
<div markdown=1>
```yaml
{{include.key}}:
{%- for ex in include.value.examples %}
{%- for ex in include.value._examples %}
- {{ ex | replace_newline_doublespace }}
{%- endfor %}
{%- for ex in include.value.enum %}
Expand All @@ -60,11 +60,11 @@
{%- elsif include.value.type == "map" -%}
<div markdown=1>
```yaml
{{ include.value.examples }}
{{ include.value._examples }}
```
</div>
{%- else -%}
{% for ex in include.value.examples %}
{% for ex in include.value._examples %}
<div markdown=1>
```yaml
{{ include.key }}: {{ ex }}
Expand Down
75 changes: 65 additions & 10 deletions _layouts/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,22 @@ <h1 itemprop="name">{{page.title}}</h1>

</div>
<div class="col-md-4">
{% if page.short_id %}
<h5>Persistent URL</h5>
Resource {% icon purl %}<abbr title="Persistent URL">PURL</abbr>: <a class="badge badge-info" href="https://gxy.io/GTN:{{ page.short_id }}">https://gxy.io/GTN:{{ page.short_id }}</a>
{% endif %}

<h5>Still have questions?</h5>

{% include _includes/button.html link="https://gitter.im/Galaxy-Training-Network/Lobby" label="Gitter Chat Support" colour="yellow" buttonsize="medium" %}

{% include _includes/button.html link="https://help.galaxyproject.org" label="Galaxy Help Forum" colour="purple" buttonsize="medium" %}


<h5>Want to embed this snippet (FAQ) in your GTN Tutorial?</h5>
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{% raw %}{% snippet {% endraw %}{{ page.path }}{% raw %} %}{% endraw %}
</code></pre></div></div>

{% if page.short_id %}
<h5>Persistent URL</h5>
Resource {% icon purl %}<abbr title="Persistent URL">PURL</abbr>: <a class="badge badge-info" href="https://gxy.io/GTN:{{ page.short_id }}">https://gxy.io/GTN:{{ page.short_id }}</a>
{% endif %}


<!-- Button trigger modal -->
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#gtnInfoModal">
Information for GTN Tutorial Authors
</button>

</div>
</div>
Expand All @@ -85,3 +84,59 @@ <h2 id="bibliography">{{locale['references']| default: "References" }}</h2>

</section>
</div>



<!-- Modal -->
<div class="modal" id="gtnInfoModal" tabindex="-1" role="dialog" aria-labelledby="gtnInfoModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="gtnInfoModalLabel">Details For GTN Tutorial Authors</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">

<h5>Want to embed this snippet (FAQ) in your GTN Tutorial?</h5>
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{% raw %}{% snippet {% endraw %}{{ page.path }}{% raw %} %}{% endraw %}
</code></pre></div></div>

{% if page.required_parameters %}
<h5>Mandatory Parameters</h5>
<ul>
{% for parameter in page.required_parameters %}
<li><code>{{ parameter[0] }}</code>: {{ parameter[1] }}</li>
{% endfor %}
</ul>
{% endif %}

{% if page.optional_parameters %}
<h5>Optional Parameters</h5>
<ul>
{% for parameter in page.optional_parameters %}
<li><code>{{ parameter[0] }}</code>: {{ parameter[1] }}</li>
{% endfor %}
</ul>
{% endif %}

{% if page.examples %}
<h5>Examples</h5>
{% for case in page.examples %}
{{ case[0] }}:
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{% raw %}{% snippet {% endraw %}{{ page.path }} {% for pair in case[1] %}{{ pair[0] }}="{{ pair[1] }}" {% endfor %} {% raw %}%}{% endraw %}
</code></pre></div></div>
{% endfor %}
{% endif %}

<h5>See other uses</h5>
<a href="https://github.com/search?q=repo%3Agalaxyproject%2Ftraining-material+{{ page.path }}&type=code">Search on GitHub (must be logged in)</a>

</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _plugins/snippet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def render(context)
box_end = "\n{: .#{box_type}}"
end
end
y = x.gsub(/\A---(.|\n)*?---/, '')
y = x.split("\n---\n", 2).last
# if y =~ /contribute/
# puts "=== step 1 ===\n#{y}\n\n"
# end
Expand Down
2 changes: 2 additions & 0 deletions accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ title: GTN Accessibility

The Galaxy Training Network is committed to making its content accessible to all learners, including those with disabilities. While we are a volunteer organisation, we are constantly working to ensure that our training materials are accessible to everyone, regardless of their abilities or background. We use a variety of accessibility features and tools, including alt text, closed captioning, and automated testing, to make our content accessible to all learners.

We aim for WCAG 2.0 AA compliance (AAA where possible), under the default theme and styling of the GTN. We are investigating our Section 508 compliance.

### Accessibility Features

#### Visual
Expand Down
25 changes: 21 additions & 4 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ div.language-diff .p {

body > footer {
margin-top: 5em;
text-align: center;
}

footer {
Expand Down Expand Up @@ -486,7 +485,7 @@ nav.navbar {
}

a.navbar-brand {
padding-right: 0.5em; // the image seems to work poorly with parent size calculations.
padding-right: 2.5em; // the image seems to work poorly with parent size calculations.
}

// Text decoration not necessary for accessibility here.
Expand Down Expand Up @@ -1655,9 +1654,13 @@ $btn-pink: var(--keypoints-color);
padding: 0rem;
}

ul.no-bullets {
list-style: none;
padding-inline-start: 0;
}
ul.text-list, ol.text-list {
list-style: none;
padding-inline-start: 0;
list-style: none;
padding-inline-start: 0;

li {
display: inline;
Expand Down Expand Up @@ -1880,6 +1883,20 @@ body[data-brightness="dark"] {
img.invert-safe {
filter: invert(1);
}

.modal-content {
button.close {
filter: invert(1);
}
}
}

.modal-dialog {
border: 1px solid var(--border);

.modal-content {
background: var(--color-background);
}
}


Expand Down
2 changes: 1 addition & 1 deletion assets/css/themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ body[data-theme="straya"] {
--h1-theme-after: " 🦈 ";
--h2-theme-before: " 🐨 ";
--h2-theme-after: " 🐨 ";
--brand-color: #0d47a1;
--brand-color: #00843d;

hr {
height: 0.5em;
Expand Down
2 changes: 1 addition & 1 deletion bin/gtn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def automagic_loading(f)
# Remove our documentation
f.reject! { |k, v| k == 'description' and v.is_a?(String) }
f.reject! { |k| k == 'examples' }
f.reject! { |k| k == '_examples' }

# Auto-replace CONTRIBUTORS in enums.
f.each do |k, v|
Expand Down
Loading

0 comments on commit 08003f6

Please sign in to comment.