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:
@@ -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)
|
||||
]
|
||||
[]
|
||||
]
|
||||
[]
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user