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
ยทยทยท
        
        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
        +    }