diff options
Diffstat (limited to 'src/Main.elm')
-rw-r--r-- | src/Main.elm | 68 |
1 files changed, 46 insertions, 22 deletions
diff --git a/src/Main.elm b/src/Main.elm index 20443fd..ab10e82 100644 --- a/src/Main.elm +++ b/src/Main.elm | |||
@@ -1,3 +1,21 @@ | |||
1 | {- | ||
2 | - This file is part of `typers`. | ||
3 | - | ||
4 | - `typers` is free software: you can redistribute it and/or modify | ||
5 | - it under the terms of the GNU Affero Public License as published by | ||
6 | - the Free Software Foundation, either version 3 of the License, or | ||
7 | - (at your option) any later version. | ||
8 | - | ||
9 | - `typers` is distributed in the hope that it will be useful, | ||
10 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | - GNU Affero Public License for more details. | ||
13 | - | ||
14 | - You should have received a copy of the GNU Affero Public License | ||
15 | - along with `typers`. If not, see <https://www.gnu.org/licenses/>. | ||
16 | -} | ||
17 | |||
18 | |||
1 | module Main exposing (..) | 19 | module Main exposing (..) |
2 | 20 | ||
3 | import Array exposing (..) | 21 | import Array exposing (..) |
@@ -206,33 +224,39 @@ currentContents model = | |||
206 | view : Model -> Html Msg | 224 | view : Model -> Html Msg |
207 | view model = | 225 | view model = |
208 | div | 226 | div |
209 | [ style "width" "95%" | 227 | [] |
210 | , style "max-width" "650px" | ||
211 | , style "margin" "auto" | ||
212 | , style "padding-top" "15%" | ||
213 | ] | ||
214 | [ div | 228 | [ div |
215 | [ style "width" "100%" | 229 | [ style "width" "95%" |
230 | , style "max-width" "650px" | ||
231 | , style "margin" "15% auto auto auto" | ||
216 | ] | 232 | ] |
217 | [ viewWordLengthOptions | 233 | [ div |
218 | , div | 234 | [ style "width" "100%" |
219 | [ style "float" "right" ] | 235 | ] |
220 | [ styledButton [ onClick Redo ] [ text "redo" ] ] | 236 | [ viewWordLengthOptions |
221 | ] | 237 | , div |
222 | , div [] | 238 | [ style "float" "right" ] |
223 | [ toPara model.words model.currentWord (currentContents model) | 239 | [ styledButton [ onClick Redo ] [ text "redo" ] ] |
240 | ] | ||
224 | , div [] | 241 | , div [] |
225 | [ text "> " | 242 | [ toPara model.words model.currentWord (currentContents model) |
226 | , styledInput model.inputCorrect [ onInput handleInputChanged, value model.inputBox ] [] | 243 | , div [] |
244 | [ text "> " | ||
245 | , styledInput model.inputCorrect [ onInput handleInputChanged, value model.inputBox ] [] | ||
246 | ] | ||
227 | ] | 247 | ] |
248 | , div [] [ viewStats model ] | ||
249 | , global [ selector "li:not(:last-child)::after" [ Css.property "content" "' · '" ] ] | ||
250 | , global [ selector "*,*:focus,*:hover" [ Css.property "outline" "none" ] ] | ||
251 | , global [ everything [ Css.fontFamily Css.monospace, Css.fontSize (Css.px 18) ] ] | ||
228 | ] | 252 | ] |
229 | , div [] [ viewStats model ] | 253 | , div |
230 | 254 | [ style "position" "absolute" | |
231 | -- , global [ selector "li:not(:last-child)::after" [ Css.property "content" "' · '" ] ] | 255 | , style "bottom" "0" |
232 | , global [ selector "*,*:focus,*:hover" [ Css.property "outline" "none" ] ] | 256 | , style "left" "50%" |
233 | , global [ everything [ Css.fontFamily Css.monospace, Css.fontSize (Css.px 18) ] ] | 257 | , style "transform" "translate(-50%)" |
234 | 258 | ] | |
235 | -- , global [ body [ Css.backgroundColor (Css.hex "#000"), Css.color (Css.hex "#fff") ] ] | 259 | [ viewFooter ] |
236 | ] | 260 | ] |
237 | 261 | ||
238 | 262 | ||