philomena/lib/philomena_web/templates/profile/_awards.html.slime

14 lines
377 B
Text
Raw Normal View History

2019-11-12 03:53:19 +01:00
.badges
2019-12-30 15:05:17 +01:00
- awards = award_order(@awards)
2024-05-07 19:33:56 +02:00
- {awards, overflow} = Enum.split(awards, 5)
2019-12-30 15:05:17 +01:00
= for award <- awards do
2019-11-12 03:53:19 +01:00
- title = [award_title(award), award.label] |> Enum.join(" - ")
.badge
2019-12-30 15:05:17 +01:00
= badge_image(award.badge, alt: title, title: title, width: "18", height: "18")
= if Enum.any?(overflow) do
2024-05-07 19:33:56 +02:00
span.badge__overflow
| +
= Enum.count(overflow)