├── resources ├── robots.txt ├── logo.png ├── favicon.ico ├── imgs │ ├── car.jpg │ ├── elm.jpg │ ├── book.jpg │ ├── embed.png │ ├── infoq.jpg │ ├── paint.jpg │ ├── pipe.jpg │ ├── stack.jpg │ ├── water.gif │ ├── yogi.jpg │ ├── desert.png │ ├── shells.jpg │ ├── stripes.jpg │ ├── texture.png │ ├── turtle.gif │ ├── waiting.gif │ ├── factorial.png │ ├── skull │ │ ├── blue.gif │ │ └── red.gif │ ├── Tango-Palette.png │ ├── coords │ │ ├── flipped.jpg │ │ └── cartesian.jpg │ ├── hero │ │ ├── jump │ │ │ ├── east.gif │ │ │ └── west.gif │ │ ├── stand │ │ │ ├── east.gif │ │ │ ├── west.gif │ │ │ ├── north.gif │ │ │ └── south.gif │ │ └── walk │ │ │ ├── east.gif │ │ │ ├── north.gif │ │ │ ├── south.gif │ │ │ └── west.gif │ ├── mario │ │ ├── jump │ │ │ ├── left.gif │ │ │ └── right.gif │ │ ├── walk │ │ │ ├── left.gif │ │ │ └── right.gif │ │ └── stand │ │ │ ├── left.gif │ │ │ └── right.gif │ ├── right-triangle.jpg │ ├── reactor-post │ │ ├── error.gif │ │ ├── fold.gif │ │ ├── html.gif │ │ ├── swap.gif │ │ ├── elm-d3.png │ │ ├── tetris.gif │ │ ├── elm-html.png │ │ ├── elm-webgl.png │ │ └── timeline-pause.png │ └── texture │ │ ├── woodCrate.jpg │ │ ├── thwomp_blink.jpg │ │ ├── thwomp_face.jpg │ │ └── thwomp_side.jpg ├── texture │ ├── woodCrate.jpg │ ├── thwomp_blink.jpg │ ├── thwomp_face.jpg │ └── thwomp_side.jpg ├── screenshot │ ├── Home │ │ ├── Todo.gif │ │ ├── Todo.png │ │ ├── Catalog.gif │ │ ├── Catalog.png │ │ ├── Elmtris.gif │ │ ├── Elmtris.png │ │ ├── Fractal.gif │ │ ├── Fractal.png │ │ ├── Mario.gif │ │ ├── Mario.png │ │ ├── Touch.png │ │ ├── Vessel.gif │ │ ├── Vessel.png │ │ ├── Debugger.gif │ │ ├── Debugger.png │ │ ├── PieChart.gif │ │ ├── PieChart.png │ │ ├── DreamWriter.gif │ │ ├── DreamWriter.png │ │ ├── FirstPerson.gif │ │ ├── FirstPerson.png │ │ ├── StandardLibraries.jpg │ │ └── CommunityLibraries.jpg │ ├── WebGL │ │ ├── Crate.jpg │ │ ├── Cube.jpg │ │ ├── Thwomp.jpg │ │ ├── Triangle.jpg │ │ └── FirstPerson.jpg │ └── Intermediate │ │ ├── Form.jpg │ │ ├── Plot.jpg │ │ ├── Pong.jpg │ │ ├── Tree.jpg │ │ ├── Walk.jpg │ │ ├── Web.jpg │ │ ├── Clock.jpg │ │ ├── Flickr.jpg │ │ ├── Mario.jpg │ │ ├── Shapes.jpg │ │ ├── Slide.jpg │ │ ├── Stamps.jpg │ │ ├── Tracer.jpg │ │ ├── Turtle.jpg │ │ ├── Centering.jpg │ │ ├── Circles.jpg │ │ ├── Examples.jpg │ │ ├── FlowDown2.jpg │ │ ├── LightBox.jpg │ │ ├── MovingBox.jpg │ │ ├── Physics.jpg │ │ ├── PieChart.jpg │ │ ├── SlideShow.jpg │ │ ├── Calculator.jpg │ │ ├── Complements.jpg │ │ ├── TextReverse.jpg │ │ ├── FibonacciTiles.jpg │ │ ├── LinearGradient.jpg │ │ ├── RadialGradient.jpg │ │ └── PascalsTriangle.jpg ├── diagrams │ └── sampleResults.png ├── papers │ └── concurrent-frp.pdf ├── highlight │ ├── LICENSE │ └── styles │ │ └── default.css └── logo.svg ├── Setup.hs ├── assets ├── codemirror-5.0 │ ├── .travis.yml │ ├── .gitignore │ ├── .gitattributes │ ├── theme │ │ ├── ambiance-mobile.css │ │ ├── neat.css │ │ ├── elegant.css │ │ ├── neo.css │ │ ├── eclipse.css │ │ ├── cobalt.css │ │ ├── monokai.css │ │ ├── rubyblue.css │ │ ├── night.css │ │ ├── the-matrix.css │ │ ├── colorforth.css │ │ ├── blackboard.css │ │ ├── 3024-day.css │ │ ├── tomorrow-night-bright.css │ │ ├── paraiso-dark.css │ │ ├── paraiso-light.css │ │ ├── 3024-night.css │ │ ├── base16-dark.css │ │ ├── base16-light.css │ │ ├── vibrant-ink.css │ │ ├── mbo.css │ │ ├── twilight.css │ │ ├── midnight.css │ │ ├── zenburn.css │ │ ├── erlang-dark.css │ │ ├── tomorrow-night-eighties.css │ │ ├── xq-light.css │ │ ├── pastel-on-dark.css │ │ ├── lesser-dark.css │ │ └── xq-dark.css │ ├── mode │ │ └── elm │ │ │ └── index.html │ └── LICENSE ├── diagrams │ ├── signals.png │ ├── trees.png │ ├── overall-architecture.png │ └── signal-graph-summary.png ├── blog │ └── error-messages │ │ ├── list.png │ │ ├── naming.png │ │ └── missing-field.png ├── logo.svg └── style.css ├── src ├── examples │ ├── hello-html.elm │ ├── hello-element.elm │ ├── arrows.elm │ ├── mouse-position.elm │ ├── wasd.elm │ ├── hello-world.elm │ ├── texture.elm │ ├── collage-text.elm │ ├── collage-element.elm │ ├── mouse-clicks.elm │ ├── layout-fancy.elm │ ├── mouse-is-down.elm │ ├── window-centering.elm │ ├── key-presses.elm │ ├── color.elm │ ├── shapes.elm │ ├── resize-yogi.elm │ ├── keys.elm │ ├── transforms.elm │ ├── linear-gradient.elm │ ├── lines.elm │ ├── resize-paint.elm │ ├── clock.elm │ ├── markdown.elm │ ├── mouse-tracker.elm │ ├── layout-simple.elm │ ├── buttons.elm │ ├── unordered-list.elm │ ├── functions.elm │ ├── stamps.elm │ ├── define-functions.elm │ ├── password.elm │ ├── zip.elm │ ├── field.elm │ ├── radial-gradient.elm │ ├── either.elm │ ├── centering.elm │ ├── quick-sort.elm │ ├── infix.elm │ ├── forward-apply.elm │ ├── radio-buttons.elm │ ├── merge-sort.elm │ ├── length.elm │ ├── triangle.elm │ ├── boolean-expressions.elm │ ├── checkboxes.elm │ ├── zip-codes.elm │ ├── sign-up.elm │ ├── adventure.elm │ ├── mario.elm │ ├── cube.elm │ ├── crate.elm │ ├── binary-tree.elm │ ├── thwomp.elm │ └── flickr.elm ├── guide │ └── chapters │ │ ├── architecture.md │ │ └── introduction.md ├── shared │ ├── Center.elm │ ├── ColorScheme.elm │ ├── Message.elm │ ├── TopBar.elm │ └── Blog.elm ├── pages │ ├── 404.elm │ ├── try-message.elm │ ├── install.elm │ ├── blog │ │ └── announce │ │ │ └── elm-and-prezi.elm │ ├── docs │ │ ├── from-javascript.elm │ │ └── style-guide.elm │ └── community.elm ├── backend │ ├── Main.hs │ ├── Init │ │ ├── Pages.hs │ │ ├── Helpers.hs │ │ ├── FileTree.hs │ │ └── Guide.hs │ └── Generate.hs └── editor │ └── editor.css ├── .gitignore ├── elm-package.json ├── elm-website.cabal ├── README.md └── LICENSE /resources/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /assets/codemirror-5.0/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 4 | -------------------------------------------------------------------------------- /src/examples/hello-html.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (text) 2 | 3 | main = 4 | text "Hello, World!" -------------------------------------------------------------------------------- /resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/logo.png -------------------------------------------------------------------------------- /resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/favicon.ico -------------------------------------------------------------------------------- /resources/imgs/car.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/car.jpg -------------------------------------------------------------------------------- /resources/imgs/elm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/elm.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | elm-stuff 2 | artifacts 3 | dist 4 | resources/docs.json 5 | log 6 | gen 7 | cabal.sandbox.config 8 | -------------------------------------------------------------------------------- /resources/imgs/book.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/book.jpg -------------------------------------------------------------------------------- /resources/imgs/embed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/embed.png -------------------------------------------------------------------------------- /resources/imgs/infoq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/infoq.jpg -------------------------------------------------------------------------------- /resources/imgs/paint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/paint.jpg -------------------------------------------------------------------------------- /resources/imgs/pipe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/pipe.jpg -------------------------------------------------------------------------------- /resources/imgs/stack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/stack.jpg -------------------------------------------------------------------------------- /resources/imgs/water.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/water.gif -------------------------------------------------------------------------------- /resources/imgs/yogi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/yogi.jpg -------------------------------------------------------------------------------- /assets/diagrams/signals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/assets/diagrams/signals.png -------------------------------------------------------------------------------- /assets/diagrams/trees.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/assets/diagrams/trees.png -------------------------------------------------------------------------------- /resources/imgs/desert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/desert.png -------------------------------------------------------------------------------- /resources/imgs/shells.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/shells.jpg -------------------------------------------------------------------------------- /resources/imgs/stripes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/stripes.jpg -------------------------------------------------------------------------------- /resources/imgs/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/texture.png -------------------------------------------------------------------------------- /resources/imgs/turtle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/turtle.gif -------------------------------------------------------------------------------- /resources/imgs/waiting.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/waiting.gif -------------------------------------------------------------------------------- /resources/imgs/factorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/factorial.png -------------------------------------------------------------------------------- /resources/imgs/skull/blue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/skull/blue.gif -------------------------------------------------------------------------------- /resources/imgs/skull/red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/skull/red.gif -------------------------------------------------------------------------------- /resources/imgs/Tango-Palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/Tango-Palette.png -------------------------------------------------------------------------------- /resources/texture/woodCrate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/texture/woodCrate.jpg -------------------------------------------------------------------------------- /resources/imgs/coords/flipped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/coords/flipped.jpg -------------------------------------------------------------------------------- /resources/imgs/hero/jump/east.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/jump/east.gif -------------------------------------------------------------------------------- /resources/imgs/hero/jump/west.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/jump/west.gif -------------------------------------------------------------------------------- /resources/imgs/hero/stand/east.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/stand/east.gif -------------------------------------------------------------------------------- /resources/imgs/hero/stand/west.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/stand/west.gif -------------------------------------------------------------------------------- /resources/imgs/hero/walk/east.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/walk/east.gif -------------------------------------------------------------------------------- /resources/imgs/hero/walk/north.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/walk/north.gif -------------------------------------------------------------------------------- /resources/imgs/hero/walk/south.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/walk/south.gif -------------------------------------------------------------------------------- /resources/imgs/hero/walk/west.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/walk/west.gif -------------------------------------------------------------------------------- /resources/imgs/mario/jump/left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/mario/jump/left.gif -------------------------------------------------------------------------------- /resources/imgs/mario/walk/left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/mario/walk/left.gif -------------------------------------------------------------------------------- /resources/imgs/right-triangle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/right-triangle.jpg -------------------------------------------------------------------------------- /resources/screenshot/Home/Todo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Todo.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/Todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Todo.png -------------------------------------------------------------------------------- /resources/texture/thwomp_blink.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/texture/thwomp_blink.jpg -------------------------------------------------------------------------------- /resources/texture/thwomp_face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/texture/thwomp_face.jpg -------------------------------------------------------------------------------- /resources/texture/thwomp_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/texture/thwomp_side.jpg -------------------------------------------------------------------------------- /assets/blog/error-messages/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/assets/blog/error-messages/list.png -------------------------------------------------------------------------------- /assets/blog/error-messages/naming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/assets/blog/error-messages/naming.png -------------------------------------------------------------------------------- /assets/codemirror-5.0/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /npm-debug.log 3 | /test*.html 4 | .tern-* 5 | *~ 6 | *.swp 7 | .idea 8 | *.iml 9 | -------------------------------------------------------------------------------- /resources/diagrams/sampleResults.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/diagrams/sampleResults.png -------------------------------------------------------------------------------- /resources/imgs/coords/cartesian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/coords/cartesian.jpg -------------------------------------------------------------------------------- /resources/imgs/hero/stand/north.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/stand/north.gif -------------------------------------------------------------------------------- /resources/imgs/hero/stand/south.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/hero/stand/south.gif -------------------------------------------------------------------------------- /resources/imgs/mario/jump/right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/mario/jump/right.gif -------------------------------------------------------------------------------- /resources/imgs/mario/stand/left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/mario/stand/left.gif -------------------------------------------------------------------------------- /resources/imgs/mario/stand/right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/mario/stand/right.gif -------------------------------------------------------------------------------- /resources/imgs/mario/walk/right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/mario/walk/right.gif -------------------------------------------------------------------------------- /resources/imgs/reactor-post/error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/error.gif -------------------------------------------------------------------------------- /resources/imgs/reactor-post/fold.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/fold.gif -------------------------------------------------------------------------------- /resources/imgs/reactor-post/html.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/html.gif -------------------------------------------------------------------------------- /resources/imgs/reactor-post/swap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/swap.gif -------------------------------------------------------------------------------- /resources/imgs/texture/woodCrate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/texture/woodCrate.jpg -------------------------------------------------------------------------------- /resources/papers/concurrent-frp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/papers/concurrent-frp.pdf -------------------------------------------------------------------------------- /resources/screenshot/Home/Catalog.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Catalog.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/Catalog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Catalog.png -------------------------------------------------------------------------------- /resources/screenshot/Home/Elmtris.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Elmtris.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/Elmtris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Elmtris.png -------------------------------------------------------------------------------- /resources/screenshot/Home/Fractal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Fractal.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/Fractal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Fractal.png -------------------------------------------------------------------------------- /resources/screenshot/Home/Mario.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Mario.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/Mario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Mario.png -------------------------------------------------------------------------------- /resources/screenshot/Home/Touch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Touch.png -------------------------------------------------------------------------------- /resources/screenshot/Home/Vessel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Vessel.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/Vessel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Vessel.png -------------------------------------------------------------------------------- /resources/screenshot/WebGL/Crate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/WebGL/Crate.jpg -------------------------------------------------------------------------------- /resources/screenshot/WebGL/Cube.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/WebGL/Cube.jpg -------------------------------------------------------------------------------- /resources/screenshot/WebGL/Thwomp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/WebGL/Thwomp.jpg -------------------------------------------------------------------------------- /src/examples/hello-element.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (..) 2 | 3 | 4 | main : Element 5 | main = 6 | show "Hello, World!" -------------------------------------------------------------------------------- /resources/imgs/reactor-post/elm-d3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/elm-d3.png -------------------------------------------------------------------------------- /resources/imgs/reactor-post/tetris.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/tetris.gif -------------------------------------------------------------------------------- /resources/imgs/texture/thwomp_blink.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/texture/thwomp_blink.jpg -------------------------------------------------------------------------------- /resources/imgs/texture/thwomp_face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/texture/thwomp_face.jpg -------------------------------------------------------------------------------- /resources/imgs/texture/thwomp_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/texture/thwomp_side.jpg -------------------------------------------------------------------------------- /resources/screenshot/Home/Debugger.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Debugger.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/Debugger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/Debugger.png -------------------------------------------------------------------------------- /resources/screenshot/Home/PieChart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/PieChart.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/PieChart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/PieChart.png -------------------------------------------------------------------------------- /resources/screenshot/WebGL/Triangle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/WebGL/Triangle.jpg -------------------------------------------------------------------------------- /assets/diagrams/overall-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/assets/diagrams/overall-architecture.png -------------------------------------------------------------------------------- /assets/diagrams/signal-graph-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/assets/diagrams/signal-graph-summary.png -------------------------------------------------------------------------------- /resources/imgs/reactor-post/elm-html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/elm-html.png -------------------------------------------------------------------------------- /resources/imgs/reactor-post/elm-webgl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/elm-webgl.png -------------------------------------------------------------------------------- /resources/screenshot/Home/DreamWriter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/DreamWriter.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/DreamWriter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/DreamWriter.png -------------------------------------------------------------------------------- /resources/screenshot/Home/FirstPerson.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/FirstPerson.gif -------------------------------------------------------------------------------- /resources/screenshot/Home/FirstPerson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/FirstPerson.png -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Form.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Form.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Plot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Plot.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Pong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Pong.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Tree.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Walk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Walk.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Web.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Web.jpg -------------------------------------------------------------------------------- /resources/screenshot/WebGL/FirstPerson.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/WebGL/FirstPerson.jpg -------------------------------------------------------------------------------- /assets/blog/error-messages/missing-field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/assets/blog/error-messages/missing-field.png -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Clock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Clock.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Flickr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Flickr.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Mario.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Mario.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Shapes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Shapes.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Slide.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Slide.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Stamps.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Stamps.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Tracer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Tracer.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Turtle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Turtle.jpg -------------------------------------------------------------------------------- /resources/imgs/reactor-post/timeline-pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/imgs/reactor-post/timeline-pause.png -------------------------------------------------------------------------------- /resources/screenshot/Home/StandardLibraries.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/StandardLibraries.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Centering.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Centering.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Circles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Circles.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Examples.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Examples.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/FlowDown2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/FlowDown2.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/LightBox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/LightBox.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/MovingBox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/MovingBox.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Physics.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Physics.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/PieChart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/PieChart.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/SlideShow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/SlideShow.jpg -------------------------------------------------------------------------------- /resources/screenshot/Home/CommunityLibraries.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Home/CommunityLibraries.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Calculator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Calculator.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/Complements.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/Complements.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/TextReverse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/TextReverse.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/FibonacciTiles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/FibonacciTiles.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/LinearGradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/LinearGradient.jpg -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/RadialGradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/RadialGradient.jpg -------------------------------------------------------------------------------- /src/examples/arrows.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (..) 2 | import Keyboard 3 | 4 | 5 | main : Signal Element 6 | main = 7 | Signal.map show Keyboard.arrows -------------------------------------------------------------------------------- /src/guide/chapters/architecture.md: -------------------------------------------------------------------------------- 1 | 2 | # Architecture 3 | 4 | The tutorial lives [here](https://github.com/evancz/elm-architecture-tutorial/) for now. Go check it out! -------------------------------------------------------------------------------- /assets/codemirror-5.0/.gitattributes: -------------------------------------------------------------------------------- 1 | *.txt text 2 | *.js text 3 | *.html text 4 | *.md text 5 | *.json text 6 | *.yml text 7 | *.css text 8 | *.svg text 9 | -------------------------------------------------------------------------------- /assets/codemirror-5.0/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /resources/screenshot/Intermediate/PascalsTriangle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elm-community/elm-lang.org/master/resources/screenshot/Intermediate/PascalsTriangle.jpg -------------------------------------------------------------------------------- /src/examples/mouse-position.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (..) 2 | import Mouse 3 | 4 | 5 | main : Signal Element 6 | main = 7 | Signal.map show Mouse.position -------------------------------------------------------------------------------- /src/examples/wasd.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (Element, show) 2 | import Keyboard 3 | 4 | 5 | main : Signal Element 6 | main = 7 | Signal.map show Keyboard.wasd -------------------------------------------------------------------------------- /src/examples/hello-world.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (span, text) 2 | import Html.Attributes exposing (class) 3 | 4 | 5 | main = 6 | span [class "welcome-message"] [text "Hello, World!"] -------------------------------------------------------------------------------- /src/examples/texture.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Collage exposing (..) 2 | import Graphics.Element exposing (..) 3 | 4 | 5 | main : Element 6 | main = 7 | collage 300 300 8 | [ textured "/imgs/stripes.jpg" (ngon 5 75) 9 | ] 10 | -------------------------------------------------------------------------------- /src/examples/collage-text.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Collage exposing (..) 2 | import Graphics.Element exposing (..) 3 | 4 | 5 | main : Element 6 | main = 7 | collage 200 200 8 | [ rotate (degrees 20) (toForm (show "Any element can go here!")) 9 | ] -------------------------------------------------------------------------------- /src/examples/collage-element.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Collage exposing (..) 2 | import Graphics.Element exposing (..) 3 | 4 | 5 | main : Element 6 | main = 7 | collage 200 200 8 | [ rotate (degrees 20) (toForm (show "Any element can go here!")) 9 | ] -------------------------------------------------------------------------------- /src/examples/mouse-clicks.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (..) 2 | import Mouse 3 | 4 | 5 | main : Signal Element 6 | main = 7 | Signal.map show countClick 8 | 9 | 10 | countClick : Signal Int 11 | countClick = 12 | Signal.foldp (\clk count -> count + 1) 0 Mouse.clicks -------------------------------------------------------------------------------- /src/guide/chapters/introduction.md: -------------------------------------------------------------------------------- 1 | 2 | # Introduction 3 | 4 | This guide is intended for folks with some programming background. The emphasis is on getting a deeper understanding of the core concepts in Elm and how they fit together. 5 | 6 | ## Hello World 7 | 8 | ## Motivation 9 | 10 | ## Key Concepts -------------------------------------------------------------------------------- /src/examples/layout-fancy.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (..) 2 | 3 | 4 | main : Element 5 | main = 6 | flow down (List.map (width 150) content) 7 | 8 | 9 | content : List Element 10 | content = 11 | [ show "Bears, Oh My!" 12 | , image 200 200 "/imgs/yogi.jpg" 13 | , image 472 315 "/imgs/shells.jpg" 14 | ] 15 | -------------------------------------------------------------------------------- /src/examples/mouse-is-down.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (..) 2 | import Mouse 3 | 4 | 5 | -- Mouse.isDown is true whenever the left mouse button 6 | -- is pressed down and false otherwise. 7 | 8 | main : Signal Element 9 | main = 10 | Signal.map show Mouse.isDown 11 | 12 | 13 | -- Try clicking. The boolean value will update automatically. -------------------------------------------------------------------------------- /src/examples/window-centering.elm: -------------------------------------------------------------------------------- 1 | import Graphics.Element exposing (..) 2 | import Window 3 | 4 | 5 | main : Signal Element 6 | main = 7 | Signal.map view Window.dimensions 8 | 9 | 10 | view : (Int,Int) -> Element 11 | view (w,h) = 12 | container w h middle (show "Hello, World!") 13 | 14 | 15 | -- Try changing the size of your browser window. -------------------------------------------------------------------------------- /src/examples/key-presses.elm: -------------------------------------------------------------------------------- 1 | -- Click on the righthand screen and start pressing keys! 2 | 3 | import Char 4 | import Graphics.Element exposing (..) 5 | import Keyboard 6 | 7 | 8 | main : Signal Element 9 | main = 10 | Signal.map display Keyboard.presses 11 | 12 | 13 | display : Int -> Element 14 | display keyCode = 15 | show <| 16 | "The last key you pressed was: " 17 | ++ toString (Char.fromCode keyCode) 18 | -------------------------------------------------------------------------------- /src/shared/Center.elm: -------------------------------------------------------------------------------- 1 | module Center (markdown, style) where 2 | 3 | import Html exposing (..) 4 | import Html.Attributes as Attr exposing (..) 5 | import Markdown 6 | 7 | 8 | (=>) = (,) 9 | 10 | 11 | markdown width string = 12 | div [ class "content", style width ] [ Markdown.toHtml string ] 13 | 14 | 15 | style width = 16 | Attr.style 17 | [ "display" => "block" 18 | , "width" => width 19 | , "margin" => "0 auto" 20 | ] -------------------------------------------------------------------------------- /src/examples/color.elm: -------------------------------------------------------------------------------- 1 | import Color exposing (..) 2 | import Graphics.Collage exposing (..) 3 | import Graphics.Element exposing (..) 4 | 5 | 6 | main : Element 7 | main = 8 | collage 150 150 (List.map shape [0..11]) 9 | 10 | 11 | shape : Int -> Form 12 | shape n = 13 | let 14 | angle = degrees (30 * toFloat n) 15 | in 16 | circle 10 17 | |> filled (hsl angle 0.7 0.5) 18 | |> move (45 * cos angle, 45 * sin angle) 19 | 20 | -------------------------------------------------------------------------------- /src/examples/shapes.elm: -------------------------------------------------------------------------------- 1 | import Color exposing (..) 2 | import Graphics.Collage exposing (..) 3 | import Graphics.Element exposing (..) 4 | 5 | 6 | main : Element 7 | main = 8 | collage 300 300 9 | [ ngon 4 75 10 | |> filled clearGrey 11 | |> move (-10,0) 12 | , ngon 5 50 13 | |> filled clearGrey 14 | |> move (50,10) 15 | ] 16 | 17 | 18 | clearGrey : Color 19 | clearGrey = 20 | rgba 111 111 111 0.6 21 | -------------------------------------------------------------------------------- /src/shared/ColorScheme.elm: -------------------------------------------------------------------------------- 1 | module ColorScheme where 2 | 3 | import Color exposing (rgb) 4 | 5 | 6 | accent0 = rgb 90 99 120 -- #5A6378 dark grey/blue 7 | 8 | accent1 = rgb 96 181 204 -- #60B5CC blue 9 | accent2 = rgb 240 173 0 -- #F0AD00 yellow 10 | accent3 = rgb 234 21 122 -- #EA157A pink 11 | accent4 = rgb 127 209 59 -- #7FD13B green 12 | 13 | lightGrey = rgb 245 245 245 -- #F5F5F5 14 | mediumGrey = rgb 216 221 225 -- #D8DDE1 15 | 16 | -------------------------------------------------------------------------------- /src/examples/resize-yogi.elm: -------------------------------------------------------------------------------- 1 | 2 | -- Show an image of Yogi that resizes while maintaining its aspect ratio. 3 | 4 | import Graphics.Element exposing (..) 5 | import Mouse 6 | 7 | 8 | main : Signal Element 9 | main = 10 | Signal.map resizeableYogi edgeLength 11 | 12 | 13 | resizeableYogi : Int -> Element 14 | resizeableYogi n = 15 | image n n "/imgs/yogi.jpg" 16 | 17 | 18 | edgeLength : Signal Int 19 | edgeLength = 20 | Signal.map (\(x,y) -> max x y) Mouse.position 21 | -------------------------------------------------------------------------------- /src/examples/keys.elm: -------------------------------------------------------------------------------- 1 | 2 | -- Focus on the display screen (i.e. click the right half of this window) 3 | -- and start pressing keys! 4 | 5 | import Graphics.Element exposing (..) 6 | import Keyboard 7 | import Set 8 | 9 | 10 | display : Set.Set Int -> Element 11 | display keyCodes = 12 | show <| 13 | "You are holding down the following keys: " 14 | ++ toString (Set.toList keyCodes) 15 | 16 | 17 | main : Signal.Signal Element 18 | main = 19 | Signal.map display Keyboard.keysDown -------------------------------------------------------------------------------- /src/examples/transforms.elm: -------------------------------------------------------------------------------- 1 | import Color exposing (..) 2 | import Graphics.Collage exposing (..) 3 | import Graphics.Element exposing (..) 4 | 5 | 6 | main : Element 7 | main = 8 | collage 300 300 9 | [ hexagon red 10 | , hexagon purple 11 | |> scale 2 12 | , hexagon green 13 | |> move (100,0) 14 | , hexagon blue 15 | |> rotate (degrees 30) 16 | ] 17 | 18 | 19 | hexagon : Color -> Form 20 | hexagon clr = 21 | outlined (solid clr) (ngon 6 40) 22 | -------------------------------------------------------------------------------- /src/examples/linear-gradient.elm: -------------------------------------------------------------------------------- 1 | import Color exposing (..) 2 | import Graphics.Collage exposing (..) 3 | import Graphics.Element exposing (..) 4 | 5 | 6 | grad : Gradient 7 | grad = 8 | linear (0,60) (0,-60) 9 | [ (0, rgb 0 171 235) 10 | , (0.79, white) 11 | , (0.8, rgb 38 192 0) 12 | , (1, white) 13 | ] 14 | 15 | 16 | main : Element 17 | main = 18 | collage 120 120 19 | [ gradient grad (rect 120 120) 20 | , toForm (image 35 35 "/imgs/mario/jump/right.gif") 21 | ] 22 | -------------------------------------------------------------------------------- /src/pages/404.elm: -------------------------------------------------------------------------------- 1 | 2 | import Message exposing (report) 3 | 4 | 5 | main = report """ 6 | 7 |

