-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
110 lines (98 loc) · 3.65 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
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://unpkg.com/vue"></script>
<link rel="stylesheet" href="styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
</head>
<body>
<div id="app">
<div class="calculator section">
<div class="output section wrapper is-sticky">
<h2>
<span v-if="tokenMsg.emphasis">
For your {{beverages[type].name.toLowerCase()}}, <em>{{ tokenMsg.emphasis }}</em>
</span>
<span v-if="calculateTokens != 0">
{{ calculateTokens }} {{tokenColor}} token<span v-if="calculateTokens > 1">s</span>
</span>
<span v-if="tokenMsg.plain">
{{ tokenMsg.plain }}
</span>
</h2>
<div class="total" v-bind="tokenBreakdown" v-if="calculateTokens != 0">
<h1 v-bind:class="tokens.class">
<div class="token-count">{{ calculateTokens }} x</div>
<div class="token" v-bind:class="tokenColor">
</div>
<img src="./images/direction-arrow.png" class="arrow" />
<img src="./images/token-jar.png" class="token-jar" />
</div>
</div>
</div>
<div class="header wrapper">
<h1>Beneverages Token Calculator</h1>
</div>
<div class="input wrapper type-selection">
<h2>Whatcha Got?</h2>
<h3><label for="quantity">Type of Liquid:</label></h3>
<div class="types flex-container" v-model="type">
<div
v-bind:class="type.class"
v-for="(type, index) in beverages"
v-bind:value="type.value"
v-on:click="setType(type.value, index)"
>
<img v-bind:src="'./images/drinks/' + type.icon + '.png'">
{{type.name}}
</div>
</div>
</div>
<div class="input wrapper amount-selection" id="amount-selection">
<div class="flex-container">
<div class="flex-child">
<h2>Whatcha Drinking?</h2>
<h3><label for="volume">Amount of beverage you plan to consume right now:</label></h3>
<select class="soflow" name="drinkValue" v-model="drinkValue">
<option value="0" selected>N/A</option>
<option
v-for="option in beverages[this.type].drinkOptions"
v-bind:value="option.value"
>
{{ option.description}} ({{option.oz}}oz/{{option.mL}}mL)
</option>
</select>
</div>
<div class="flex-child">
<h2>Whatcha Bought?</h2>
<h3><label for="volume">Type of bottle/can contributing:</label></h3>
<select class="soflow" name="buyValue" v-model="buyValue">
<option value="0" selected>N/A</option>
<option
v-for="option in beverages[this.type].buyOptions"
v-bind:value="option.value"
>
{{ option.description}} ({{option.oz}}oz/{{option.mL}}mL)
</option>
</select>
<h3><label for="quantity">Number of bottles/cans you are adding to the fridge (including the one you plan to drink):</label></h3>
<select class="soflow" name="quantity" v-model="quantity">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
</div>
</div>
<script src="./calculator.js"></script>
</body>
</html>