2014-09-23 02:38:45 +00:00
|
|
|
-- Welcome to your first Elm program
|
2014-08-24 22:14:23 +00:00
|
|
|
|
2014-09-23 02:38:45 +00:00
|
|
|
-- Read up on syntax at http://elm-lang.org/learn/Syntax.elm
|
2014-08-24 22:14:23 +00:00
|
|
|
|
2014-09-23 02:38:45 +00:00
|
|
|
-- Learn about Elm's functions in the Catalog:
|
|
|
|
-- http://library.elm-lang.org/catalog/elm-lang-Elm/0.13.0/
|
2014-08-25 11:26:07 +00:00
|
|
|
|
2014-08-24 22:14:23 +00:00
|
|
|
helloWorld : Element
|
2014-09-23 02:38:45 +00:00
|
|
|
helloWorld = asText "Hello, World!"
|
2014-08-25 11:26:07 +00:00
|
|
|
|
|
|
|
welcomeGraphics : Element
|
|
|
|
welcomeGraphics =
|
|
|
|
let dimensions = 90
|
|
|
|
imgSize = 30
|
|
|
|
elmLogo = image imgSize imgSize "http://elm-lang.org/logo.png"
|
|
|
|
elmsPerSide = dimensions // imgSize
|
2014-09-23 02:38:45 +00:00
|
|
|
row = flow right (repeat elmsPerSide elmLogo)
|
2014-08-25 11:26:07 +00:00
|
|
|
in
|
|
|
|
flow down (repeat elmsPerSide row)
|
2014-08-24 22:14:23 +00:00
|
|
|
|
2014-09-23 02:38:45 +00:00
|
|
|
|
2014-08-24 22:14:23 +00:00
|
|
|
main : Element
|
2014-08-25 11:26:07 +00:00
|
|
|
main =
|
|
|
|
flow down [
|
|
|
|
helloWorld,
|
2014-09-23 02:38:45 +00:00
|
|
|
welcomeGraphics
|
2014-08-25 11:26:07 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|