1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 18:17:03 +00:00

ui: Refactor page view/framing to handle titles

This commit is contained in:
James Hillyerd
2018-11-18 10:37:57 -08:00
parent 59062e1326
commit eaf41949d4
7 changed files with 112 additions and 120 deletions

View File

@@ -19,12 +19,7 @@ type alias Model =
init : ( Model, Cmd Msg )
init =
( Model ""
, Cmd.batch
[ Ports.windowTitle "Inbucket"
, cmdGreeting
]
)
( Model "", cmdGreeting )
cmdGreeting : Cmd Msg
@@ -57,12 +52,15 @@ update session msg model =
-- VIEW --
view : Session -> Model -> Html Msg
view : Session -> Model -> { title : String, content : Html Msg }
view session model =
div [ id "page" ]
[ Html.node "rendered-html"
[ class "greeting"
, property "content" (Encode.string model.greeting)
{ title = "Inbucket"
, content =
div [ id "page" ]
[ Html.node "rendered-html"
[ class "greeting"
, property "content" (Encode.string model.greeting)
]
[]
]
[]
]
}