Poem 404 8 |
Page Not Found
9 |

10 | 11 | I shall be telling this with a sigh
12 | Somewhere ages and ages hence:
13 | Two roads diverged in a wood, and I—
14 | I took the one less traveled by,
15 | And that has made all the difference. 16 | 17 |

Robert Frost

18 | 19 | """ 20 | -------------------------------------------------------------------------------- /src/examples/lines.elm: -------------------------------------------------------------------------------- 1 | import Color exposing (..) 2 | import Graphics.Collage exposing (..) 3 | import Graphics.Element exposing (..) 4 | 5 | 6 | main : Element 7 | main = 8 | collage 200 420 9 | [ move (0,-55) blueSquare 10 | , move (0, 55) redSquare 11 | ] 12 | 13 | 14 | blueSquare : Form 15 | blueSquare = 16 | traced (dashed blue) square 17 | 18 | 19 | redSquare : Form 20 | redSquare = 21 | traced (solid red) square 22 | 23 | 24 | square : Path 25 | square = 26 | path [ (50,50), (50,-50), (-50,-50), (-50,50), (50,50) ] -------------------------------------------------------------------------------- /src/pages/try-message.elm: -------------------------------------------------------------------------------- 1 | 2 | import Message exposing (report) 3 | 4 | 5 | main = report """ 6 | 7 | # Online Editor 8 | 9 | Write and compile code online! 10 | 11 | * Hello World! 12 | * Mouse 13 | * Clock 14 | 15 | For more guidance check out: 16 | 17 | * Examples 18 | * Documentation / Guide 19 | 20 | """ 21 | -------------------------------------------------------------------------------- /src/examples/resize-paint.elm: -------------------------------------------------------------------------------- 1 | 2 | -- Show an image that resizes to fit the window 3 | -- while maintaining its aspect ratio. 4 | 5 | import Graphics.Element exposing (..) 6 | import Window 7 | 8 | 9 | main : Signal Element 10 | main = 11 | Signal.map resizeablePaint Window.dimensions 12 | 13 | 14 | resizeablePaint : (Int,Int) -> Element 15 | resizeablePaint (w,h) = 16 | fittedImage w h "/imgs/paint.jpg" 17 | 18 | 19 | 20 | -- Try resizing the demo pane. For best results, compile this in a 'New Tab' or 21 | -- in 'Full-Screen' mode and try playing with the dimensions of your browser. -------------------------------------------------------------------------------- /src/examples/clock.elm: -------------------------------------------------------------------------------- 1 | import Color exposing (..) 2 | import Graphics.Collage exposing (..) 3 | import Graphics.Element exposing (..) 4 | import Time exposing (..) 5 | 6 | 7 | main = 8 | Signal.map clock (every second) 9 | 10 | 11 | clock t = 12 | collage 400 400 13 | [ filled lightGrey (ngon 12 110) 14 | , outlined (solid grey) (ngon 12 110) 15 | , hand orange 100 t 16 | , hand charcoal 100 (t/60) 17 | , hand charcoal 60 (t/720) 18 | ] 19 | 20 | 21 | hand clr len time = 22 | let 23 | angle = degrees (90 - 6 * inSeconds time) 24 | in 25 | segment (0,0) (fromPolar (len,angle)) 26 | |> traced (solid clr) 27 | -------------------------------------------------------------------------------- /src/examples/markdown.elm: -------------------------------------------------------------------------------- 1 | import Markdown 2 | 3 | main = 4 | Markdown.toHtml markdown 5 | 6 | 7 | markdown = """ 8 | 9 | # This is Markdown 10 | 11 | [Markdown](http://daringfireball.net/projects/markdown/) lets you 12 | write content in a really natural way. 13 | 14 | * You can have lists, like this one 15 | * Make things **bold** or *italic* 16 | * Embed snippets of `code` 17 | * Create [links](/) 18 | * ... 19 | 20 | The [elm-markdown][] package parses all this content, allowing you 21 | to easily generate blocks of `Element` or `Html`. 22 | 23 | [elm-markdown]: http://package.elm-lang.org/packages/evancz/elm-markdown/latest 24 | 25 | """ -------------------------------------------------------------------------------- /src/examples/mouse-tracker.elm: -------------------------------------------------------------------------------- 1 | import Color exposing (..) 2 | import Graphics.Collage exposing (..) 3 | import Graphics.Element exposing (..) 4 | import Mouse 5 | import Window 6 | 7 | 8 | main : Signal Element 9 | main = 10 | Signal.map2 scene Mouse.position Window.dimensions 11 | 12 | 13 | scene : (Int,Int) -> (Int,Int) -> Element 14 | scene (x,y) (w,h) = 15 | let 16 | (dx,dy) = 17 | (toFloat x - toFloat w / 2, toFloat h / 2 - toFloat y) 18 | in 19 | collage w h 20 | [ ngon 3 100 21 | |> filled blue 22 | |> rotate (atan2 dy dx) 23 | , ngon 6 30 24 | |> filled orange 25 | |> move (dx, dy) 26 | ] -------------------------------------------------------------------------------- /src/shared/Message.elm: -------------------------------------------------------------------------------- 1 | module Message (report) where 2 | 3 | import Graphics.Element exposing (..) 4 | import ColorScheme as C 5 | import Markdown 6 | import Window 7 | 8 | 9 | scene msg (w,h) = 10 | container w h middle (box <| width 300 (Markdown.toElement msg)) 11 | |> color C.mediumGrey 12 | 13 | 14 | box e = 15 | let w = widthOf e 16 | h = heightOf e 17 | in 18 | flow down 19 | [ color C.accent1 (spacer (w+40) 5) 20 | , container (w+38) (h+10) midTop e 21 | |> color C.lightGrey 22 | |> container (w+40) (h+11) midTop 23 | |> color C.mediumGrey 24 | ] 25 | 26 | 27 | report msg = 28 | Signal.map (scene msg) Window.dimensions -------------------------------------------------------------------------------- /src/shared/TopBar.elm: -------------------------------------------------------------------------------- 1 | module TopBar (topBar) where 2 | 3 | import Html exposing (..) 4 | import Html.Attributes exposing (..) 5 | 6 | 7 | (=>) = (,) 8 | 9 | 10 | topBar name = 11 | div [ id "tabs" ] 12 | [ a [ href "/", style [ "position" => "absolute", "left" => "1em", "top" => "1em" ] ] 13 | [ img [ src "/assets/logo.svg", style [ "width" => "24px" ] ] [] 14 | ] 15 | , ul [] (List.map (tab name) [ "examples", "docs", "community", "blog" ]) 16 | ] 17 | 18 | 19 | tab currentName name = 20 | li [] 21 | [ a [ classList [ "tab" => True, "current" => (currentName == name) ] 22 | , href ("/" ++ name) 23 | ] 24 | [ text name ] 25 | ] 26 | 27 | -------------------------------------------------------------------------------- /assets/codemirror-5.0/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { color: #a86; } 2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } 3 | .cm-s-neat span.cm-string { color: #a22; } 4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } 5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } 6 | .cm-s-neat span.cm-variable { color: black; } 7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } 8 | .cm-s-neat span.cm-meta {color: #555;} 9 | .cm-s-neat span.cm-link { color: #3a3; } 10 | 11 | .cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;} 12 | .cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 13 | -------------------------------------------------------------------------------- /src/examples/layout-simple.elm: -------------------------------------------------------------------------------- 1 | 2 | {------------------------------------------------------------- 3 | Elements can be combined into more complex layouts using 4 | the flow function: 5 | 6 | flow : Direction -> [Element] -> Element 7 | 8 | It is easy to change the direction of flow. Just use a 9 | different value for the direction! 10 | 11 | down, up, left, right, inward, outward : Direction 12 | 13 | Try switching "down" in the code below with "up". 14 | -------------------------------------------------------------} 15 | 16 | import Graphics.Element exposing (..) 17 | 18 | 19 | main : Element 20 | main = 21 | flow down 22 | [ show "By using the 'flow' function," 23 | , show "we can stack elements" 24 | , show "on top of other elements." 25 | ] -------------------------------------------------------------------------------- /assets/codemirror-5.0/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} 2 | .cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;} 3 | .cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;} 4 | .cm-s-elegant span.cm-variable {color: black;} 5 | .cm-s-elegant span.cm-variable-2 {color: #b11;} 6 | .cm-s-elegant span.cm-qualifier {color: #555;} 7 | .cm-s-elegant span.cm-keyword {color: #730;} 8 | .cm-s-elegant span.cm-builtin {color: #30a;} 9 | .cm-s-elegant span.cm-link {color: #762;} 10 | .cm-s-elegant span.cm-error {background-color: #fdd;} 11 | 12 | .cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;} 13 | .cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} 14 | -------------------------------------------------------------------------------- /elm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0", 3 | "summary": "Sandbox for building code that depends on third party libs", 4 | "repository": "https://github.com/elm-lang/elm-lang.org.git", 5 | "license": "BSD3", 6 | "source-directories": [ 7 | "src/shared", 8 | "gen/guide/elm" 9 | ], 10 | "exposed-modules": [], 11 | "native-modules": true, 12 | "dependencies": { 13 | "elm-lang/core": "3.0.0 <= v < 4.0.0", 14 | "evancz/elm-effects": "2.0.1 <= v < 3.0.0", 15 | "evancz/elm-html": "4.0.2 <= v < 5.0.0", 16 | "evancz/elm-http": "3.0.0 <= v < 4.0.0", 17 | "evancz/elm-markdown": "2.0.0 <= v < 3.0.0", 18 | "evancz/elm-svg": "2.0.1 <= v < 3.0.0", 19 | "evancz/start-app": "2.0.2 <= v < 3.0.0" 20 | }, 21 | "elm-version": "0.16.0 <= v < 0.17.0" 22 | } -------------------------------------------------------------------------------- /src/examples/buttons.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (div, button, text) 2 | import Html.Events exposing (onClick) 3 | import StartApp.Simple as StartApp 4 | 5 | 6 | {-| Read more about StartApp and how this works at: 7 | 8 | https://github.com/evancz/start-app 9 | 10 | The rough idea is that we just specify a model, a way to view it, 11 | and a way to update it. That's all there is to it! 12 | -} 13 | main = 14 | StartApp.start { model = 0, view = view, update = update } 15 | 16 | 17 | view address model = 18 | div [] 19 | [ button [ onClick address Decrement ] [ text "-" ] 20 | , div [] [ text (toString model) ] 21 | , button [ onClick address Increment ] [ text "+" ] 22 | ] 23 | 24 | 25 | type Action = Increment | Decrement 26 | 27 | 28 | update action model = 29 | case action of 30 | Increment -> model + 1 31 | Decrement -> model - 1 32 | -------------------------------------------------------------------------------- /src/examples/unordered-list.elm: -------------------------------------------------------------------------------- 1 | import Html exposing (li, text, ul) 2 | import Html.Attributes exposing (class) 3 | 4 | 5 | {-| This snippet uses the