From 1f7c3f844b3a7273f0e2f211ea00955a1ce2e0e7 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Mon, 16 Mar 2015 22:31:37 +0100 Subject: Moving the add timer button to title bar --- src/View/Timer.elm | 2 +- src/View/View.elm | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/View/Timer.elm b/src/View/Timer.elm index e38b6cb..6925e42 100644 --- a/src/View/Timer.elm +++ b/src/View/Timer.elm @@ -22,7 +22,7 @@ timerView (id, timer) = [ button [ class "name block" ] [ text timer.name ] - , div + , button [ class <| "time block" ] [ text (timeView timer.currentTime) ] , button diff --git a/src/View/View.elm b/src/View/View.elm index 2f12902..f915952 100644 --- a/src/View/View.elm +++ b/src/View/View.elm @@ -23,8 +23,7 @@ view : Model -> Html view model = div [] - [ h1 [] [ text "Timer" ] - , addTimer + [ title , model.timers |> Dict.toList |> List.sortBy (.creationTime << snd) @@ -32,15 +31,17 @@ view model = |> timers ] -addTimer : Html -addTimer = - button - [ class "addTimer" - , onClick (Signal.send updates AddNewTimer) - ] - [ i - [ class "fa fa-fw fa-plus" ] - [] +title : Html +title = + div + [ class "title" ] + [ h1 [] [ text "Timer" ] + , button + [ onClick (Signal.send updates AddNewTimer) ] + [ i + [ class "fa fa-fw fa-plus" ] + [] + ] ] onEnter : Signal.Message -> Attribute -- cgit v1.2.3