File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ defmodule AlgoraWeb.Components.TechBadge do
19
19
<% else %>
20
20
<%= if Enum . any? ( langs ( ) , & ( normalize ( & 1 ) == @ tech_lower ) ) do %>
21
21
< . avatar class = "w-4 h-4 mr-1 rounded-sm " >
22
- < . avatar_image src = { "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/#{ @ tech_lower } / #{ @ tech_lower } -original.svg " } />
22
+ < . avatar_image src = { "https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/#{ icon_path ( @ tech_lower ) } " } />
23
23
< . avatar_fallback >
24
24
{ Algora.Util . initials ( @ tech , 1 ) }
25
25
</ . avatar_fallback >
@@ -31,12 +31,17 @@ defmodule AlgoraWeb.Components.TechBadge do
31
31
"""
32
32
end
33
33
34
+ defp icon_path ( "aws" ) , do: "amazonwebservices/amazonwebservices-plain-wordmark.svg"
35
+ defp icon_path ( "gcp" ) , do: "googlecloud/googlecloud-original.svg"
36
+ defp icon_path ( tech ) , do: "#{ tech } /#{ tech } -original.svg"
37
+
34
38
defp normalize ( tech ) do
35
39
tech
36
40
|> String . downcase ( )
37
41
|> String . replace ( "+" , "plus" )
38
42
|> String . replace ( "#" , "sharp" )
39
43
|> String . replace ( "-" , "" )
44
+ |> String . replace ( "." , "" )
40
45
end
41
46
42
47
defp langs do
@@ -80,7 +85,16 @@ defmodule AlgoraWeb.Components.TechBadge do
80
85
"Ansible" ,
81
86
"Linux" ,
82
87
"LLVM" ,
83
- "WASM"
88
+ "WASM" ,
89
+ "Pulumi" ,
90
+ "TensorFlow" ,
91
+ "PyTorch" ,
92
+ "Azure" ,
93
+ "AWS" ,
94
+ "GCP" ,
95
+ "React" ,
96
+ "Svelte" ,
97
+ "Vue.js"
84
98
]
85
99
end
86
100
end
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ defmodule AlgoraWeb.JobsLive do
138
138
</ div >
139
139
< div class = "pt-2 flex flex-wrap gap-2 " >
140
140
<%= for tech <- job . tech_stack do %>
141
- < . badge variant = " outline " > { tech } </ . badge >
141
+ < . tech_badge tech = { tech } / >
142
142
<% end %>
143
143
</ div >
144
144
</ div >
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ defmodule AlgoraWeb.Org.JobLive do
197
197
</ div >
198
198
< div class = "pt-2 flex flex-wrap gap-2 " >
199
199
<%= for tech <- @ job . tech_stack do %>
200
- < . badge variant = " outline " > { tech } </ . badge >
200
+ < . tech_badge tech = { tech } / >
201
201
<% end %>
202
202
</ div >
203
203
</ div >
Original file line number Diff line number Diff line change @@ -54,9 +54,7 @@ defmodule AlgoraWeb.User.ProfileLive do
54
54
55
55
< div class = "flex flex-wrap gap-4 " >
56
56
<%= for tech <- @ user . tech_stack do %>
57
- < . badge >
58
- { tech }
59
- </ . badge >
57
+ < . tech_badge tech = { tech } />
60
58
<% end %>
61
59
</ div >
62
60
</ div >
You can’t perform that action at this time.
0 commit comments