-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.elm
73 lines (66 loc) · 1.76 KB
/
index.elm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import Html exposing (beginnerProgram, div, a, text, nav, ul, li, i)
import Html.Events exposing (onClick)
import Html.Attributes exposing (rel, class, href, rel, media)
import List exposing (map)
main =
beginnerProgram { model = 0, view = view, update = update }
update msg model = model
view model =
div [ class "wrapper" ]
[ Html.node "link" [ rel "stylesheet", href "https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" ] []
, Html.node "link" [ rel "stylesheet", href "stylesheets/main.css", media "screen, projection" ] []
, Html.node "link" [ rel "stylesheet", href "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" ] []
, div [ class "navbar" ]
[ a [ class "logo", href "#" ]
[ text "DEV-KIT" ]
, a [ class "menu", href "#" ]
[ text "Menu" ]
, nav [ class "prim-nav" ]
[ ul [] (map linkToLi links ++ socialLinks)
]
]
]
-- Stuff for view
type alias Link =
{ href : String
, text : String
}
links =
[ { href = "#", text = "Home" }
, { href = "#", text = "About" }
, { href = "#", text = "Pricing" }
, { href = "#", text = "Partners" }
, { href = "#", text = "Articles" }
, { href = "#", text = "Contact" }
]
linkToLi link =
li []
[ a [ href link.href ]
[ text link.text ]
]
socialLinks =
[ li [ class "social" ]
[ a [ href "#" ]
[ i [ class "fa fa-facebook" ]
[]
]
]
, li [ class "social" ]
[ a [ href "#" ]
[ i [ class "fa fa-twitter" ]
[]
]
]
, li [ class "social" ]
[ a [ href "#" ]
[ i [ class "fa fa-instagram" ]
[]
]
]
, li [ class "social" ]
[ a [ href "#" ]
[ i [ class "fa fa-pinterest" ]
[]
]
]
]