Initial import of stage 3.
This commit is contained in:
2
stages/3/.gitignore
vendored
Normal file
2
stages/3/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
elm-stuff
|
||||||
|
elm.js
|
||||||
36
stages/3/FunkHub.elm
Normal file
36
stages/3/FunkHub.elm
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
module FunkHub (..) where
|
||||||
|
|
||||||
|
import Html exposing (div, button, text)
|
||||||
|
import Html.Events exposing (onClick)
|
||||||
|
import StartApp.Simple as StartApp
|
||||||
|
|
||||||
|
|
||||||
|
main =
|
||||||
|
StartApp.start { model = model, view = view, update = update }
|
||||||
|
|
||||||
|
|
||||||
|
model =
|
||||||
|
0
|
||||||
|
|
||||||
|
|
||||||
|
view address model =
|
||||||
|
div
|
||||||
|
[]
|
||||||
|
[ button [ onClick address Decrement ] [ text "-" ]
|
||||||
|
, div [] [ text (toString model) ]
|
||||||
|
, button [ onClick address Increment ] [ text "+" ]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
type Action
|
||||||
|
= Increment
|
||||||
|
| Decrement
|
||||||
|
|
||||||
|
|
||||||
|
update action model =
|
||||||
|
case action of
|
||||||
|
Increment ->
|
||||||
|
model + 1
|
||||||
|
|
||||||
|
Decrement ->
|
||||||
|
model - 1
|
||||||
17
stages/3/elm-package.json
Normal file
17
stages/3/elm-package.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0.0",
|
||||||
|
"summary": "Like GitHub, but funkier.",
|
||||||
|
"repository": "https://github.com/evancz/start-app.git",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"source-directories": [
|
||||||
|
"."
|
||||||
|
],
|
||||||
|
"exposed-modules": [],
|
||||||
|
"dependencies": {
|
||||||
|
"elm-lang/core": "3.0.0 <= v < 4.0.0",
|
||||||
|
"evancz/elm-effects": "2.0.0 <= v < 3.0.0",
|
||||||
|
"evancz/elm-html": "4.0.0 <= v < 5.0.0",
|
||||||
|
"evancz/start-app": "2.0.0 <= v < 3.0.0"
|
||||||
|
},
|
||||||
|
"elm-version": "0.16.0 <= v < 0.17.0"
|
||||||
|
}
|
||||||
26
stages/3/index.html
Normal file
26
stages/3/index.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>FunkHub</title>
|
||||||
|
<script type="text/javascript" src="elm.js"></script>
|
||||||
|
|
||||||
|
<!-- Uncomment the below line to enable elm-reactor support. -->
|
||||||
|
<!-- <script type="text/javascript" src="/_reactor/debug.js"></script> -->
|
||||||
|
|
||||||
|
<link href='http://fonts.googleapis.com/css?family=Germania+One' rel='stylesheet' type='text/css'>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var app = Elm.fullscreen(Elm.FunkHub, {});
|
||||||
|
|
||||||
|
// Uncomment this line and comment out the above to enable elm-reactor support.
|
||||||
|
// var app = Elm.fullscreenDebug('FunkHub', 'FunkHub.elm');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
||||||
18
stages/3/package.json
Normal file
18
stages/3/package.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "funk-hub",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Like GitHub, but funkier.",
|
||||||
|
"scripts": {
|
||||||
|
"build": "elm-make FunkHub.elm --output elm.js"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/rtfeldman/elm-workshop.git"
|
||||||
|
},
|
||||||
|
"author": "Richard Feldman",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/rtfeldman/elm-workshop/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/rtfeldman/elm-workshop#readme"
|
||||||
|
}
|
||||||
0
stages/3/style.css
Normal file
0
stages/3/style.css
Normal file
Reference in New Issue
Block a user