-
Notifications
You must be signed in to change notification settings - Fork 2
/
gainsville_app.html
146 lines (117 loc) · 5.89 KB
/
gainsville_app.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
<html>
<head>
<title> Gainsville - For Your Workout Needs </title>
<link rel="icon" href="http://cdn.shopify.com/s/files/1/0185/5092/products/persons-0123.png?v=1369543551"/>
<link rel="stylesheet" type="text/css" href="gainsville_app.css"/>
<link href="https://fonts.googleapis.com/css?family=Candal|Lato" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".muscle_button").click(function() {
$(this).toggleClass("button_highlight");
$(".muscle[value=" + $(this).val() + "]").toggleClass("muscle_highlight");
});
$("input[type=submit]").click(function() {
// Initialize packed or we get the word 'undefined'
var packed = "";
var data = new Array();
$(".muscle_highlight").each(function(){
data.push($(this).attr("id"));
});
if(data.length <= 0){
alert("You must select at least one muscle to work out!");
return false;
}
for (var i = 0; i < data.length; i++)
packed += escape(data[i]) + ",";
var count = 0;
if($(".regular-checkbox:checked").length <= 0){
alert("You must select which days of the week to work out!");
return false;
}
$(".regular-checkbox:checked").each(function(){
packed += $(this).val();
count++;
});
packed += count;
var radioChecked = $("input[name=goals]:checked").val();
if(radioChecked == undefined){
alert("You must select what your goals are!");
return false;
}
packed += "," + radioChecked;
window.location = "workout.html?" + packed;
});
});
</script>
</head>
<body class="noselect">
<div id="header">
<p>
<strong> GAINSVILLE </strong>
</p>
</div>
<div class="navbar-wrap">
<ul class="topnav">
<li><a href="gainsville_app.html">Home</a></li>
<li><a href="calculator.html">Calorie Calculator</a></li>
</ul>
</div>
<div class="body">
<img id="bgImg" src="muscle_images/human_body_anatomy.gif"/>
<img id="deltoid" class="muscle" value="deltoids" src="muscle_images/deltoids_combined.gif"/>
<input type="button" id="dlt_btn" class="muscle_button" value="deltoids"/>
<img id="forearm" class="muscle" value="forearms" src="muscle_images/forearms_combined.gif"/>
<input type="button" id="for_btn" class="muscle_button" value="forearms"/>
<img id="bicep" class="muscle" value="biceps" src="muscle_images/biceps_combined.gif"/>
<input type="button" id="bcp_btn" class="muscle_button" value="biceps"/>
<img id="quadricep" class="muscle" value="quadriceps" src="muscle_images/quadriceps_combined.gif"/>
<input type="button" id="qdp_btn" class="muscle_button" value="quadriceps"/>
<img id="trapezius" class="muscle" value="trapezius" src="muscle_images/trapezius.gif"/>
<input type="button" id="tps_btn" class="muscle_button" value="trapezius"/>
<img id="chest" class="muscle" value="chest" src="muscle_images/chest.gif"/>
<input type="button" id="chst_btn" class="muscle_button" value="chest"/>
<img id="abdomen" class="muscle" value="abdomen" src="muscle_images/abdomen.gif"/>
<input type="button" id="abd_btn" class="muscle_button" value="abdomen"/>
<img id="tricep" class="muscle" value="triceps" src="muscle_images/triceps_combined.gif"/>
<input type="button" id="tcp_btn" class="muscle_button" value="triceps"/>
<img id="calves" class="muscle" value="calves" src="muscle_images/calves_combined.gif"/>
<input type="button" id="clv_btn" class="muscle_button" value="calves"/>
<img id="hamstring" class="muscle" value="hamstrings" src="muscle_images/hamstrings_combined.gif"/>
<input type="button" id="hsg_btn" class="muscle_button" value="hamstrings"/>
<img id="lower" class="muscle" value="lower" src="muscle_images/lower_back.gif"/>
<input type="button" id="lb_btn" class="muscle_button" value="lower"/>
<img id="upper" class="muscle" value="upper" src="muscle_images/upper_back_combined.gif"/>
<input type="button" id="ub_btn" class="muscle_button" value="upper"/>
<img id="lats" class="muscle" value="lats" src="muscle_images/latissimus_dorsi.gif"/>
<input type="button" id="lat_btn" class="muscle_button" value="lats"/>
<img id="glutes" class="muscle" value="glutes" src="muscle_images/gluteus_maximus.gif"/>
<input type="button" id="glt_btn" class="muscle_button" value="glutes"/>
<img id="obliques" class="muscle" value="obliques" src="muscle_images/obliques_combined.gif"/>
<input type="button" id="obl_btn" class="muscle_button" value="obliques"/>
</div>
<div id="options">
<div id="daysPerWeek" class="opt">
<h3> DAYS TO WORKOUT </h3>
<input type="checkbox" id="sun" class="regular-checkbox" value="sun"/><label for="sun"> S </label>
<input type="checkbox" id="mon" class="regular-checkbox" value="mon"/><label for="mon"> M </label>
<input type="checkbox" id="tue" class="regular-checkbox" value="tue"/><label for="tue"> T </label>
<input type="checkbox" id="wed" class="regular-checkbox" value="wed"/><label for="wed"> W </label>
<input type="checkbox" id="thu" class="regular-checkbox" value="thu"/><label for="thu"> TH </label>
<input type="checkbox" id="fri" class="regular-checkbox" value="fri"/><label for="fri"> F </label>
<input type="checkbox" id="sat" class="regular-checkbox" value="sat"/><label for="sat"> S </label>
<h3> WORKOUT GOALS </h3>
<form>
<label><input type="radio" name="goals" value="str"> Strength </label>
<label><input type="radio" name="goals" value="aes"> Aesthetics </label>
<label><input type="radio" name="goals" value="bth"> Both </label>
</form>
</div>
<div id="generateWorkout">
<form action = "javascript:sendData();">
<input class="opt" type="submit" value="GIVE ME A WORKOUT!"/>
</form>
</div>
</div>
</body>
</html>