From 452f846218fb07026fb2d2d06d1a3f7cdc40baa9 Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Sat, 16 Jul 2022 12:27:03 +1000 Subject: [PATCH] Add template for dashboard with styling --- app.py | 10 +- templates/add_workout.html | 56 ++++++ templates/base.html | 184 ++++++++++++++++++++ templates/index.html | 347 +++++++++++++++++++++++++++++++++++++ 4 files changed, 590 insertions(+), 7 deletions(-) create mode 100644 templates/add_workout.html create mode 100644 templates/base.html create mode 100644 templates/index.html diff --git a/app.py b/app.py index 4778789..78953a9 100644 --- a/app.py +++ b/app.py @@ -1,12 +1,8 @@ -from flask import Flask +from flask import Flask, render_template app = Flask(__name__) + @app.route("/") def hello_world(): - return "

Hello, World!

" - - -@app.route("/test") -def test_route(): - return "

Hello, test!

" \ No newline at end of file + return render_template('index.html', name='peter') diff --git a/templates/add_workout.html b/templates/add_workout.html new file mode 100644 index 0000000..cc9c18d --- /dev/null +++ b/templates/add_workout.html @@ -0,0 +1,56 @@ +{% extends 'base.html' %} + +{% block content %} + +
+
+
+ +
+
+ +
+ +
+ + + +
+
+
+ +
+ + +
+ +
+ + +
+
+ +
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..da46d3d --- /dev/null +++ b/templates/base.html @@ -0,0 +1,184 @@ + + + + + + + + Workout Tracker + + + + + +
+ +
+
+
+ {% block content %} + {% endblock %} +
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..370b29b --- /dev/null +++ b/templates/index.html @@ -0,0 +1,347 @@ +{% extends 'base.html' %} + +{% block content %} + +
+
+ +
+
+

Gabe

+ List of rep maxes +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Date + + Exercise + + Reps + + Weight +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+
+
+
+
+
+ +
+ +
+
+

Michael

+ List of rep maxes +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Exercise + + Date + + Reps + + Weight +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+ Apr 23 ,2021 + + Squats + + 5 + + 100kg +
+
+
+
+
+
+
+ +
+
+
+
+ 3 +

Total workouts tracked

+
+
+ 14.6% + + + +
+
+
+
+
+
+ 1 +

New rep max this week

+
+
+ 32.9% + + + +
+
+
+
+
+
+ 2 +

Tracking two people

+
+
+ -2.7% + + + +
+
+
+
+ +{% endblock %} \ No newline at end of file