diff options
author | Jasper Van der Jeugt | 2020-07-29 16:33:53 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-07-29 16:33:53 +0200 |
commit | d6265dd7f44538858989c1fe6837e1cafc489455 (patch) | |
tree | e2f909606b57a8e2e745fcae6453bf99928762a9 /client | |
parent | 780527946548c68bfcfc4d8a99abf06b66cf23c1 (diff) |
Further client stub
Diffstat (limited to '')
-rw-r--r-- | client/index.html | 5 | ||||
-rw-r--r-- | client/src/Client.elm | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/client/index.html b/client/index.html index 8ac103a..3803738 100644 --- a/client/index.html +++ b/client/index.html @@ -5,5 +5,10 @@ <title>Client</title> </head> <body> + <div id="main"></div> + <script type="text/JavaScript" src="/assets/client.js"></script> + <script> + var app = Elm.Client.init({node: document.querySelector("main")}); + </script> </body> </html> diff --git a/client/src/Client.elm b/client/src/Client.elm index 1db70c7..77168c1 100644 --- a/client/src/Client.elm +++ b/client/src/Client.elm @@ -3,11 +3,19 @@ module Client exposing (main) import Browser import Html -main : Program () () msg -main = Browser.element - { init = \() -> ((), Cmd.none) +type Message + = Ignore + +main : Program () () Message +main = Browser.application + { init = \() url key -> ((), Cmd.none) , update = \_ model -> (model, Cmd.none) , subscriptions = \_ -> Sub.none - , view = \model -> Html.h1 [] [Html.text "Hi"] + , view = \model -> + { title = "Client" + , body = [Html.h1 [] [Html.text "Hi"]] + } + , onUrlChange = \url -> Ignore + , onUrlRequest = \urlRequest -> Ignore } |