mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
feat: standardized formatting conventions across pages
This commit is contained in:
parent
d5e7cfe814
commit
ead41f0ed0
19 changed files with 503 additions and 446 deletions
38
frontend/src/Config/StrengthBar.elm
Normal file
38
frontend/src/Config/StrengthBar.elm
Normal file
|
@ -0,0 +1,38 @@
|
|||
module Config.StrengthBar exposing (..)
|
||||
|
||||
import Config.Colour exposing (..)
|
||||
import Config.Format exposing (..)
|
||||
import Cuckery.Types exposing (..)
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as B exposing (..)
|
||||
import Element.Border as D
|
||||
import Element.Font as F
|
||||
import Html.Attributes as H exposing (style)
|
||||
import Layouts
|
||||
import Page exposing (Page)
|
||||
import Route exposing (Route)
|
||||
import Shared
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
barMaker : (Int -> String) -> Int -> Element msg
|
||||
barMaker getTooltip num =
|
||||
el
|
||||
([ E.height <| px 12
|
||||
, E.width fill
|
||||
, D.rounded 10
|
||||
, D.color colourTheme.nonHighlightedDarkText
|
||||
, D.width 2
|
||||
, B.gradient
|
||||
{ angle = 90
|
||||
, steps =
|
||||
List.concat
|
||||
[ List.repeat num colourTheme.barGreen
|
||||
, List.repeat (10 - num) colourTheme.barRed
|
||||
]
|
||||
}
|
||||
]
|
||||
++ [ tooltip below (myTooltip (getTooltip num)) ]
|
||||
)
|
||||
none
|
Loading…
Add table
Add a link
Reference in a new issue