-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglass.html
153 lines (141 loc) · 4.15 KB
/
glass.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Water Glass - Google Chrome Browser Extension</title>
<meta name="description" content="Google Chrome Browser Extension To Track Water Intake.">
<meta name="keywords" content="Chrome,Extension,Water, Glass">
<meta name="author" content="OneClick Lab">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
color: #333;
background: #FDFEFE;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
text-align: center;
}
.container {
position: absolute;
top: 50%;
left: 50%;
width: 300px;
margin-left: -150px;
margin-top: -316px;
}
h1, h2 {
text-transform: uppercase;
text-align: center;
margin: 30px 0 0;
font-weight: 400;
}
h2 {
font-size: 18px;
}
a {
text-decoration: none;
color: #999;
}
.copy {
color: #999;
}
.glass {
width: 300px;
background-image: -moz-linear-gradient(left, #f1f1f1, #ffffff, #f1f1f1);
background-image: -webkit-linear-gradient(left, #f1f1f1, #ffffff, #f1f1f1);
background-image: linear-gradient(to right, #f1f1f1, #ffffff, #f1f1f1);
height: 450px;
position: relative;
overflow: hidden;
border-radius: 3px;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.glass .glass-tip {
position: absolute;
top: -5px;
left: -10px;
width: 110%;
height: 10px;
border-radius: 100%;
background: #eee;
}
.glass:before, .glass:after {
content: " ";
width: 0;
height: 0;
border-bottom: 450px solid white;
position: absolute;
bottom: 0px;
z-index: 2;
}
.glass:before {
left: 0px;
border-left: 0px solid transparent;
border-right: 50px solid transparent;
}
.glass:after {
right: 0px;
border-right: 0px solid transparent;
border-left: 50px solid transparent;
}
.glass .glass-bottom {
width: 60%;
left: 60px;
height: 5px;
position: absolute;
bottom: 30px;
background: #eee;
border-radius: 100%;
}
.glass .glass-full {
position: absolute;
background: #23D3F4;
bottom: 30px;
width: 100%;
height: 0px;
z-index: 1;
-webkit-transition: all 350ms ease;
-moz-transition: all 350ms ease;
-o-transition: all 350ms ease;
transition: all 350ms ease;
}
.glass .number {
position: relative;
width: 100%;
text-align: center;
line-height: 350px;
font-size: 150px;
opacity: .65;
z-index: 3;
color: #000;
}
</style>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-48564200-5', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div class="container">
<div class="glass" id="glass">
<div class="number" id="glass-number"></div>
<div class="glass-tip"></div>
<div class="glass-bottom"></div>
<div class="glass-full" id="glass-water"></div>
</div>
<h1>Today (<strong id="date"></strong>)</h1>
<h2><strong>Goal:</strong> 8 cups a day</h2>
<p class="copy"><small><a href="http://oneclicklab.com" target="_blank">OneClick Lab</a> | <a href="http://twitter.com/oneclicklab">@oneclicklab</a> | <a href="#" id="glass-reset">Reset</a></small></p>
</div>
<script src="/js/glass.js"></script>
</body>
</html>