aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-11-26 14:49:45 +0000
committerAkshay <[email protected]>2020-11-26 14:49:45 +0000
commit1e5cf2888be2485d9d56d059ea1c1c2070b44707 (patch)
tree3ee4a2d17074b3cee04bf314bcf9510d60bf55cc
parent24f8767278c7aaefde0dc6f0a4da3cc691431222 (diff)
display active para length
-rw-r--r--src/Main.elm2
-rw-r--r--src/Styles.elm1
-rw-r--r--src/Views.elm18
3 files changed, 15 insertions, 6 deletions
diff --git a/src/Main.elm b/src/Main.elm
index ab10e82..51c3292 100644
--- a/src/Main.elm
+++ b/src/Main.elm
@@ -233,7 +233,7 @@ view model =
233 [ div 233 [ div
234 [ style "width" "100%" 234 [ style "width" "100%"
235 ] 235 ]
236 [ viewWordLengthOptions 236 [ viewWordLengthOptions model.config
237 , div 237 , div
238 [ style "float" "right" ] 238 [ style "float" "right" ]
239 [ styledButton [ onClick Redo ] [ text "redo" ] ] 239 [ styledButton [ onClick Redo ] [ text "redo" ] ]
diff --git a/src/Styles.elm b/src/Styles.elm
index 7b2eea7..20a886a 100644
--- a/src/Styles.elm
+++ b/src/Styles.elm
@@ -35,7 +35,6 @@ styledButton =
35 , paddingBottom (px 12) 35 , paddingBottom (px 12)
36 , paddingLeft (px 0) 36 , paddingLeft (px 0)
37 , paddingRight (px 0) 37 , paddingRight (px 0)
38 , fontFamily monospace
39 , border (px 0) 38 , border (px 0)
40 , backgroundColor (hex "#fff") 39 , backgroundColor (hex "#fff")
41 , borderRadius (px 4) 40 , borderRadius (px 4)
diff --git a/src/Views.elm b/src/Views.elm
index 3a8afed..b74bf98 100644
--- a/src/Views.elm
+++ b/src/Views.elm
@@ -101,8 +101,8 @@ viewAccuracy model =
101 accuracy 101 accuracy
102 102
103 103
104viewWordLengthOptions : Html Msg 104viewWordLengthOptions : Base.Config -> Html Msg
105viewWordLengthOptions = 105viewWordLengthOptions config =
106 let 106 let
107 wl = 107 wl =
108 [ 10, 25, 50, 100 ] 108 [ 10, 25, 50, 100 ]
@@ -117,8 +117,18 @@ viewWordLengthOptions =
117 ] 117 ]
118 (List.map 118 (List.map
119 (\len -> 119 (\len ->
120 li [ css [ display inline ] ] 120 li
121 [ styledButton [ onClick (Base.WordLengthChanged len) ] 121 [ css [ display inline ] ]
122 [ styledButton
123 [ onClick (Base.WordLengthChanged len)
124 , css <|
125 List.singleton <|
126 if config.length == len then
127 textDecoration underline
128
129 else
130 textDecoration Css.none
131 ]
122 [ text <| String.fromInt len ] 132 [ text <| String.fromInt len ]
123 ] 133 ]
124 ) 134 )