Merge pull request #9842 from demarches-simplifiees/improve-color-for-new-release-ldu

Améliorer l'affichage des couleurs pour la page nouveautés
This commit is contained in:
Colin Darie 2023-12-13 12:30:48 +00:00 committed by GitHub
commit e17bfcd633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,15 +2,15 @@ module ReleaseNotesHelper
def announce_category_badge(category)
color_class = case category.to_sym
when :administrateur
'fr-background-flat--blue-france fr-text-inverted--blue-france'
'fr-badge--blue-cumulus'
when :instructeur
'fr-background-contrast--yellow-tournesol'
'fr-badge--yellow-tournesol'
when :expert
'fr-background-contrast--purple-glycine'
'fr-badge--purple-glycine'
when :usager
'fr-background-contrast--green-emeraude'
'fr-badge--green-emeraude'
when :api
'fr-background-contrast--blue-ecume'
'fr-badge--pink-macaron'
end
content_tag(:span, ReleaseNote.human_attribute_name("categories.#{category}"), class: "fr-badge #{color_class}")