-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.html
90 lines (90 loc) · 4.7 KB
/
template.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
<div class="container">
<div ng-app="ngMacro">
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/jonniedarko/ng-macro/master/style.css">
<div ng-controller="macroCtrl" class="container">
<div class="row">
<div class="col-sm-12"><h1>Ng-Macro</h1></div>
</div>
<div class="row">
<div class="col-sm-8 form-group"><input type="text" class="form-control" id="user_name" ng-model="user.name" placeholder="What's your name?"></div>
<div class="col-sm-4 form-group"><input type="text" class="form-control" id="user_age" ng-model="user.age" placeholder="What's your age?"></div>
</div>
<div class="row">
<div class="col-sm-4 form-group">
<div class="input-group">
<input type="text" class="form-control" id="user_height" ng-model="user.height" placeholder="What's your height?">
<span class="input-group-addon">cm</span>
</div>
</div>
<div class="col-sm-4 form-group">
<div class="input-group">
<input type="text" class="form-control" id="user_weight" ng-model="user.weight" placeholder="What's your weight?">
<span class="input-group-addon">kg</span>
</div>
</div>
<div class="col-sm-4 form-group">
<div class="">
<select name="" id="user_sex" ng-model="user.sex" class="form-control form-control margin-zero">
<option value="">what is your sex?</option>
<option value="male">Male</option>
<option value="female">female</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<p class="bg-primary kcal-flash">
<b> {{getName(user.name)}} Basic Metabolic Rate: </b> {{ getMetaRate()}}
</p>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<select name="" id="" class="form-control" ng-model="user.activityLevel" ng-change="{{updateNutrition()}}">
<option value="">Select you Activity Level</option>
<option ng-repeat="activityLevel in activityLevels" value="{{activityLevel.value}}">{{activityLevel.title}} ({{activityLevel.description}})</option>
</select>
</div>
</div>
<div class="row" style="padding:10px;">
</div>
<div class="row">
<div class="col-sm-12">
<table class="table table-bordered">
<thead>
<th></th>
<td ng-repeat="goal in goals">{{goal.title}}</td>
</thead>
<tbody>
<tr>
<td>Calories:</td>
<td ng-repeat="goal in goals">{{goal.calories | number:0}}</td>
</tr>
<tr>
<td>Protien:</td>
<td ng-repeat="goal in goals">{{goal.protein | number:0}}</td>
</tr>
<tr>
<td>Fats:</td>
<td ng-repeat="goal in goals">{{goal.fats | number:0}}</td>
</tr>
<tr>
<td>Carbs:</td>
<td ng-repeat="goal in goals">{{goal.carbs | number:0}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script type="text/javascript">
if(typeof jQuery == 'undefined'){
document.write('<script type="text/javascript" src="https://cdn.rawgit.com/jonniedarko/ng-macro/master/vendor/jquery/jquery.min.js"></'+'script>');
}
</script>
<script type="text/javascript" src="https://cdn.rawgit.com/jonniedarko/ng-macro/master/vendor/angular/angular.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/jonniedarko/ng-macro/master/app.js"></script>
</div>