added some basic examples
This commit is contained in:
parent
6c739bc98d
commit
2326eae883
6 changed files with 37 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
elm-stuff
|
||||
elm.js
|
||||
.cabal-sandbox
|
||||
cabal.sandbox.config
|
||||
|
|
9
display/Cropped.elm
Normal file
9
display/Cropped.elm
Normal file
|
@ -0,0 +1,9 @@
|
|||
import Graphics.Element (..)
|
||||
|
||||
main : Element
|
||||
main = let w = 800
|
||||
h = 420
|
||||
url = "http://placekitten.com/" ++ toString w ++ "/" ++ toString h
|
||||
imgw = w // 2
|
||||
imgh = h // 2
|
||||
in croppedImage (30,0) imgw imgh url
|
5
display/HelloWorld.elm
Normal file
5
display/HelloWorld.elm
Normal file
|
@ -0,0 +1,5 @@
|
|||
import Graphics.Element (..)
|
||||
import Text (..)
|
||||
|
||||
main : Element
|
||||
main = plainText "Hello, World!"
|
6
display/Image.elm
Normal file
6
display/Image.elm
Normal file
|
@ -0,0 +1,6 @@
|
|||
import Graphics.Element (..)
|
||||
|
||||
main : Element
|
||||
main = let w = 800
|
||||
h = 420
|
||||
in image w h ("http://placekitten.com/" ++ toString w ++ "/" ++ toString h)
|
13
display/Markdown.elm
Normal file
13
display/Markdown.elm
Normal file
|
@ -0,0 +1,13 @@
|
|||
import Markdown
|
||||
|
||||
main = Markdown.toElement """
|
||||
|
||||
# Welcome to Elm
|
||||
|
||||
This [markdown](http://daringfireball.net/projects/markdown/)
|
||||
parser lives in the [elm-markdown][] package, allowing you to
|
||||
generate `Element` and `Html` blocks.
|
||||
|
||||
[elm-markdown]: http://package.elm-lang.org/packages/evancz/elm-markdown/latest
|
||||
|
||||
"""
|
|
@ -8,6 +8,7 @@
|
|||
],
|
||||
"exposed-modules": [],
|
||||
"dependencies": {
|
||||
"elm-lang/core": "1.0.0 <= v < 2.0.0"
|
||||
"elm-lang/core": "1.0.0 <= v < 2.0.0",
|
||||
"evancz/elm-markdown": "1.1.0 <= v < 2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue