diff options
Diffstat (limited to 'src/Header.elm')
| -rw-r--r-- | src/Header.elm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Header.elm b/src/Header.elm index 257b308..36469aa 100644 --- a/src/Header.elm +++ b/src/Header.elm @@ -1,8 +1,8 @@ module Header exposing (..) import Css exposing (..) -import Html.Styled exposing (Html, button, div, text) -import Html.Styled.Attributes exposing (css) +import Html.Styled exposing (..) +import Html.Styled.Attributes exposing (css, href) import Html.Styled.Events exposing (onClick) import Types exposing (Model, Msg(..)) import Utils exposing (templ) @@ -14,6 +14,7 @@ styles = [ displayFlex , flexFlow2 row wrap , justifyContent flexEnd + , alignItems center , width (pct 100) , marginBottom (px 10) ] @@ -22,13 +23,16 @@ styles = [ marginLeft (px 10) , cursor pointer ] + , flexPad = css [ flex (int 1) ] } headerView : Model -> List (Html Msg) headerView model = - [ div [ styles.container ] - [ div [] [ "Logged in as {0}" |> templ [ model.userData.name ] |> text ] + [ header [ styles.container ] + [ a [ href "/" ] [ h1 [] [ text "😎 SOMEBOOK" ] ] + , div [ styles.flexPad ] [] + , div [] [ "Logged in as {0}" |> templ [ model.userData.name ] |> text ] , button [ styles.logoutButton, onClick RequestLogout ] [ text "Logout" ] ] ] |
