Page title

This commit is contained in:
Thomas Forgione 2020-10-04 18:10:26 +02:00
parent 757797b803
commit d26dacc40f
1 changed files with 24 additions and 2 deletions

View File

@ -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