philomena/lib/philomena_web/templates/profile/_awards.html.slime
2024-05-07 19:33:56 +02:00

13 lines
377 B
Text

.badges
- awards = award_order(@awards)
- {awards, overflow} = Enum.split(awards, 5)
= for award <- awards do
- title = [award_title(award), award.label] |> Enum.join(" - ")
.badge
= badge_image(award.badge, alt: title, title: title, width: "18", height: "18")
= if Enum.any?(overflow) do
span.badge__overflow
| +
= Enum.count(overflow)