Skip to content

Commit 2abd2c2

Browse files
committed
refactor: consolidate tech badges
1 parent 91f7c75 commit 2abd2c2

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

lib/algora_web/live/admin/devs_live.ex

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,11 @@ defmodule AlgoraWeb.Admin.DevsLive do
231231
end}
232232
</span>
233233
<%= if tech = List.first(contributions).repository.tech_stack |> List.first() do %>
234-
<span class="flex items-center text-foreground text-[11px] gap-1">
235-
<img
236-
src={"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/#{String.downcase(tech)}/#{String.downcase(tech)}-original.svg"}
237-
class="w-4 h-4 invert saturate-0"
238-
/> {tech}
239-
</span>
234+
<.tech_badge
235+
variant="ghost"
236+
class="saturate-0 text-[11px] group-hover:saturate-100 transition-all"
237+
tech={tech}
238+
/>
240239
<% end %>
241240
</span>
242241
<div class="flex items-center gap-2 font-semibold">

lib/algora_web/live/org/job_live.ex

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,12 +1064,11 @@ defmodule AlgoraWeb.Org.JobLive do
10641064
end}
10651065
</span>
10661066
<%= if tech = get_matching_tech(List.first(contributions), @tech_stack) do %>
1067-
<span class="flex items-center text-foreground text-[11px] gap-1">
1068-
<img
1069-
src={"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/#{String.downcase(tech)}/#{String.downcase(tech)}-original.svg"}
1070-
class="w-4 h-4 invert saturate-0"
1071-
/> {tech}
1072-
</span>
1067+
<.tech_badge
1068+
variant="ghost"
1069+
class="saturate-0 text-[11px] group-hover:saturate-100 transition-all"
1070+
tech={tech}
1071+
/>
10731072
<% end %>
10741073
</span>
10751074
<div class="flex items-center gap-2 font-semibold">

lib/algora_web/live/user/profile_live.ex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ defmodule AlgoraWeb.User.ProfileLive do
239239
href={"https://github.com/#{owner.provider_login}/#{List.first(contributions).repository.name}/pulls?q=author%3A#{@user.provider_login}+is%3Amerged+"}
240240
target="_blank"
241241
rel="noopener"
242-
class="flex items-center gap-3 rounded-xl pr-2 bg-card/50 border border-border/50 hover:border-border transition-all"
242+
class="flex items-center gap-3 rounded-xl pr-2 bg-card/50 border border-border/50 hover:border-border transition-all group"
243243
>
244244
<img
245245
src={owner.avatar_url}
@@ -256,12 +256,11 @@ defmodule AlgoraWeb.User.ProfileLive do
256256
end}
257257
</span>
258258
<%= if tech = List.first(List.first(contributions).repository.tech_stack) do %>
259-
<span class="flex items-center text-foreground text-[11px] gap-1">
260-
<img
261-
src={"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/#{String.downcase(tech)}/#{String.downcase(tech)}-original.svg"}
262-
class="w-4 h-4 invert saturate-0"
263-
/> {tech}
264-
</span>
259+
<.tech_badge
260+
variant="ghost"
261+
class="saturate-0 text-[11px] group-hover:saturate-100 transition-all"
262+
tech={tech}
263+
/>
265264
<% end %>
266265
</span>
267266
<div class="flex items-center gap-2 font-semibold">

0 commit comments

Comments
 (0)