Page title
This commit is contained in:
parent
757797b803
commit
d26dacc40f
|
@ -20,14 +20,36 @@ import Twitch
|
|||
|
||||
view : Core.FullModel -> Browser.Document Core.Msg
|
||||
view model =
|
||||
{ title = Consts.url
|
||||
{ title = title model
|
||||
, body =
|
||||
[ Element.layout [ Font.color Colors.blackFont, Font.size Consts.normalFontSize ]
|
||||
[ Element.layout
|
||||
[ Font.color Colors.blackFont
|
||||
, Font.size Consts.normalFontSize
|
||||
, Font.family [ Font.typeface "Cantarell" ]
|
||||
]
|
||||
(viewContent model)
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
title : Core.FullModel -> String
|
||||
title model =
|
||||
case model of
|
||||
Core.Unloaded _ _ ->
|
||||
Consts.url
|
||||
|
||||
Core.Loaded m ->
|
||||
case m.page of
|
||||
Core.Home ->
|
||||
Consts.url
|
||||
|
||||
Core.Playlist p ->
|
||||
Consts.url ++ " - " ++ p.name
|
||||
|
||||
Core.Video p v ->
|
||||
Consts.url ++ " - " ++ p.name ++ " - " ++ v.name
|
||||
|
||||
|
||||
viewContent : Core.FullModel -> Element Core.Msg
|
||||
viewContent model =
|
||||
let
|
||||
|
|
Loading…
Reference in New Issue