feat: refactored services

This commit is contained in:
Nick 2024-11-16 17:28:46 -06:00
parent 354b9418f8
commit 36bedf1c09
15 changed files with 449 additions and 80 deletions

View 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 ]
]
]