elixir-toolkit-theme-plugins 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 297614cfe401bc3f0986b8c9f49cbc4622a75ce79358bdc8a83aa6530462d5f8
4
- data.tar.gz: 02756bf13129b0fcd51c01dfca7541022ab0f7dce6413022a8938d0ca4648a32
3
+ metadata.gz: cdbdcaaaa830ab26f33c67e051eb63864358ede91a343d8e237c91bdd516e964
4
+ data.tar.gz: 764c8e2f62e4f83bde63934831a5a7f9b1f78f3dcb9afe17cc5e474b0960224f
5
5
  SHA512:
6
- metadata.gz: e1ccf16cff3bbeee475cd8e62738275c6e616d07b1b88e8f4888ba98ac6e354f4ec2ff9a3b68ed73d8f24718f758514fd3f01a6dab8574dd30576aa450365346
7
- data.tar.gz: e775606702c59e24359d27f5e737a60221b31e36394bcc374f3dc9e35cbba1b68d57a160455acec7ed48ec615b603a7408e643c65a00d1246772784555bb8e11
6
+ metadata.gz: 7df048eefc8c02f9f3905cea3c2df19f7b68aa8db496a85fe077ad1f990f90fa9d6f570d2074223d6c04dc18d1ee671c78ca41ca160bb04a6121841df0e9d876
7
+ data.tar.gz: 51486d5390e32e23e63f07f37a315f6faf84a351000a1bb0ea7a74a0b2e1f99a710f8fb7076223487513472591ccd28b88e5bed570c40e1cc5fb7d7f49094a74
@@ -17,9 +17,7 @@ module Jekyll
17
17
 
18
18
  def render(context)
19
19
  tool = find_tool(context[@content.strip])
20
- if tool["registry"]
21
- tags = create_tags(tool["registry"])
22
- end
20
+ tags = create_tags(tool)
23
21
  %Q{<a
24
22
  tabindex="0"
25
23
  class="tool"
@@ -27,38 +25,41 @@ module Jekyll
27
25
  data-bs-toggle="popover"
28
26
  data-bs-placement="bottom"
29
27
  data-bs-trigger="focus"
30
- data-bs-content="<h5>#{tool["name"]}</h5><div class='mb-2'>#{tool["description"]}</div><a href='#{tool["url"]} class='mt-2 me-2' 'target='_blank'><span class='badge bg-dark text-white hover-primary'><i class='fa-solid fa-link me-2'></i>Website</span></a>#{tags}"
28
+ data-bs-content="<h5>#{tool["name"]}</h5><div class='mb-2'>#{tool["description"]}</div>#{tags}"
31
29
  data-bs-template="<div class='popover popover-tool' role='tooltip'><div class='popover-arrow'></div><h3 class='popover-header'></h3><div class='popover-body'></div></div>"
32
30
  data-bs-html="true"
33
31
  ><i class="fa-solid fa-wrench me-2"></i>#{ tool["name"] }</a>}
34
32
  end
35
33
 
36
34
  def find_tool(tool_id)
37
- tool = @tools.find { |t| t["id"] == tool_id }
35
+ tool = @tools.find { |t| t["id"] == tool_id.strip }
38
36
  return tool if tool
39
37
 
40
38
  raise Exception.new "Undefined tool ID: #{tool_id}"
41
39
  end
42
40
 
43
- def create_tags(registry)
41
+ def create_tags(tool)
44
42
  tags = ""
43
+ tags << create_tag("#{tool["url"]}", "fa-link", "Website")
44
+ if tool["registry"]
45
+ registry = tool["registry"]
45
46
 
46
- if registry["biotools"]
47
- tags << create_tag("https://bio.tools/#{registry["biotools"]}", "fa-info", "Tool info")
48
- end
47
+ if registry["biotools"]
48
+ tags << create_tag("https://bio.tools/#{registry["biotools"]}", "fa-info", "Tool info")
49
+ end
49
50
 
50
- if registry["fairsharing"]
51
- tags << create_tag("https://fairsharing.org/FAIRsharing.#{registry["fairsharing"]}", "fa-database", "Standards/Databases")
52
- end
51
+ if registry["fairsharing"]
52
+ tags << create_tag("https://fairsharing.org/FAIRsharing.#{registry["fairsharing"]}", "fa-database", "Standards/Databases")
53
+ end
53
54
 
54
- if registry["fairsharing-coll"]
55
- tags << create_tag("https://fairsharing.org/#{registry["fairsharing-coll"]}", "fa-database", "Standards/Databases")
56
- end
55
+ if registry["fairsharing-coll"]
56
+ tags << create_tag("https://fairsharing.org/#{registry["fairsharing-coll"]}", "fa-database", "Standards/Databases")
57
+ end
57
58
 
58
- if registry["tess"]
59
- tags << create_tag("https://tess.elixir-europe.org/search?q=#{registry["tess"]}", "fa-graduation-cap", "Training")
59
+ if registry["tess"]
60
+ tags << create_tag("https://tess.elixir-europe.org/search?q=#{registry["tess"]}", "fa-graduation-cap", "Training")
61
+ end
60
62
  end
61
-
62
63
  tags
63
64
  end
64
65
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Ett
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elixir-toolkit-theme-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - bedroesb