website/frontend/src/Products/Helpers.elm

77 lines
2.4 KiB
Elm
Raw Normal View History

2024-12-01 02:56:13 -06:00
module Products.Helpers exposing (..)
import Config.CardFormat exposing (..)
import Config.Colour exposing (..)
import Config.Format exposing (..)
import Config.StrengthBar exposing (..)
import Config.ToolTip 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 Headers.Types exposing (..)
import Html.Attributes as H exposing (style)
import Interviews.Types exposing (..)
import Layouts
import Page exposing (Page)
import Products.Types exposing (..)
import Route exposing (Route)
import Shared
import View exposing (View)
nutriDexMaker : NutriDex -> Element msg
nutriDexMaker nutridex =
row
topLevelBox
[ column
[ E.width <| px 785
, D.width 5
, D.color colourTheme.backgroundDarkGrey
, D.roundEach
{ topLeft = 32
, topRight = 32
, bottomRight = 32
, bottomLeft = 32
}
]
[ paragraph
(nonHighlightedTitleFormat
++ [ F.size 20
, B.color colourTheme.textDarkOrange
, paddingEach
{ top = 6
, bottom = 3
, left = 25
, right = 15
}
, alignBottom
, width fill
, F.center
, D.roundEach
{ topLeft = 26
, topRight = 26
, bottomRight = 0
, bottomLeft = 0
}
]
)
[ text nutridex.nutriDexTitle ]
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ paragraph
(paragraphFormat
++ [ F.size 18
, F.center
]
)
[ text nutridex.nutriDexTitle ]
]
]
]
]
]