website/frontend/src/Pages/NotFound_.elm

135 lines
2.5 KiB
Elm
Raw Normal View History

2024-12-05 15:44:50 -06:00
module Pages.NotFound_ exposing (Model, Msg, page)
2024-12-15 02:31:26 -06:00
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
2024-12-11 03:48:49 -06:00
import Config.Helpers.Response
2024-12-09 19:53:09 -06:00
exposing
2024-12-09 20:30:04 -06:00
( pageList
2024-12-15 02:31:26 -06:00
, pageListCenter
2024-12-09 19:53:09 -06:00
, topLevelContainer
)
2024-12-05 15:44:50 -06:00
import Effect exposing (Effect)
2024-12-15 02:31:26 -06:00
import Element as E exposing (..)
2024-12-08 02:18:36 -06:00
import Layouts
2024-12-05 15:44:50 -06:00
import Page exposing (Page)
import Route exposing (Route)
import Route.Path
import Shared
import View exposing (View)
2024-12-08 02:18:36 -06:00
2024-12-05 15:44:50 -06:00
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
Page.new
{ init = init
, update = update
, subscriptions = subscriptions
2024-12-15 02:31:26 -06:00
, view = view shared
2024-12-05 15:44:50 -06:00
}
2024-12-08 02:18:36 -06:00
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
Layouts.Navbar {}
2024-12-05 15:44:50 -06:00
-- 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
2024-12-15 02:31:26 -06:00
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
]