Last active
August 29, 2015 14:11
-
-
Save clarkware/fa82e794e7936e04ec69 to your computer and use it in GitHub Desktop.
Generating basic HTML, Elm style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import List (..) | |
import Graphics.Element (..) | |
import Text (..) | |
import Html (..) | |
import Html.Attributes (..) | |
import Html.Events (..) | |
todos1 = ["A", "B", "C"] | |
todos2 = ["D", "E", "F"] | |
item name = | |
li [ ] [ text name ] | |
list things = | |
ol [ class "todos" ] (map item things) | |
title name = | |
h1 [ ] [ text name ] | |
view = | |
div | |
[ class "container" ] | |
[ title "Todos", list todos1, | |
title "More Todos", list todos2 ] | |
scene = | |
toElement 400 200 view | |
main = scene |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment