Skip to content

Commit 14a1675

Browse files
committed
#4 Create model 🍏
1 parent 5e23457 commit 14a1675

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
elm-stuff
33
# elm-repl generated files
44
repl-temp-*
5+
6+
horses.js

src/Main.elm

+32-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
11
module Main exposing (..)
22

33
import Html exposing (..)
4+
import Html.Attributes exposing (..)
5+
import Html.Events exposing (onInput, onClick)
6+
import Http exposing (..)
47

58

6-
main : Html msg
9+
main : Program Never Model Msg
710
main =
8-
text "hey sexy horses"
11+
Html.program
12+
{ init = init
13+
, view = view
14+
, subscriptions = always Sub.none
15+
, update = update
16+
}
17+
18+
19+
20+
-- model
21+
22+
23+
type alias Model =
24+
{ character : Maybe String
25+
, gifUrls : List String
26+
}
27+
28+
29+
model : Model
30+
model =
31+
{ character = Nothing
32+
, gifUrls = []
33+
}
34+
35+
36+
37+
-- update
38+
-- view

0 commit comments

Comments
 (0)