diff --git a/src/Views.elm b/src/Views.elm index 99f3c30..ac9d81a 100644 --- a/src/Views.elm +++ b/src/Views.elm @@ -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