elixir-toolkit-theme-plugins 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdbdcaaaa830ab26f33c67e051eb63864358ede91a343d8e237c91bdd516e964
|
4
|
+
data.tar.gz: 764c8e2f62e4f83bde63934831a5a7f9b1f78f3dcb9afe17cc5e474b0960224f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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(
|
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
|
-
|
47
|
-
|
48
|
-
|
47
|
+
if registry["biotools"]
|
48
|
+
tags << create_tag("https://bio.tools/#{registry["biotools"]}", "fa-info", "Tool info")
|
49
|
+
end
|
49
50
|
|
50
|
-
|
51
|
-
|
52
|
-
|
51
|
+
if registry["fairsharing"]
|
52
|
+
tags << create_tag("https://fairsharing.org/FAIRsharing.#{registry["fairsharing"]}", "fa-database", "Standards/Databases")
|
53
|
+
end
|
53
54
|
|
54
|
-
|
55
|
-
|
56
|
-
|
55
|
+
if registry["fairsharing-coll"]
|
56
|
+
tags << create_tag("https://fairsharing.org/#{registry["fairsharing-coll"]}", "fa-database", "Standards/Databases")
|
57
|
+
end
|
57
58
|
|
58
|
-
|
59
|
-
|
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
|
|
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.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bedroesb
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-06-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jekyll
|