Skip to content

Commit 4fa783b

Browse files
committed
feat: add more devicons
1 parent 245ea25 commit 4fa783b

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

lib/algora_web/components/tech_badge.ex

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defmodule AlgoraWeb.Components.TechBadge do
1919
<% else %>
2020
<%= if Enum.any?(langs(), &(normalize(&1) == @tech_lower)) do %>
2121
<.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)}"} />
2323
<.avatar_fallback>
2424
{Algora.Util.initials(@tech, 1)}
2525
</.avatar_fallback>
@@ -31,12 +31,17 @@ defmodule AlgoraWeb.Components.TechBadge do
3131
"""
3232
end
3333

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+
3438
defp normalize(tech) do
3539
tech
3640
|> String.downcase()
3741
|> String.replace("+", "plus")
3842
|> String.replace("#", "sharp")
3943
|> String.replace("-", "")
44+
|> String.replace(".", "")
4045
end
4146

4247
defp langs do
@@ -80,7 +85,16 @@ defmodule AlgoraWeb.Components.TechBadge do
8085
"Ansible",
8186
"Linux",
8287
"LLVM",
83-
"WASM"
88+
"WASM",
89+
"Pulumi",
90+
"TensorFlow",
91+
"PyTorch",
92+
"Azure",
93+
"AWS",
94+
"GCP",
95+
"React",
96+
"Svelte",
97+
"Vue.js"
8498
]
8599
end
86100
end

lib/algora_web/live/jobs_live.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ defmodule AlgoraWeb.JobsLive do
138138
</div>
139139
<div class="pt-2 flex flex-wrap gap-2">
140140
<%= for tech <- job.tech_stack do %>
141-
<.badge variant="outline">{tech}</.badge>
141+
<.tech_badge tech={tech} />
142142
<% end %>
143143
</div>
144144
</div>

lib/algora_web/live/org/job_live.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ defmodule AlgoraWeb.Org.JobLive do
197197
</div>
198198
<div class="pt-2 flex flex-wrap gap-2">
199199
<%= for tech <- @job.tech_stack do %>
200-
<.badge variant="outline">{tech}</.badge>
200+
<.tech_badge tech={tech} />
201201
<% end %>
202202
</div>
203203
</div>

lib/algora_web/live/user/profile_live.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ defmodule AlgoraWeb.User.ProfileLive do
5454
5555
<div class="flex flex-wrap gap-4">
5656
<%= for tech <- @user.tech_stack do %>
57-
<.badge>
58-
{tech}
59-
</.badge>
57+
<.tech_badge tech={tech} />
6058
<% end %>
6159
</div>
6260
</div>

0 commit comments

Comments
 (0)