Denote foils in set badge

This commit is contained in:
Correl Roush 2022-08-03 00:55:20 -04:00
parent e781bec46a
commit 5590c6ee54

View file

@ -454,19 +454,43 @@ viewCardBrowser model =
, description = cardModel.name
}
badge color text =
badge color foil text =
E.el
[ Border.rounded 5
, Border.color colors.text
, Background.color color
, Border.color color
, Border.width 1
, E.width <| E.px 60
, E.padding 2
, Font.family [ Font.typeface "sans" ]
, Font.size 10
, Font.color colors.title
]
<|
E.text text
E.row [ E.height E.fill, E.width E.fill ]
[ E.el [ E.padding 2, E.width E.fill ] <| E.text text
, E.row [ E.padding 1, E.height E.fill, E.width E.fill, Background.color color ]
[ if foil then
E.el
[ E.width E.fill
, E.height E.fill
, Background.gradient
{ angle = 4.0
, steps =
[ E.rgb 148 0 211
, E.rgb 75 0 130
, E.rgb 0 0 255
, E.rgb 0 255 0
, E.rgb 255 255 0
, E.rgb 255 127 0
, E.rgb 255 0 0
]
}
]
E.none
else
E.none
]
]
setBadge : Card.Card -> E.Element Msg
setBadge card =
@ -485,7 +509,7 @@ viewCardBrowser model =
_ ->
colors.common
in
badge color card.setCode
badge color card.foil card.setCode
priceBadge { currency, amount } =
E.el