all repos

onasty @ d0434ef834793fb7b8afd5e4e55d3fd01b6ffb50

a one-time notes service
1 files changed, 36 insertions(+), 0 deletions(-)
web: add custom 404 page (#172)

Author: Olexandr Smirnov ss2316544@gmail.com
Committed by: GitHub noreply@github.com
Committed at: 2025-07-31 16:35:35 +0300
Parent: a2448ac
A web/src/Pages/NotFound_.elm

@@ -0,0 +1,36 @@

+module Pages.NotFound_ exposing (Model, Msg, page) + +import Effect +import Html as H +import Html.Attributes as A +import Layouts +import Page exposing (Page) +import Route exposing (Route) +import Shared +import View exposing (View) + + +type alias Model = + {} + + +type alias Msg = + () + + +page : Shared.Model -> Route () -> Page Model Msg +page _ _ = + Page.new + { init = \_ -> ( {}, Effect.none ) + , update = \_ _ -> ( {}, Effect.none ) + , subscriptions = \_ -> Sub.none + , view = view + } + |> Page.withLayout Layouts.Header + + +view : Model -> View Msg +view _ = + { title = "404" + , body = [ H.div [ A.class "py-8 mx-auto w-64" ] [ H.text "Page not found" ] ] + }