more additions.
This commit is contained in:
parent
dd7e4a4933
commit
e8649038ad
5 changed files with 82 additions and 33 deletions
53
README.md
53
README.md
|
|
@ -1,36 +1,23 @@
|
|||
# Open Health
|
||||
|
||||
Workout Routines
|
||||
- Routine Name
|
||||
- Exercise Type
|
||||
- Aerobic
|
||||
- Strength
|
||||
- Flexibility
|
||||
- Endurance
|
||||
- Exercise Measure
|
||||
- Distance
|
||||
- Weight
|
||||
- Time
|
||||
- Rate
|
||||
- Exercise Units
|
||||
- Distance
|
||||
- Miles
|
||||
- Kilometers
|
||||
- Meters
|
||||
- Yards
|
||||
- Feet
|
||||
- Weight
|
||||
- KG
|
||||
- LBS
|
||||
- Time
|
||||
- Hours
|
||||
- Minutes
|
||||
- Seconds
|
||||
- Milliseconds
|
||||
- Rate
|
||||
- Miles per Hour
|
||||
- Kilometers per Hour
|
||||
- Beats Per Minute
|
||||
- Steps per Minute
|
||||
- Instructions
|
||||
This is a simple tracker for workouts, meals, and measurments.
|
||||
|
||||
1. Sign up / Register.
|
||||
2. Create a Routine (Workout)
|
||||
3. Add exercise(s) to the Routine, and add measures to your exercise.
|
||||
4. Log your exercise based on the routine you're doing (e.g. Weights, Walking, Running, Swimming, Biking, etc)
|
||||
5. See graphs to indicate your improvement over time.
|
||||
|
||||
Repeat for Meal tracking, and Body Measurements
|
||||
|
||||
## Built with
|
||||
- MeteorJS
|
||||
- Blaze Layout
|
||||
- NodeJS
|
||||
- FerretDB and PostgreSQL
|
||||
- PicoCSS
|
||||
|
||||
## LICENSED
|
||||
Use if if you like it. No warranty of any kind is offered, not should it be expected.
|
||||
|
||||
This project is free as in freedom, and free as in cost.
|
||||
|
|
|
|||
19
client/General/Logbook/logbook.html
Normal file
19
client/General/Logbook/logbook.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<template name="logbook">
|
||||
<h1>Logbook</h1>
|
||||
<div class="grid">
|
||||
{{#each workouts}}
|
||||
<div>
|
||||
<article class="clickable" id="{{_id}}">
|
||||
<div class="grid">
|
||||
<div>
|
||||
<h2>{{routineName}}</h2>
|
||||
</div>
|
||||
<div>
|
||||
<h3>{{workoutCount}} {{#if $eq workoutCount 1}}exercise{{else}}exercises{{/if}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</template>
|
||||
27
client/General/Logbook/logbook.js
Normal file
27
client/General/Logbook/logbook.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
import { Workouts } from '../../../imports/api/workouts.js';
|
||||
import { WorkoutLog } from '../../../imports/api/workoutLog.js';
|
||||
|
||||
Template.logbook.onCreated(function() {
|
||||
this.subscribe("myWorkoutRoutines");
|
||||
this.subscribe("myWorkoutLog");
|
||||
});
|
||||
|
||||
Template.logbook.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.logbook.helpers({
|
||||
workouts: function() {
|
||||
return Workouts.find({});
|
||||
},
|
||||
workoutCount: function() {
|
||||
let routineId= this._id;
|
||||
let count = WorkoutLog.find({ routineId: routineId }).count();
|
||||
return count;
|
||||
},
|
||||
});
|
||||
|
||||
Template.logbook.events({
|
||||
|
||||
});
|
||||
|
|
@ -78,6 +78,15 @@ Template.workoutLog.events({
|
|||
showSnackbar("Exercise Not Saved!", "red");
|
||||
} else {
|
||||
showSnackbar("Exercise Added!", "green");
|
||||
$("#exerciseName").val("");
|
||||
$("#exerciseType").val("");
|
||||
$("#exerciseMeasure").val("");
|
||||
$("#exerciseUnitMeasure").val("");
|
||||
$("#exerciseMeasure2").val("");
|
||||
$("#exerciseUnitMeasure2").val("");
|
||||
$("#exerciseMeasure3").val("");
|
||||
$("#exerciseUnitMeasure3").val("");
|
||||
$("#exerciseInstruction").val("");
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(" ERROR trying to add an exercise to log: " + error);
|
||||
|
|
|
|||
|
|
@ -75,4 +75,11 @@ FlowRouter.route('/workoutLog', {
|
|||
action() {
|
||||
this.render('MainLayout', { main: "workoutLog"});
|
||||
}
|
||||
});
|
||||
|
||||
FlowRouter.route('/logbook', {
|
||||
name: 'logbook',
|
||||
action() {
|
||||
this.render('MainLayout', { main: "logbook"});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue