all repos

onasty @ befc7ab95a77aec49f567bc0b86130c3933775d0

a one-time notes service

onasty/web/src/Pages/NotFound_.elm (view raw)

Olexandr Smirnov Olexandr Smirnov
ss2316544@gmail.com
web: add custom 404 page (#172), 10 months ago
1
module Pages.NotFound_ exposing (Model, Msg, page)
2
3
import Effect
4
import Html as H
5
import Html.Attributes as A
6
import Layouts
7
import Page exposing (Page)
8
import Route exposing (Route)
9
import Shared
10
import View exposing (View)
11
12
13
type alias Model =
14
    {}
15
16
17
type alias Msg =
18
    ()
19
20
21
page : Shared.Model -> Route () -> Page Model Msg
22
page _ _ =
23
    Page.new
24
        { init = \_ -> ( {}, Effect.none )
25
        , update = \_ _ -> ( {}, Effect.none )
26
        , subscriptions = \_ -> Sub.none
27
        , view = view
28
        }
29
        |> Page.withLayout Layouts.Header
30
31
32
view : Model -> View Msg
33
view _ =
34
    { title = "404"
35
    , body = [ H.div [ A.class "py-8 mx-auto w-64" ] [ H.text "Page not found" ] ]
36
    }