Skip to content

Commit

Permalink
Merge pull request #4768 from galaxyproject/squirrel-boga
Browse files Browse the repository at this point in the history
Revert "Swap for semantic a, provide href"
  • Loading branch information
hexylena authored Mar 4, 2024
2 parents d0397c8 + f95f72e commit 603273c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions _plugins/jekyll-tool-tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,21 @@ def render(context)
# check if a variable was provided for the tool id
tool = context[m[2].tr('{}', '')] || m[2]
version = tool.split('/').last
# url encode
q = URI.encode_www_form_component("?tool_id=#{tool}")
tool_redirect = "https://my.galaxy.training/?path=#{q}"

if tool.count('/').zero?
"<a class=\"tool\" data-tool=\"#{tool}\" title=\"#{m[1]} tool\" href=\"#{tool_redirect}\">" \
"<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>" \
'</a>'
'</span>'
else
"<a class=\"tool\" data-tool=\"#{tool}\" title=\"#{m[1]} tool\" href=\"#{tool_redirect}\">" \
"<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}" \
')' \
'</a>'
'</span>'
end
else
%(<span><strong>#{@text}</strong> <i class="fas fa-wrench" aria-hidden="true"></i></span>)
Expand Down

0 comments on commit 603273c

Please sign in to comment.