-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
138 lines (112 loc) · 4.37 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
<!DOCTYPE html>
<html lang="en">
<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>FitLife</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/form-style.css" rel="stylesheet">
</head>
<body>
<script>
if(localStorage.initialized == "false"){
window.location.href = './init.html';
}
</script>
<nav class="navbar navbar-default navbar-xs" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><b>Fit</b>Life</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="index.html"><i class="glyphicon glyphicon-user"></i> Profile</a></li>
<li><a href="challanges.html"><i class="glyphicon glyphicon-list-alt"></i> Challanges</a></li>
<li><a href="schedule.html"><i class="glyphicon glyphicon-cog"></i> Settings</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div class="container auth">
<div id="big-form" class="well auth-box">
<form>
<fieldset>
<img src="img/profile.png" alt="photo" class="img-circle photo col-xs-6 col-xs-offset-3">
<div class="col-xs-8 col-xs-offset-2" id="name"></div>
<div class="col-xs-8 col-xs-offset-2" id="height"></div>
<div class="col-xs-8 col-xs-offset-2" id="weight"></div>
<div class="col-xs-8 col-xs-offset-2" id="age"></div>
<div class="col-xs-8 col-xs-offset-2" id="sex"></div>
<!-- progress bar for levels -->
<div class="progress ">
<div id="progress" class="progress-bar" role="progressbar" aria-valuenow="" aria-valuemin="0" aria-valuemax="100" style="">
</div>
</div>
<h2 id="level"></h2>
</fieldset>
</form>
</div>
<div class="clearfix"></div>
</div>
<br>
<div class="container auth">
<div id="big-form" class="well auth-box">
<h3>Iron Man</h3>
<p>Do 50 pushups today.</p>
<hr>
<h3>Armstrong</h3>
<p>Bike for 20 Miles.</p>
<hr>
<h3>Socializer</h3>
<p>We posted on Facebook for you!</p>
<hr>
<h3>A single step...</h3>
<p>Begin your training journey.</p>
</div>
<div class="clearfix"></div>
</div>
<br>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script src="lib/jquery-1.8.2.min.js"></script>
<script src="js/storage/memory-store.js"></script>
<script src="js/main.js"></script>
<script>
$( document ).ready(function() {
var photo = localStorage.photo;
$("#photo").attr("src", photo);
var name = localStorage.user_name;
$("#name").text(name);
var feet = localStorage.user_feet;
var inches = localStorage.user_inches;
$("#height").text(feet + " ft. " + inches + " in.");
var weight = localStorage.user_weight;
$("#weight").text(weight + " lbs.");
var age = localStorage.user_age;
$("#age").text(age);
var sex = localStorage.user_sex;
$("#sex").text(sex);
var points = 540;
$("#progress").attr("aria-valuenow", (points%100));
$("#progress").attr("style", "width: "+(points%100)+"%;");
if(points < 100){
var level = 0;
}
else{
var level = (points - (points%100)) / 100;
}
$("#level").text("Lvl " + level);
});
</script>
</body>
</html>