mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
feat: refactored services
This commit is contained in:
parent
354b9418f8
commit
36bedf1c09
15 changed files with 449 additions and 80 deletions
45
frontend/src/Services/Helpers.elm
Normal file
45
frontend/src/Services/Helpers.elm
Normal file
|
@ -0,0 +1,45 @@
|
|||
module Services.Helpers exposing (..)
|
||||
|
||||
import Config.Colour exposing (..)
|
||||
import Config.Format exposing (..)
|
||||
import Cuckery.Types exposing (..)
|
||||
import Effect exposing (Effect)
|
||||
import Element 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 Services.Types exposing (..)
|
||||
import Shared
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
servicesImageFormat : List (Attribute msg)
|
||||
servicesImageFormat =
|
||||
[ width <| px 100
|
||||
, alignTop
|
||||
]
|
||||
|
||||
|
||||
serviceMaker : Service -> Element msg
|
||||
serviceMaker service =
|
||||
row [ imageSpacer ]
|
||||
[ image servicesImageFormat
|
||||
{ src = "services/" ++ service.logoImage ++ ".png"
|
||||
, description = service.logoDescription
|
||||
}
|
||||
, column paragraphColumnFormat
|
||||
[ row [ spacing 8 ]
|
||||
[ newTabLink highlightedTitleFormat
|
||||
{ url = service.servicesLink
|
||||
, label =
|
||||
transitionHighlightedLinkHover <|
|
||||
text service.servicesTitle
|
||||
}
|
||||
, paragraph [ F.color colourTheme.nonHighlightedText ] [ text service.servicesRate ]
|
||||
]
|
||||
, paragraph paragraphFormat [ text service.servicesDescription ]
|
||||
]
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue