<commit_before>module Start where

import Window
import Signal

import Markdown

import Graphics.Element (Element, flow, down, right, spacer)
import Skeleton
import Layout(darkGray1, green1, white1, centerHorizontally, niceButton
  , defaultSpacer)

startButton : Element
startButton = niceButton "Start" "?page=levels"

helpButton : Element
helpButton = niceButton "Help" "?page=help"

introduction : Int -> Element
introduction w = Skeleton.showTextPart w <| Markdown.toElement """

A lot of daily tasks require you to edit text. And no matter if you use a word processor like [LibreOffice Writer](https://www.libreoffice.org/discover/writer) or [Word](http://en.wikipedia.org/wiki/Microsoft_Word), an editor like [Notepad(++)](http://notepad-plus-plus.org), an [IDE](http://en.wikipedia.org/wiki/Integrated_development_environment) like [Eclipse](https://eclipse.org) etc. or just write an email or a post on [facebook](http://www.facebook.com) or [reddit](http://www.reddit.com) in your browser, the most basic default keyboard shortcuts are the same. And knowing them can [save you precious time](http://lifehacker.com/5970089/back-to-the-basics-learn-to-use-keyboard-shortcuts-like-a-ninja).

But real efficiency is not reached by [just memorizing all shortcuts](https://www.shortcutfoo.com). It is also important (and fun!) to be able to effortlessly choose the tactics with the smallest amount of shortcuts to reach the desired goal.

EditGym helps you acquire this set of skills by letting you practice and compete on standardized text snippets.

"""

main : Signal Element
main = Signal.map2 scene Window.width Window.height

scene : Int -> Int -> Element
scene w h =
  flow down [
    introduction w
  , defaultSpacer
  , centerHorizontally w (flow right [ startButton
                                     , spacer 40 1
                                     , helpButton ])
  ]
  |> Skeleton.showPage w h<commit_msg>shorter intro<commit_after>module Start where

import Window
import Signal

import Markdown

import Graphics.Element (Element, flow, down, right, spacer)
import Skeleton
import Layout(darkGray1, green1, white1, centerHorizontally, niceButton
  , defaultSpacer)

startButton : Element
startButton = niceButton "Start" "?page=levels"

helpButton : Element
helpButton = niceButton "Help" "?page=help"

introduction : Int -> Element
introduction w = Skeleton.showTextPart w <| Markdown.toElement """

Sometimes you need to edit or rearrange text quickly. No matter if you use a [word processor](https://www.libreoffice.org/discover/writer) an [editor](http://notepad-plus-plus.org), an [IDE](https://eclipse.org)  or just write an email or a post on [facebook](http://www.facebook.com) or [something](http://www.reddit.com), the basic keyboard shortcuts are mainly the same.
But [just memorizing them](https://www.shortcutfoo.com) alone is not enough to really [save time](http://lifehacker.com/5970089/back-to-the-basics-learn-to-use-keyboard-shortcuts-like-a-ninja).
It is also important (and sometimes even fun) to choose the most efficient tactics effortlessly.

EditGym helps you to acquire this set of skills by letting you practice and compete on standardized text snippets.

"""

main : Signal Element
main = Signal.map2 scene Window.width Window.height

scene : Int -> Int -> Element
scene w h =
  flow down [
    introduction w
  , defaultSpacer
  , centerHorizontally w (flow right [ startButton
                                     , spacer 40 1
                                     , helpButton ])
  ]
  |> Skeleton.showPage w h
{'fraction_non_alphanumeric': 0.0965478529329217, 'fraction_numerical': 0.007858546168958742, 'mean_word_length': 3.7903225806451615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '610097', 'n_tokens_mistral': 1051, 'n_tokens_neox': 989, 'n_words': 360}