Skip to content

Commit

Permalink
Merge pull request #4468 from galaxyproject/burmese-beaver
Browse files Browse the repository at this point in the history
Add tool version to tool buttons
  • Loading branch information
shiltemann authored Nov 1, 2023
2 parents 38bdea6 + 57b2bee commit c2783f2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
20 changes: 16 additions & 4 deletions _plugins/jekyll-tool-tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,23 @@ def render(context)
if m
# check if a variable was provided for the tool id
tool = context[m[2].tr('{}', '')] || m[2]
version = tool.split('/').last

"<span class=\"tool\" data-tool=\"#{tool}\" title=\"#{m[1]} tool\" aria-role=\"link\">" \
"<strong>#{m[1]}</strong> " \
'<i class="fas fa-wrench" aria-hidden="true"></i><i aria-hidden="true" class="fas fa-cog"></i>' \
"<span class=\"visually-hidden\">Tool: #{tool}</span></span>"
if tool.count('/') == 0
"<span class=\"tool\" data-tool=\"#{tool}\" title=\"#{m[1]} tool\" aria-role=\"button\">" \
'<i class="fas fa-wrench" aria-hidden="true"></i> ' \
"<strong>#{m[1]}</strong>" \
'</span>'
else
"<span class=\"tool\" data-tool=\"#{tool}\" title=\"#{m[1]} tool\" aria-role=\"button\">" \
'<i class="fas fa-wrench" aria-hidden="true"></i> ' \
"<strong>#{m[1]}</strong> " \
'(' \
'<i class="fas fa-cubes" aria-hidden="true"></i> ' \
"Galaxy version #{version}" \
')' \
'</span>'
end
else
%(<span><strong>#{@text}</strong> <i class="fas fa-wrench" aria-hidden="true"></i></span>)
end
Expand Down
5 changes: 5 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,11 @@ a[target="_blank"]::after {
height: 1em;
}

/* Not for figures where it's duplicated */
figure > a[target="_blank"]::after {
content: unset;
}

.tutorials-list {
/* Big */
@media (min-width:768px) {
Expand Down

0 comments on commit c2783f2

Please sign in to comment.