Added Measurements input
This commit is contained in:
parent
ba17d57987
commit
98a86ca6a8
12 changed files with 337 additions and 10 deletions
|
|
@ -3,25 +3,47 @@
|
|||
<div class="grid">
|
||||
<div>
|
||||
<article class="infoCard" id="workouts">
|
||||
<div class="grid">
|
||||
<div>
|
||||
<header>
|
||||
<h3>Workouts</h3>
|
||||
</header>
|
||||
<div role="group">
|
||||
<div>
|
||||
<h4>Workouts</h4>
|
||||
</div>
|
||||
<div>
|
||||
{{workoutCount}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p class="right">{{workoutCount}}</p>
|
||||
<div role="group">
|
||||
<div>
|
||||
<h4>Exercise Logs</h4>
|
||||
</div>
|
||||
<div>
|
||||
{{logCount}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<a href="#!" id="logWorkout"><i class="material-icons">notes</i> Log a Workout</a>
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
<div>
|
||||
<article class="infoCard" id="meals">
|
||||
<h3>Meals</h3>
|
||||
<header><h3>Meals</h3></header>
|
||||
|
||||
<footer>
|
||||
<a href="#!" id="logMeal"><i class="material-icons">notes</i>Log a Meal</a>
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
<div>
|
||||
<article class="infoCard" id="measurements">
|
||||
<h3>Measurements</h3>
|
||||
<header><h3>Measurements</h3></header>
|
||||
|
||||
<footer>
|
||||
<a id="logMeasure"><i class="material-icons">notes</i>Log a Measurement</a>
|
||||
</footer>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { LogEntry } from '../../../imports/api/logEntry';
|
|||
Template.home.onCreated(function() {
|
||||
this.subscribe("myWorkoutRoutines");
|
||||
this.subscribe("myWorkoutLog");
|
||||
this.subscribe("myLogEntries");
|
||||
this.subscribe("allMyLogEntries");
|
||||
});
|
||||
|
||||
Template.home.onRendered(function() {
|
||||
|
|
@ -20,6 +20,9 @@ Template.home.helpers({
|
|||
workoutCount: function() {
|
||||
return Workouts.find({}).count();
|
||||
},
|
||||
logCount: function() {
|
||||
return LogEntry.find({}).count();
|
||||
},
|
||||
});
|
||||
|
||||
Template.home.events({
|
||||
|
|
@ -27,4 +30,10 @@ Template.home.events({
|
|||
let route = e.currentTarget.id;
|
||||
FlowRouter.go('/' + route);
|
||||
},
|
||||
'click #logWorkout' (e) {
|
||||
FlowRouter.go('/logEntry');
|
||||
},
|
||||
'click #logMeasure' (e) {
|
||||
FlowRouter.go('/measLogEntry');
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue