mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
feat: refactored a shit ton of stuff
This commit is contained in:
parent
68be562bd3
commit
fbdfde8680
232 changed files with 2614 additions and 2532 deletions
37
frontend/src/Config/Helpers/StrengthBar.elm
Executable file
37
frontend/src/Config/Helpers/StrengthBar.elm
Executable file
|
@ -0,0 +1,37 @@
|
|||
module Config.Helpers.StrengthBar exposing (..)
|
||||
|
||||
import Config.Helpers.ToolTip exposing (..)
|
||||
import Config.Style.Colour exposing (..)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as B
|
||||
import Element.Border as D
|
||||
|
||||
|
||||
barMaker : (Int -> String) -> Int -> Element msg
|
||||
barMaker getTooltip num =
|
||||
el
|
||||
([ E.height <| px 12
|
||||
, E.width fill
|
||||
, D.rounded 10
|
||||
, D.color colourTheme.textDarkGrey
|
||||
, D.width 2
|
||||
, B.gradient
|
||||
{ angle = 1.57
|
||||
, steps =
|
||||
List.concat
|
||||
[ List.repeat num colourTheme.barGreen
|
||||
, List.repeat (10 - num) colourTheme.barRed
|
||||
]
|
||||
}
|
||||
]
|
||||
++ [ tooltip (getTooltip num) ]
|
||||
)
|
||||
none
|
||||
|
||||
|
||||
barPadding : List (Element msg) -> Element msg
|
||||
barPadding =
|
||||
column
|
||||
[ E.width fill
|
||||
, E.alignLeft
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue