mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
chore: moved zookeeper and website to packages
This commit is contained in:
parent
cc288ad959
commit
cf8516c54f
976 changed files with 40485 additions and 0 deletions
77
packages/website/frontend/src/Config/Helpers/Cards/Inner/StrengthBar.elm
Executable file
77
packages/website/frontend/src/Config/Helpers/Cards/Inner/StrengthBar.elm
Executable file
|
|
@ -0,0 +1,77 @@
|
|||
module Config.Helpers.Cards.Inner.StrengthBar exposing
|
||||
( barMaker
|
||||
, barPadding
|
||||
)
|
||||
|
||||
import Config.Helpers.Cards.Inner.ToolTip
|
||||
exposing
|
||||
( ToolTipPosition(..)
|
||||
, tooltip
|
||||
)
|
||||
import Config.Style.Colour.Helpers exposing (colourTheme)
|
||||
import Element as E
|
||||
exposing
|
||||
( Device
|
||||
, DeviceClass(..)
|
||||
, Element
|
||||
, Orientation(..)
|
||||
, alignLeft
|
||||
, column
|
||||
, el
|
||||
, fill
|
||||
, height
|
||||
, none
|
||||
, px
|
||||
, width
|
||||
)
|
||||
import Element.Background as B exposing (gradient)
|
||||
import Element.Border as D
|
||||
exposing
|
||||
( color
|
||||
, rounded
|
||||
, width
|
||||
)
|
||||
import Shared exposing (Model)
|
||||
|
||||
|
||||
barMaker : Shared.Model -> (Int -> String) -> Int -> Element msg
|
||||
barMaker shared getTooltip num =
|
||||
let
|
||||
strengthBarAttr =
|
||||
[ 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
|
||||
]
|
||||
}
|
||||
]
|
||||
in
|
||||
el
|
||||
(strengthBarAttr
|
||||
++ (case ( shared.device.class, shared.device.orientation ) of
|
||||
( Phone, Portrait ) ->
|
||||
[]
|
||||
|
||||
( Tablet, Portrait ) ->
|
||||
[]
|
||||
|
||||
_ ->
|
||||
[ tooltip IsLeft (getTooltip num) ]
|
||||
)
|
||||
)
|
||||
none
|
||||
|
||||
|
||||
barPadding : List (Element msg) -> Element msg
|
||||
barPadding =
|
||||
column
|
||||
[ E.width fill
|
||||
, alignLeft
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue