<commit_before>module NextTaskPage exposing (view)

import Navigation
import Html.Attributes   as Html
import Material.Button   as Button
import Material.Icon     as Icon
import Material.Layout   as Layout
import Material.Options  as Options
import Taskwarrior.Model as Taskwarrior
import Taskwarrior.Utils as Taskwarrior

import Html  exposing (Html, text)
import Model exposing (Model, Msg(..))

background_url = "https://source.unsplash.com/daily?nature"

view : Model -> Html Msg
view model =
    [ Layout.render Mdl model.mdl
        [ Layout.fixedHeader, Layout.transparentHeader ]
        { header = [header model]
        , drawer = []
        , tabs   = ([],[])
        , main   = view_next model
        }
    ] |> Options.div [Options.cs "daily-photo"]

header : Model -> Html Msg
header model =
    [ Layout.spacer
    , Button.render Mdl [10,0] model.mdl
        [ Button.link "#", Button.icon ]
        [ Icon.i "list" ]
    ]
    |> Layout.row [Options.css "opacity" "0.2"]


view_next : Model -> List (Html Msg)
view_next model =
    case Taskwarrior.next model.tasks of
        Nothing -> [ text "No next task." ]
        Just t  -> [ pretty_task model t |> Options.div [Options.cs "next-task"] ]

pretty_task : Model -> Taskwarrior.Task -> List (Html Msg)
pretty_task model t =
    [ text t.project
    , Html.h2 [] [text t.description]
    , Button.render Mdl [10,1] model.mdl
        [ Button.fab, Button.ripple, Button.colored, Options.onClick (MarkDone t) ] -- TODO handle onClick
        [ Icon.i "done" ]
    ]<commit_msg>make the task list button more visible<commit_after>module NextTaskPage exposing (view)

import Navigation
import Html.Attributes   as Html
import Material.Button   as Button
import Material.Icon     as Icon
import Material.Layout   as Layout
import Material.Options  as Options
import Taskwarrior.Model as Taskwarrior
import Taskwarrior.Utils as Taskwarrior

import Html  exposing (Html, text)
import Model exposing (Model, Msg(..))

background_url = "https://source.unsplash.com/daily?nature"

view : Model -> Html Msg
view model =
    [ Layout.render Mdl model.mdl
        [ Layout.fixedHeader, Layout.transparentHeader ]
        { header = [header model]
        , drawer = []
        , tabs   = ([],[])
        , main   = view_next model
        }
    ] |> Options.div [Options.cs "daily-photo"]

header : Model -> Html Msg
header model =
    [ Layout.spacer
    , Button.render Mdl [10,0] model.mdl
        [ Button.link "#", Button.icon ]
        [ Icon.i "list" ]
    ]
    |> Layout.row [Options.css "opacity" "0.6"]


view_next : Model -> List (Html Msg)
view_next model =
    case Taskwarrior.next model.tasks of
        Nothing -> [ text "No next task." ]
        Just t  -> [ pretty_task model t |> Options.div [Options.cs "next-task"] ]

pretty_task : Model -> Taskwarrior.Task -> List (Html Msg)
pretty_task model t =
    [ text t.project
    , Html.h2 [] [text t.description]
    , Button.render Mdl [10,1] model.mdl
        [ Button.fab, Button.ripple, Button.colored, Options.onClick (MarkDone t) ] -- TODO handle onClick
        [ Icon.i "done" ]
    ]
{'fraction_non_alphanumeric': 0.11677895412255374, 'fraction_numerical': 0.005774783445620789, 'mean_word_length': 2.7163289630512515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1417696', 'n_tokens_mistral': 1005, 'n_tokens_neox': 975, 'n_words': 286}