summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/shared/battle/Battle/View/Attribute.elm')
-rw-r--r-- | src/shared/battle/Battle/View/Attribute.elm | 90 |
1 files changed, 58 insertions, 32 deletions
diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm index 5c53b4c..9b2a8c7 100644 --- a/src/shared/battle/Battle/View/Attribute.elm +++ b/src/shared/battle/Battle/View/Attribute.elm @@ -41,13 +41,6 @@ get_html attribute value = (Struct.HelpRequest.Attribute attribute) ) ), - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Attributes.encode_category attribute) - ) - ), (Html.Attributes.class ( if (value < 0) @@ -60,12 +53,32 @@ get_html attribute value = ) ] [ - (Html.text - ( - if (Battle.Struct.Attributes.is_percent attribute) - then ((String.fromInt value) ++ "%") - else (String.fromInt value) - ) + (Html.div + [ + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.Attributes.encode_category attribute) + ) + ) + ] + [ + ] + ), + (Html.div + [ + (Html.Attributes.class "omnimod-value") + ] + [ + (Html.text + ( + if (Battle.Struct.Attributes.is_percent attribute) + then ((String.fromInt value) ++ "%") + else (String.fromInt value) + ) + ) + ] ) ] ) @@ -83,13 +96,6 @@ get_signed_html attribute value = then (Html.Attributes.class "omnimod-negative") else (Html.Attributes.class "omnimod-positive") ), - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Attributes.encode_category attribute) - ) - ), (Html.Events.onClick (Struct.Event.RequestedHelp (Struct.HelpRequest.Attribute attribute) @@ -97,20 +103,40 @@ get_signed_html attribute value = ) ] [ - (Html.text - ( - ( - if (value > 0) - then ("+" ++ (String.fromInt value)) - else (String.fromInt value) + (Html.div + [ + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.Attributes.encode_category attribute) + ) ) - ++ - ( - if (Battle.Struct.Attributes.is_percent attribute) - then "%" - else "" + ] + [ + ] + ), + (Html.div + [ + (Html.Attributes.class "omnimod-value") + ] + [ + (Html.text + ( + ( + if (value > 0) + then ("+" ++ (String.fromInt value)) + else (String.fromInt value) + ) + ++ + ( + if (Battle.Struct.Attributes.is_percent attribute) + then "%" + else "" + ) + ) ) - ) + ] ) ] ) |