Created
October 30, 2013 09:10
-
-
Save funrep/7229408 to your computer and use it in GitHub Desktop.
Enter this code here: http://elm-lang.org/try
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 Window | |
ith i lst = case lst of | |
x::xs -> if i == 0 then x else ith (i-1) xs | |
images = [ "http://www.xonotic.org/m/uploads/2012/07/frontpage_007.jpg", | |
"http://www.xonotic.org/m/uploads/2012/07/frontpage_021.jpg", | |
"http://www.xonotic.org/m/uploads/2012/07/frontpage_008.jpg", | |
"http://www.xonotic.org/m/uploads/2012/07/frontpage_005.jpg" ] | |
slideShow index = | |
let i = index `mod` length images | |
in color black . container 500 343 middle . image 472 315 <| ith i images | |
tickCount = count (every (3*second)) | |
site (w,h) e = | |
collage w h | |
[ toForm <| image w h "http://stats.xonotic.org/static/css/img/web_background_4.jpg", | |
toForm e ] | |
main = lift2 site Window.dimensions (lift slideShow tickCount) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment