Skip to content

Instantly share code, notes, and snippets.

@clarkware
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clarkware/fa82e794e7936e04ec69 to your computer and use it in GitHub Desktop.
Save clarkware/fa82e794e7936e04ec69 to your computer and use it in GitHub Desktop.
Generating basic HTML, Elm style
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