website/frontend/src/Pages/NotFound_.elm
2024-12-15 02:31:26 -06:00

134 lines
2.5 KiB
Elm
Executable file

module Pages.NotFound_ exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Response
exposing
( pageList
, pageListCenter
, topLevelContainer
)
import Effect exposing (Effect)
import Element as E exposing (..)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Route.Path
import Shared
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
}
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
Layouts.Navbar {}
-- INIT
type alias Model =
{}
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
)
-- 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 =
{ title = pageNames.pageNotFound
, attributes = []
, element = notFoundContainer shared.device
}
notFoundContainer : Device -> Element msg
notFoundContainer device =
topLevelContainer (notFoundList device)
notFoundList : Device -> Element msg
notFoundList device =
column pageListCenter
[ case device.class of
Desktop ->
none
BigDesktop ->
none
Tablet ->
case device.orientation of
Portrait ->
none
Landscape ->
none
Phone ->
case device.orientation of
Portrait ->
none
Landscape ->
none
]