website/frontend/src/Pages/Contact.elm

130 lines
2.7 KiB
Elm
Raw Normal View History

2024-11-28 19:49:28 -06:00
module Pages.Contact exposing (Model, Msg, page)
import Config.Colour as T exposing (..)
import Config.Format as O exposing (..)
import Config.Identity as I exposing (..)
import Config.Response exposing (..)
2024-12-03 04:59:27 -06:00
import Config.Viewport exposing (..)
import Contact.Helpers exposing (..)
import Contact.Methods.Discord exposing (contactDiscord)
import Contact.Methods.Email exposing (contactEmail)
2024-11-28 19:49:28 -06:00
import Effect exposing (Effect)
import Element exposing (..)
import Element.Font as F
2024-12-03 04:59:27 -06:00
import Headers.Helpers exposing (..)
import Headers.Pages.Contact exposing (contactHeader)
2024-11-28 19:49:28 -06:00
import Html
import Html.Attributes as H exposing (style)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Shared exposing (..)
import View exposing (View)
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
Page.new
{ init = init
, update = update
, subscriptions = subscriptions
, view = view shared
2024-11-28 19:49:28 -06:00
}
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
2024-12-06 22:03:24 -06:00
Layouts.Navbar { }
2024-11-28 19:49:28 -06:00
-- INIT
type alias Model =
{}
init : () -> ( Model, Effect Msg )
init () =
( {}
2024-12-03 04:59:27 -06:00
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
2024-11-28 19:49:28 -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
view : Shared.Model -> Model -> View Msg
view shared model =
2024-11-28 19:49:28 -06:00
{ title = contactName
, attributes = []
, element = contactContainer shared.device
2024-11-28 19:49:28 -06:00
}
contactContainer : Device -> Element msg
contactContainer device =
topLevelContainer (contactList device)
2024-11-28 19:49:28 -06:00
contactList : Device -> Element msg
contactList device =
column pageListDesktop <|
2024-12-03 04:59:27 -06:00
List.concat
(case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
2024-12-06 22:03:24 -06:00
[ [ instructionMaker ] ]
( Phone, Landscape ) ->
2024-12-06 22:03:24 -06:00
[ [ instructionMaker ] ]
( Tablet, Portrait ) ->
2024-12-06 22:03:24 -06:00
[ [ instructionMaker ] ]
( Tablet, Landscape ) ->
2024-12-06 22:03:24 -06:00
[ [ instructionMaker ] ]
( Desktop, Portrait ) ->
2024-12-06 22:03:24 -06:00
[ [ instructionMaker ] ]
( Desktop, Landscape ) ->
2024-12-06 22:03:24 -06:00
[ [ instructionMaker ] ]
( BigDesktop, Portrait ) ->
2024-12-06 22:03:24 -06:00
[ [ instructionMaker ] ]
( BigDesktop, Landscape ) ->
[ [ instructionMaker ] ]
)