-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
100 lines (88 loc) · 3.34 KB
/
index.html
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!doctype html>
<html>
<head>
<script src="elm.js"></script>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<style type="text/css">
html, body {
background-color: white;
font-family: "Open Sans";
}
a {
text-decoration: none;
}
#elm {
position:relative;
margin:150px auto;
height:90px;
width:90px;
margin-bottom:100px;
}
.main-button {
position: absolute;
width: 90px;
height: 90px;
border-radius: 100%;
background-color: #68AEF0;
cursor: pointer;
display: flex;
justify-content : center;
align-items: center;
color: #ffffff;
font-weight: lighter;
border: 1px solid rgba(0, 0, 0, 0.1);
}
.child-button {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
left:20px;
top:20px;
border-radius: 100%;
background-color: white;
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px;
color: #8898A5;
z-index: -1;
}
.message {
color: #333;
position:absolute;
width:100%;
text-align: center;
bottom:-30px;
left:0;
font-family: "Courier New";
}
.description {
width:500px;
position:relative;
margin:50px 50px;
z-index:0;
}
</style>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="description">
<div id="elm"></div>
<h1>A Flower Menu</h1>
<p>This is a recreation of a lovely design for <a href="https://medium.com/@nashvail/a-gentle-introduction-to-react-motion-dc50dd9f2459#.bgck7roe9">a menu made by Nash Vail</a>
</p>
<p>His original code was written in React using the React Motion library and I wanted to see how this would translate into the <a href="http://elm-lang.org/">Elm programming language</a> using the <a href="https://github.com/mdgriffith/elm-html-animation">elm-html-animation</a> library.
</p>
<p>
The code used to create this example can be found on <a href="https://github.com/mdgriffith/elm-html-animation-flower-menu/blob/master/FlowerMenu.elm">github</a>.
</p>
</div>
</body>
<script type="text/javascript">
var element = document.getElementById("elm");
Elm.Main.embed(element);
</script>
</html>