diff options
author | Akshay <[email protected]> | 2020-11-22 17:06:42 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2020-11-22 17:06:42 +0000 |
commit | 86bd94ec91e88f3a50a02daf051fcca316db09a5 (patch) | |
tree | 16e8bc17ffaf27b3938991b8a4b825dbfd6ad6c5 /src/Main.elm | |
parent | dea97903678804c9b82039dddf7b3c461dfa514e (diff) |
begin work on layouting and global styling
Diffstat (limited to 'src/Main.elm')
-rw-r--r-- | src/Main.elm | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/Main.elm b/src/Main.elm index 620ef7c..4ca4934 100644 --- a/src/Main.elm +++ b/src/Main.elm | |||
@@ -4,7 +4,7 @@ import Array exposing (..) | |||
4 | import Base exposing (..) | 4 | import Base exposing (..) |
5 | import Browser | 5 | import Browser |
6 | import Css | 6 | import Css |
7 | import Css.Global exposing (global, selector) | 7 | import Css.Global exposing (everything, global, selector) |
8 | import Data exposing (..) | 8 | import Data exposing (..) |
9 | import Html | 9 | import Html |
10 | import Html.Styled exposing (..) | 10 | import Html.Styled exposing (..) |
@@ -217,15 +217,20 @@ currentContents model = | |||
217 | 217 | ||
218 | view : Model -> Html Msg | 218 | view : Model -> Html Msg |
219 | view model = | 219 | view model = |
220 | pre [] | 220 | div [] |
221 | [ p [] [ text ("POS: " ++ viewProgress model) ] | 221 | [ div [] |
222 | , p [] [ text ("WPM: " ++ viewWpm model) ] | 222 | [ viewWordLengthOptions |
223 | , p [] [ text ("ACC: " ++ viewAccuracy model.words) ] | 223 | , viewStats model |
224 | , viewWordLengthOptions | 224 | ] |
225 | , toPara model.words model.currentWord (currentContents model) | 225 | , div [] |
226 | , styledInput [ onInput handleInputChanged, value model.inputBox ] [] | 226 | [ toPara model.words model.currentWord (currentContents model) |
227 | , styledButton [ onClick Redo ] [ text "redo" ] | 227 | , div [] |
228 | [ styledInput [ onInput handleInputChanged, value model.inputBox ] [] | ||
229 | , styledButton [ onClick Redo ] [ text "redo" ] | ||
230 | ] | ||
231 | ] | ||
228 | , global [ selector "li:not(:last-child)::after" [ Css.property "content" "' / '" ] ] | 232 | , global [ selector "li:not(:last-child)::after" [ Css.property "content" "' / '" ] ] |
233 | , global [ everything [ Css.fontFamily Css.monospace ] ] | ||
229 | ] | 234 | ] |
230 | 235 | ||
231 | 236 | ||