website/frontend/src/Pages/Services/Analysis.elm

142 lines
3.3 KiB
Elm
Raw Normal View History

2024-12-11 02:38:42 -06:00
module Pages.Services.Analysis exposing (Model, Msg, page)
2024-12-27 01:30:21 -06:00
import Config.Helpers.Cards.Outer.Helpers exposing (cardMaker)
import Config.Helpers.Cards.Outer.Types as C exposing (..)
2024-12-12 01:36:31 -06:00
import Config.Helpers.Format exposing (..)
2024-12-18 20:11:04 -06:00
import Config.Helpers.Headers.Types exposing (Header)
2024-12-23 03:15:35 -06:00
import Config.Helpers.Price exposing (buyButton)
2024-12-16 00:12:23 -06:00
import Config.Helpers.Response exposing (pageList, topLevelContainer)
2024-12-18 20:11:04 -06:00
import Config.Helpers.ServiceFormat exposing (..)
2024-12-16 00:12:23 -06:00
import Config.Helpers.ToolTip exposing (..)
2024-12-23 03:15:35 -06:00
import Config.Helpers.Viewport exposing (resetViewport)
2024-12-15 02:31:26 -06:00
import Config.Pages.Services.Records.DebateAnalysis exposing (..)
2024-12-27 01:30:21 -06:00
import Config.Style.Colour.Helpers exposing (colourTheme)
2024-12-12 01:36:31 -06:00
import Config.Style.Transitions
exposing
( hoverFontDarkOrange
, transitionStyleFast
, transitionStyleSlow
)
2024-12-11 02:38:42 -06:00
import Effect exposing (Effect)
2024-12-12 01:36:31 -06:00
import Element as E exposing (..)
import Element.Background as B
import Element.Border as D
import Element.Font as F
2024-12-11 02:38:42 -06:00
import Html
2024-12-12 01:36:31 -06:00
import Html.Attributes as H exposing (style)
import Layouts
2024-12-11 02:38:42 -06:00
import Page exposing (Page)
2024-12-12 01:36:31 -06:00
import Route exposing (Route)
import Route.Path as Path
2024-12-11 02:38:42 -06:00
import Shared
import View exposing (View)
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
Page.new
{ init = init
, update = update
, subscriptions = subscriptions
2024-12-12 01:36:31 -06:00
, view = view shared
2024-12-11 02:38:42 -06:00
}
2024-12-12 01:36:31 -06:00
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
Layouts.Navbar {}
2024-12-11 02:38:42 -06:00
-- INIT
type alias Model =
{}
init : () -> ( Model, Effect Msg )
init () =
( {}
2024-12-22 19:42:23 -06:00
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
2024-12-11 02:38:42 -06:00
)
-- UPDATE
type Msg
= NoOp
update : Msg -> Model -> ( Model, Effect Msg )
update msg model =
case msg of
NoOp ->
( model
, Effect.none
)
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
-- VIEW
2024-12-12 01:36:31 -06:00
view : Shared.Model -> Model -> View Msg
view shared model =
{ title = "services (analysis)"
, attributes = []
, element = analysisContainer shared.device
}
analysisContainer : Device -> Element msg
analysisContainer device =
topLevelContainer (analysisList device)
analysisList : Device -> Element msg
analysisList device =
2024-12-21 23:23:59 -06:00
column
(case ( device.class, device.orientation ) of
_ ->
2024-12-22 19:42:23 -06:00
pageList device
2024-12-21 23:23:59 -06:00
)
<|
2024-12-12 01:36:31 -06:00
List.concat
2024-12-22 04:36:03 -06:00
[ List.map
2024-12-21 23:23:59 -06:00
(\service ->
2024-12-22 04:36:03 -06:00
cardMaker device (C.ServicePage service) contentList
2024-12-21 23:23:59 -06:00
)
2024-12-22 04:36:03 -06:00
[ servicesDebateAnalysis ]
2024-12-21 23:23:59 -06:00
]
contentList : List (Element msg)
contentList =
[ column
bodyFormat
[ chunkMaker servicesDebateAnalysis.serviceArticle.articleParagraph.paragraph1
, chunkMaker
servicesDebateAnalysis.serviceArticle.articleParagraph.paragraph2
, titleMaker servicesDebateAnalysis.serviceArticle.articleTitles.title1
, numberMaker servicesDebateAnalysis.serviceArticle.articleListEntries.list1
, titleMaker servicesDebateAnalysis.serviceArticle.articleTitles.title2
, bulletPointMaker servicesDebateAnalysis.serviceArticle.articleListEntries.list2
2024-12-23 03:15:35 -06:00
, buyButton "Book!" "https://buy.stripe.com/14k3dr4Zh8p6c3mbIJ"
2024-12-12 01:36:31 -06:00
]
]