diff options
| author | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-11-04 18:06:11 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-11-04 18:06:11 +0200 |
| commit | 270123cc18ee8acff4b2819f4a609045bd5194f5 (patch) | |
| tree | 650fb26ac317b2697c1e91ce43682674e0ea874c /src/Header.elm | |
| parent | 69d48eb332ac53104cf57b408059a103151071fb (diff) | |
Add navigation and profile
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" ] ] ] |
