onasty/web/src/Pages/Home_.elm(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
module Pages.Home_ exposing (Model, Msg, page)
import Effect exposing (Effect)
import Html as H
import Html.Attributes as A
import Html.Events as E
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Shared
import View exposing (View)
page : Shared.Model -> Route () -> Page Model Msg
page shared _ =
Page.new
{ init = init shared
, update = update
, subscriptions = subscriptions
, view = view shared
}
|> Page.withLayout Layouts.Header
-- INIT
type alias Model =
{}
init : Shared.Model -> () -> ( 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 _ =
Sub.none
-- VIEW
view : Shared.Model -> Model -> View Msg
view _ _ =
{ title = "Homepage"
, body =
[ H.div [ A.class "w-full max-w-6xl mx-auto" ]
[ H.p [ E.onClick NoOp ] [ H.text "Hello, world!" ] ]
]
}
|