convert_to_actix #2

Merged
Yehowshua merged 20 commits from convert_to_actix into main 2025-01-06 06:25:19 +00:00
3 changed files with 11 additions and 6 deletions
Showing only changes of commit be408d89cd - Show all commits

View file

@ -18,6 +18,7 @@ Now open `http://127.0.0.1:8080` in your browser.
# TODO
- [x] Add Makefile
- [ ] Clicking in upper left should go to landing page.
- [ ] Add GPLV3 License
- [ ] Add `make release` target that is nix ready...
- [ ] Determine if `src/Body.elm` or pages in `src/Page` should have subscription functions

View file

@ -27,6 +27,11 @@ view model =
{ url = "/" ++ string
, label = Element.text string
}
title = Element.link
[Element.alignLeft]
{ url = "/"
, label = Element.text "Elm Example App"
}
products = headerButton "Products"
resources = headerButton "Resources"
@ -37,7 +42,7 @@ view model =
Element.spacing 15,
Element.paddingXY 30 25,
dropShadow]
[ Element.el [Element.alignLeft] (Element.text "Elm Example App")
[ title
, products
, resources
, about

View file

@ -50,13 +50,12 @@ update msg model =
in
( {model | page = newPage}, cmd |> Cmd.map Body )
UrlChanged url ->
( {model | url = url}, Cmd.none )
UrlRequest (Browser.Internal url) ->
let
-- newModel = Body.handleRoute url.path
newModel = {model | page = Body.handleRoute url.path}
newModel = {model | page = Body.handleRoute url.path, url = url}
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)
subscriptions : Model -> Sub Msg