convert_to_actix #2
|
@ -18,6 +18,7 @@ Now open `http://127.0.0.1:8080` in your browser.
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- [x] Add Makefile
|
- [x] Add Makefile
|
||||||
|
- [ ] Clicking in upper left should go to landing page.
|
||||||
- [ ] Add GPLV3 License
|
- [ ] Add GPLV3 License
|
||||||
- [ ] Add `make release` target that is nix ready...
|
- [ ] Add `make release` target that is nix ready...
|
||||||
- [ ] Determine if `src/Body.elm` or pages in `src/Page` should have subscription functions
|
- [ ] Determine if `src/Body.elm` or pages in `src/Page` should have subscription functions
|
||||||
|
|
|
@ -27,6 +27,11 @@ view model =
|
||||||
{ url = "/" ++ string
|
{ url = "/" ++ string
|
||||||
, label = Element.text string
|
, label = Element.text string
|
||||||
}
|
}
|
||||||
|
title = Element.link
|
||||||
|
[Element.alignLeft]
|
||||||
|
{ url = "/"
|
||||||
|
, label = Element.text "Elm Example App"
|
||||||
|
}
|
||||||
|
|
||||||
products = headerButton "Products"
|
products = headerButton "Products"
|
||||||
resources = headerButton "Resources"
|
resources = headerButton "Resources"
|
||||||
|
@ -37,7 +42,7 @@ view model =
|
||||||
Element.spacing 15,
|
Element.spacing 15,
|
||||||
Element.paddingXY 30 25,
|
Element.paddingXY 30 25,
|
||||||
dropShadow]
|
dropShadow]
|
||||||
[ Element.el [Element.alignLeft] (Element.text "Elm Example App")
|
[ title
|
||||||
, products
|
, products
|
||||||
, resources
|
, resources
|
||||||
, about
|
, about
|
||||||
|
|
|
@ -50,13 +50,12 @@ update msg model =
|
||||||
in
|
in
|
||||||
( {model | page = newPage}, cmd |> Cmd.map Body )
|
( {model | page = newPage}, cmd |> Cmd.map Body )
|
||||||
UrlChanged url ->
|
UrlChanged url ->
|
||||||
( {model | url = url}, Cmd.none )
|
|
||||||
UrlRequest (Browser.Internal url) ->
|
|
||||||
let
|
let
|
||||||
-- newModel = Body.handleRoute url.path
|
newModel = {model | page = Body.handleRoute url.path, url = url}
|
||||||
newModel = {model | page = Body.handleRoute url.path}
|
|
||||||
in
|
in
|
||||||
( newModel, Browser.Navigation.pushUrl model.key (Url.toString url) )
|
( newModel, Cmd.none )
|
||||||
|
UrlRequest (Browser.Internal url) ->
|
||||||
|
( model, Browser.Navigation.pushUrl model.key (Url.toString url) )
|
||||||
_ -> (model, Cmd.none)
|
_ -> (model, Cmd.none)
|
||||||
|
|
||||||
subscriptions : Model -> Sub Msg
|
subscriptions : Model -> Sub Msg
|
||||||
|
|
Loading…
Reference in a new issue