forked from megharastogi/healthy_food_america_givecamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
382 lines (335 loc) · 15.3 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sugar Overload Calculator | Healthy Food America</title>
<!-- OpenGraph -->
<meta property="og:title" content="Sugar Overload Calculator | by Healthy Food America">
<meta property="og:description" content="Play this sugar overload calculator mini-game by Healthy Food America. Find out how much sugar is in the food we eat.">
<meta property="og:type" content="site">
<meta property="og:image" content="https://megharastogi.github.io/healthy_food_america_givecamp/images/favicons/250x250.png">
<meta property="og:url" content="http://www.healthyfoodamerica.org/sugar_calculator">
<meta name="description" content="Play this sugar overload calculator mini-game by Healthy Food America. Find out how much sugar is in the food we eat.">
<meta name="twitter:site" content="@HealthyFA">
<meta name="twitter:card" content="summary">
<!-- Favicons -->
<link rel="icon" type="image/png" href="images/favicons/16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="images/favicons/32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="images/favicons/96x96.png" sizes="96x96">
<!-- CSS -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Sanchez:400,400i|Passion+One:700">
<link rel="stylesheet" href="css/style.min.css">
</head>
<body>
<div class="container u-align-center">
<!-- Page Header -->
<header>
<h1 class="page-heading">
Sugar Overload Calculator
</h1>
<h2 class="page-subheading">
A mini-game by Healthy Food America
</h2>
</header>
<main class="js-main">
<div class="main-intro">
<p>Americans are awash in added sugar and there is too much of it in our food and beverage products. It’s time to bring sugar back to healthy levels.</p>
<p>We’ve selected some popular items that contain added sugar to help you see how quickly it adds up. Select the number of servings in a typical day for each item and estimate the total.</p>
</div>
<!-- Food Grid -->
<div class="flex">
<article class="food js-food-item" data-value="9">
<h2 class="food__name js-food-name">
Sugary Cereal
</h2>
<div class="food__serving js-serving-size">3/4 cup</div>
<img class="food__image" src="images/cereal.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="15">
<h2 class="food__name js-food-name">
Fruit Flavored Drink
</h2>
<div class="food__serving js-serving-size">1 box (200ml)</div>
<img class="food__image" src="images/fruit_drink.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="16">
<h2 class="food__name js-food-name">
Flavored Yogurt
</h2>
<div class="food__serving js-serving-size">1 container (6oz)</div>
<img class="food__image" src="images/yogurt.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="38">
<h2 class="food__name js-food-name">
Soda
</h2>
<div class="food__serving js-serving-size">1 can</div>
<img class="food__image" src="images/soda.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="9">
<h2 class="food__name js-food-name">
Granola Bar
</h2>
<div class="food__serving js-serving-size">1 bar</div>
<img class="food__image" src="images/granola_bar.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="14">
<h2 class="food__name js-food-name">
Chocolate Milk
</h2>
<div class="food__serving js-serving-size">1 cup</div>
<img class="food__image" src="images/milk.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="13">
<h2 class="food__name js-food-name">
Muffin
</h2>
<div class="food__serving js-serving-size">1 muffin</div>
<img class="food__image" src="images/muffin.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="8">
<h2 class="food__name js-food-name">
Pasta Sauce
</h2>
<div class="food__serving js-serving-size">1/2 cup</div>
<img class="food__image" src="images/pasta_sauce.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="7">
<h2 class="food__name js-food-name">
Graham Crackers
</h2>
<div class="food__serving js-serving-size">2 sheets</div>
<img class="food__image" src="images/graham_crackers.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="20">
<h2 class="food__name js-food-name">
Cupcake
</h2>
<div class="food__serving js-serving-size">1 piece</div>
<img class="food__image" src="images/cupcake.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="18">
<h2 class="food__name js-food-name">
Fruit Snacks
</h2>
<div class="food__serving js-serving-size">1 pouch</div>
<img class="food__image" src="images/fruit_snacks.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
<article class="food js-food-item" data-value="21">
<h2 class="food__name js-food-name">
Sports Drink
</h2>
<div class="food__serving js-serving-size">1 bottle (355ml)</div>
<img class="food__image" src="images/sports_drink.png" width="150" height="150" alt="">
<div class="food__actions">
<button class="food__action js-subtract" aria-label="Subtract" title="Subtract"> - </button>
<span class="food__quantity js-quantity"> 0 </span>
<button class="food__action js-add" aria-label="Add" title="Add"> + </button>
</div>
</article>
</div>
<section class="estimate-cta">
<h2 class="section-heading">
How much sugar do you think your selection contains?
</h2>
<p class="error-text js-estimate-error u-display-none">
Please select at least one item!
</p>
<button class="button js-estimate">
Estimate!
</button>
</section>
</main>
<!-- Estimating Mini-game -->
<section class="animation-container container u-display-none js-estimating">
<div class="game-explanation js-game-explanation">
<h2 class="section-heading">
Start pouring sugar, and hit stop when the amount in the container matches your guess!
</h2>
</div>
<div class="pouring-container">
<span class="sugar-label">Sugar</span>
</div>
<div class="measuring-container">
<div class="sugar js-measuring-level"></div>
<div class="sugar-quantity">
<span class="sugar-number js-measuring-quantity">0</span> teaspoons
</div>
</div>
<button class="start-stop-button button js-estimate-start">
Start!
</button>
<button class="start-stop-button button js-estimate-stop u-display-none">
Stop!
</button>
</section>
<!-- Results page -->
<section class="u-display-none js-sugar-reveal">
<h2 class="section-heading js-result-message">
Results
</h2>
<div class="sugar-count flex">
<div class="user-total results-column">
<h3 class="sugar-count__heading">
You Guessed:
</h3>
<span class="sugar-count__teaspoons js-user-total">0</span> teaspoons
</div>
<div class="actual-total results-column">
<h3 class="sugar-count__heading">
Actual Added Sugar:
</h3>
<span class="sugar-count__teaspoons js-actual-total">0</span> teaspoons
</div>
<div class="recommended-total results-column">
<h3 class="sugar-count__heading">
Recommended Daily Maximum:
</h3>
<span class="sugar-count__teaspoons">12</span> teaspoons
</div>
</div>
<div class="disclaimer-text">
The Dietary Guidelines for Americans recommend limiting added sugars to less than 10% of calories per day
</div>
<h2 class="section-heading">
Actual sugar value compared to recommended daily intake
</h2>
<div class="daily-intake flex">
<div class="child results-column">
<h3 class="daily-intake__heading">
<span class="js-child-intake">0</span><small>%</small>
</h3>
Max <strong>6</strong> teaspoons per day
<img class="daily-intake__silhouette" src="images/child.png" width="400" height="600" alt="">
<div>
Children
</div>
</div>
<div class="woman results-column">
<h3 class="daily-intake__heading">
<span class="js-woman-intake">0</span><small>%</small>
</h3>
Max <strong>6</strong> teaspoons per day
<img class="daily-intake__silhouette" src="images/woman.png" width="400" height="600" alt="">
<div>
Women
</div>
</div>
<div class="man results-column">
<h3 class="daily-intake__heading">
<span class="js-man-intake">0</span><small>%</small>
</h3>
Max <strong>9</strong> teaspoons per day
<img class="daily-intake__silhouette" src="images/man.png" width="400" height="600" alt="">
<div>
Men
</div>
</div>
</div>
<div class="disclaimer-text">
Recommended by American Heart Association
</div>
<h2 class="section-heading">
Spread the word about sugar!
</h2>
<div class="final-cta flex">
<div class="sign-up final-cta__link results-column">
<h3 class="final-cta__header">
Sign Up
</h3>
<p>(TEMP: Email signup from NationBuilder will go here)</p>
</div>
<a class="follow final-cta__link results-column" href="http://www.healthyfoodamerica.org/sugar_advocacy_toolkit" target="_blank">
<h3 class="final-cta__header">
Learn More
</h3>
<p>Bring sugar back to healthy levels with our Sugar Advocacy Toolkit!</p>
</a>
<div class="share final-cta__link results-column">
<h3 class="final-cta__header">
Share This
</h3>
<a class="final-cta__fb-share" href="https://www.facebook.com/sharer/sharer.php?u=http://www.healthyfoodamerica.org/sugar_calculator" target="_blank">
<svg viewBox="0 0 16 16">
<path d="M15.117 0H.883C.395 0 0 .395 0 .883v14.234c0 .488.395.883.883.883h7.663V9.804H6.46V7.39h2.086V5.607c0-2.066 1.262-3.19 3.106-3.19.883 0 1.642.064 1.863.094v2.16h-1.28c-1 0-1.195.476-1.195 1.176v1.54h2.39l-.31 2.416h-2.08V16h4.077c.488 0 .883-.395.883-.883V.883C16 .395 15.605 0 15.117 0"/>
Share on Facebook
</svg>
</a>
<a class="final-cta__twitter-share" href="https://twitter.com/intent/tweet?text=Americans%20are%20awash%20in%20added%20sugar%3B%20see%20how%20quickly%20it%20adds%20up%20with%20our%20sugar%20calculator.%20http%3A%2F%2Fwww.healthyfoodamerica.org%2Fsugar_calculator" target="_blank">
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path d="M16 3.038c-.59.26-1.22.437-1.885.517.677-.407 1.198-1.05 1.443-1.816-.634.375-1.337.648-2.085.795-.598-.638-1.45-1.036-2.396-1.036-1.812 0-3.282 1.468-3.282 3.28 0 .258.03.51.085.75C5.152 5.39 2.733 4.084 1.114 2.1.83 2.583.67 3.147.67 3.75c0 1.14.58 2.143 1.46 2.732-.538-.017-1.045-.165-1.487-.41v.04c0 1.59 1.13 2.918 2.633 3.22-.276.074-.566.114-.865.114-.21 0-.416-.02-.617-.058.418 1.304 1.63 2.253 3.067 2.28-1.124.88-2.54 1.404-4.077 1.404-.265 0-.526-.015-.783-.045 1.453.93 3.178 1.474 5.032 1.474 6.038 0 9.34-5 9.34-9.338 0-.143-.004-.284-.01-.425.64-.463 1.198-1.04 1.638-1.7z"/>
</svg>
</a>
</div>
</div>
<a href="" class="play-again button js-restart">
Play Again!
</a>
</section>
<!-- Page Footer -->
<footer class="page-footer">
© 2016 <a href="http://www.healthyfoodamerica.org">Healthy Food America</a> / Created by <a href="http://www.seattlegivecamp.com">Seattle GiveCamp</a> 2016
</footer>
</div>
<!-- JavaScript -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<script src="js/script.min.js" defer></script>
</body>
</html>