Spaces:
Sleeping
Sleeping
HEMANTH commited on
Commit ·
45a65b7
1
Parent(s): abc9746
static json and templates
Browse files- static/diet.json +37 -0
- static/feedback.json +152 -0
- templates/currentprogress.html +141 -0
- templates/diet.html +146 -0
- templates/feed_back.html +173 -0
- templates/index.html +313 -0
- templates/workout.html +178 -0
- templates/workouts_List.html +190 -0
static/diet.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"Breakfast": [
|
| 3 |
+
{
|
| 4 |
+
"description": "3 scrambled eggs with spinach and a slice of whole-wheat toast topped with avocado",
|
| 5 |
+
"time": "7:00 AM"
|
| 6 |
+
}
|
| 7 |
+
],
|
| 8 |
+
"Lunch": [
|
| 9 |
+
{
|
| 10 |
+
"description": "Grilled chicken breast with quinoa, steamed broccoli, and a side of hummus",
|
| 11 |
+
"time": "12:30 PM"
|
| 12 |
+
}
|
| 13 |
+
],
|
| 14 |
+
"Snacks": [
|
| 15 |
+
{
|
| 16 |
+
"description": "Greek yogurt with mixed berries and a handful of almonds",
|
| 17 |
+
"time": "4:00 PM"
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"Dinner": [
|
| 21 |
+
{
|
| 22 |
+
"description": "Baked salmon with roasted sweet potatoes and sautéed asparagus",
|
| 23 |
+
"time": "7:30 PM"
|
| 24 |
+
}
|
| 25 |
+
],
|
| 26 |
+
"dietSuggestions": [
|
| 27 |
+
{
|
| 28 |
+
"tip": "Prioritize protein intake to support muscle growth. Aim for 1.2-1.6 grams of protein per kilogram of body weight daily."
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"tip": "Include complex carbohydrates like brown rice, quinoa, and sweet potatoes for sustained energy."
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"tip": "Don't forget healthy fats from sources like avocado, nuts, seeds, and olive oil."
|
| 35 |
+
}
|
| 36 |
+
]
|
| 37 |
+
}
|
static/feedback.json
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"daily_progress": [
|
| 3 |
+
{
|
| 4 |
+
"day": "Day 1",
|
| 5 |
+
"progress": 60,
|
| 6 |
+
"rest_time": 8,
|
| 7 |
+
"workout_time": 2
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"day": "Day 2",
|
| 11 |
+
"progress": 65,
|
| 12 |
+
"rest_time": 0,
|
| 13 |
+
"workout_time": 2.5
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"day": "Day 3",
|
| 17 |
+
"progress": 70,
|
| 18 |
+
"rest_time": 7,
|
| 19 |
+
"workout_time": 3
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"day": "Day 4",
|
| 23 |
+
"progress": 75,
|
| 24 |
+
"rest_time": 6.5,
|
| 25 |
+
"workout_time": 3.5
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"day": "Day 5",
|
| 29 |
+
"progress": 80,
|
| 30 |
+
"rest_time": 7,
|
| 31 |
+
"workout_time": 3
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"day": "Day 6",
|
| 35 |
+
"progress": 85,
|
| 36 |
+
"rest_time": 7.5,
|
| 37 |
+
"workout_time": 2.5
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"day": "Day 7",
|
| 41 |
+
"progress": 90,
|
| 42 |
+
"rest_time": 7,
|
| 43 |
+
"workout_time": 3
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"day": "Day 8",
|
| 47 |
+
"progress": 98,
|
| 48 |
+
"rest_time": 4,
|
| 49 |
+
"workout_time": 4
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"day": "Day 9",
|
| 53 |
+
"progress": 66,
|
| 54 |
+
"rest_time": 5,
|
| 55 |
+
"workout_time": 2
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"day": "Day 10",
|
| 59 |
+
"progress": 70,
|
| 60 |
+
"rest_time": 7,
|
| 61 |
+
"workout_time": 4
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"day": "Day 11",
|
| 65 |
+
"progress": 73,
|
| 66 |
+
"rest_time": 6,
|
| 67 |
+
"workout_time": 1
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"day": "Day 12",
|
| 71 |
+
"progress": 98,
|
| 72 |
+
"rest_time": 6,
|
| 73 |
+
"workout_time": 2
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"day": "Day 13",
|
| 77 |
+
"progress": 77,
|
| 78 |
+
"rest_time": 5,
|
| 79 |
+
"workout_time": 3
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"day": "Day 14",
|
| 83 |
+
"progress": 69,
|
| 84 |
+
"rest_time": 5,
|
| 85 |
+
"workout_time": 5
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"day": "Day 15",
|
| 89 |
+
"progress": 93,
|
| 90 |
+
"rest_time": 10,
|
| 91 |
+
"workout_time": 4
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"day": "Day 16",
|
| 95 |
+
"progress": 96,
|
| 96 |
+
"rest_time": 7,
|
| 97 |
+
"workout_time": 5
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"day": "Day 17",
|
| 101 |
+
"progress": 57,
|
| 102 |
+
"rest_time": 8,
|
| 103 |
+
"workout_time": 3
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
"day": "Day 18",
|
| 107 |
+
"progress": 65,
|
| 108 |
+
"rest_time": 7,
|
| 109 |
+
"workout_time": 2
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"day": "Day 19",
|
| 113 |
+
"progress": 88,
|
| 114 |
+
"rest_time": 6,
|
| 115 |
+
"workout_time": 2
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"day": "Day 20",
|
| 119 |
+
"progress": 92,
|
| 120 |
+
"rest_time": 8,
|
| 121 |
+
"workout_time": 1
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"day": "Day 21",
|
| 125 |
+
"progress": 79,
|
| 126 |
+
"rest_time": 10,
|
| 127 |
+
"workout_time": 4
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"day": "Day 22",
|
| 131 |
+
"progress": 51,
|
| 132 |
+
"rest_time": 6,
|
| 133 |
+
"workout_time": 1
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"day": "Day 23",
|
| 137 |
+
"progress": 53,
|
| 138 |
+
"rest_time": 7,
|
| 139 |
+
"workout_time": 5
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"day": "Day 24",
|
| 143 |
+
"progress": 58,
|
| 144 |
+
"rest_time": 10,
|
| 145 |
+
"workout_time": 3
|
| 146 |
+
}
|
| 147 |
+
],
|
| 148 |
+
"weekly_summary": {
|
| 149 |
+
"rest_time": 160.0,
|
| 150 |
+
"workout_time": 70.5
|
| 151 |
+
}
|
| 152 |
+
}
|
templates/currentprogress.html
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>User Dashboard</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* Styling for the user interface */
|
| 9 |
+
body {
|
| 10 |
+
font-family: Arial, sans-serif;
|
| 11 |
+
background-color: #000000; /* Black background */
|
| 12 |
+
color: #ffa500; /* Orange text */
|
| 13 |
+
display: flex;
|
| 14 |
+
justify-content: center;
|
| 15 |
+
align-items: center;
|
| 16 |
+
height: 100vh;
|
| 17 |
+
background-image: url('{{ url_for('static', filename='progress_background.jpg') }}'); /* Reference the image */
|
| 18 |
+
background-size: cover;
|
| 19 |
+
background-position: center;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.container {
|
| 23 |
+
width: 100%;
|
| 24 |
+
max-width: 900px;
|
| 25 |
+
padding: 30px;
|
| 26 |
+
background-color: rgba(51, 51, 51, 0.8); /* Dark background with opacity */
|
| 27 |
+
border-radius: 10px;
|
| 28 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
h3 {
|
| 32 |
+
text-align: center;
|
| 33 |
+
color: #cc8400; /* Orange color */
|
| 34 |
+
margin-bottom: 20px;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.progress-bar-container {
|
| 38 |
+
margin-bottom: 30px;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.progress-bar {
|
| 42 |
+
width: 100%;
|
| 43 |
+
background-color: #222222;
|
| 44 |
+
height: 20px;
|
| 45 |
+
border-radius: 10px;
|
| 46 |
+
margin: 10px 0;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.progress {
|
| 50 |
+
height: 100%;
|
| 51 |
+
background-color: #cc8400;
|
| 52 |
+
border-radius: 10px;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.action-buttons {
|
| 56 |
+
display: flex;
|
| 57 |
+
justify-content: space-around;
|
| 58 |
+
flex-wrap: wrap;
|
| 59 |
+
gap: 20px;
|
| 60 |
+
margin-top: 30px;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.card {
|
| 64 |
+
background-color: #444;
|
| 65 |
+
padding: 15px;
|
| 66 |
+
text-align: center;
|
| 67 |
+
border-radius: 10px;
|
| 68 |
+
width: 45%;
|
| 69 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.card img {
|
| 73 |
+
width: 100%;
|
| 74 |
+
height: 150px;
|
| 75 |
+
object-fit: cover;
|
| 76 |
+
border-radius: 10px;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.card button {
|
| 80 |
+
background-color: #cc8400;
|
| 81 |
+
border: none;
|
| 82 |
+
color: white;
|
| 83 |
+
padding: 10px;
|
| 84 |
+
margin-top: 10px;
|
| 85 |
+
border-radius: 5px;
|
| 86 |
+
cursor: pointer;
|
| 87 |
+
font-size: 14px;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.card button:hover {
|
| 91 |
+
background-color: #ffa500;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.card button:focus {
|
| 95 |
+
outline: none;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
@media (max-width: 600px) {
|
| 99 |
+
.card {
|
| 100 |
+
width: 100%;
|
| 101 |
+
}
|
| 102 |
+
}
|
| 103 |
+
</style>
|
| 104 |
+
</head>
|
| 105 |
+
<body>
|
| 106 |
+
|
| 107 |
+
<div class="container">
|
| 108 |
+
<!-- Progress Bar Section -->
|
| 109 |
+
<div class="progress-bar-container">
|
| 110 |
+
<h3>Your Progress</h3>
|
| 111 |
+
<div class="progress-bar">
|
| 112 |
+
<div class="progress" style="width: 70%;"></div> <!-- Static Progress -->
|
| 113 |
+
</div>
|
| 114 |
+
<p style="text-align: center;">Completed: {{ sum }}%</p> <!-- Static progress percentage -->
|
| 115 |
+
</div>
|
| 116 |
+
|
| 117 |
+
<!-- Action Buttons Section -->
|
| 118 |
+
<div class="action-buttons">
|
| 119 |
+
<div class="card">
|
| 120 |
+
<img src="{{ url_for('static', filename='diet.jpg') }}" alt="Diet Plan">
|
| 121 |
+
<button onclick="window.location.href='/diet'">Diet Plan</button>
|
| 122 |
+
</div>
|
| 123 |
+
<div class="card">
|
| 124 |
+
<img src="{{ url_for('static', filename='progress_workout.jpg') }}" alt="Start Workout">
|
| 125 |
+
<button onclick="handleClick('{{ workouts_List }}')">Start Workout</button>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
</div>
|
| 129 |
+
<script>
|
| 130 |
+
// Function to handle plan selection (on card click)
|
| 131 |
+
function handleClick(planName) {
|
| 132 |
+
// Redirect to the plan's details page or trigger any other action
|
| 133 |
+
planName = planName.trim();
|
| 134 |
+
planName = planName.replace(/ /g,"-")
|
| 135 |
+
console.log(planName)
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|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>DIET PLAN</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: Arial, sans-serif;
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 20px;
|
| 12 |
+
background-image: url('{{ url_for('static', filename='vegetable-salad-wooden-board-with-measuring-tape-table.jpg') }}'); /* Page background image */
|
| 13 |
+
background-size: cover;
|
| 14 |
+
background-position: center;
|
| 15 |
+
background-attachment: fixed; /* Makes the background image stay in place */
|
| 16 |
+
color: #ffa500;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
h1 {
|
| 20 |
+
text-align: center;
|
| 21 |
+
margin-bottom: 30px;
|
| 22 |
+
font-size: 2.5em;
|
| 23 |
+
text-shadow: 2px 2px 5px #000;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.card-container {
|
| 27 |
+
display: flex;
|
| 28 |
+
flex-wrap: wrap;
|
| 29 |
+
gap: 20px;
|
| 30 |
+
justify-content: center;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.card {
|
| 34 |
+
background-color: rgba(34, 34, 34, 0.9);
|
| 35 |
+
border: 2px solid #b4b2ad;
|
| 36 |
+
border-radius: 10px;
|
| 37 |
+
padding: 20px;
|
| 38 |
+
color: #ffffff;
|
| 39 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
|
| 40 |
+
width: 300px;
|
| 41 |
+
position: relative;
|
| 42 |
+
overflow: hidden;
|
| 43 |
+
transition: transform 0.3s, box-shadow 0.3s;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.card h2 {
|
| 47 |
+
margin: 0 0 10px;
|
| 48 |
+
font-size: 1.5em;
|
| 49 |
+
text-shadow: 1px 1px 3px #000;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.card p {
|
| 53 |
+
margin: 5px 0;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.card:hover {
|
| 57 |
+
transform: scale(1.05);
|
| 58 |
+
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.7);
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.suggestions-container {
|
| 62 |
+
margin-top: 40px;
|
| 63 |
+
padding: 20px;
|
| 64 |
+
background-color: rgba(51, 51, 51, 0.9);
|
| 65 |
+
border-radius: 10px;
|
| 66 |
+
border: 2px solid #c2c0bc;
|
| 67 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.suggestions-container h2 {
|
| 71 |
+
text-align: center;
|
| 72 |
+
margin-bottom: 20px;
|
| 73 |
+
text-shadow: 2px 2px 5px #000;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.suggestion {
|
| 77 |
+
background-color: rgba(34, 34, 34, 0.8);
|
| 78 |
+
padding: 10px;
|
| 79 |
+
border-radius: 5px;
|
| 80 |
+
margin: 5px 0;
|
| 81 |
+
border: 1px solid #c9c8c4;
|
| 82 |
+
color: #fff;
|
| 83 |
+
transition: background-color 0.3s, transform 0.3s;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.suggestion:hover {
|
| 87 |
+
background-color: rgba(51, 51, 51, 0.9);
|
| 88 |
+
transform: scale(1.03);
|
| 89 |
+
box-shadow: 0 4px 10px rgba(255, 165, 0, 0.8);
|
| 90 |
+
}
|
| 91 |
+
</style>
|
| 92 |
+
</head>
|
| 93 |
+
<body>
|
| 94 |
+
<h1>DIET PLAN</h1>
|
| 95 |
+
<div class="card-container" id="diet-container"></div>
|
| 96 |
+
<div class="suggestions-container">
|
| 97 |
+
<h2>Diet Suggestions</h2>
|
| 98 |
+
<div id="diet-suggestions"></div>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<script>
|
| 102 |
+
// Fetch and render diet plan from Flask
|
| 103 |
+
fetch('/diet-data')
|
| 104 |
+
.then(response => response.json())
|
| 105 |
+
.then(data => {
|
| 106 |
+
const dietContainer = document.getElementById('diet-container');
|
| 107 |
+
const dietSuggestions = document.getElementById('diet-suggestions');
|
| 108 |
+
|
| 109 |
+
// Render meal cards for Breakfast, Lunch, Snacks, Dinner
|
| 110 |
+
for (const [meal, items] of Object.entries(data)) {
|
| 111 |
+
if (meal !== 'dietSuggestions') {
|
| 112 |
+
items.forEach(item => {
|
| 113 |
+
const card = document.createElement('div');
|
| 114 |
+
card.classList.add('card');
|
| 115 |
+
|
| 116 |
+
const heading = document.createElement('h2');
|
| 117 |
+
heading.textContent = meal;
|
| 118 |
+
card.appendChild(heading);
|
| 119 |
+
|
| 120 |
+
const description = document.createElement('p');
|
| 121 |
+
description.innerHTML = `<strong>Description:</strong> ${item.description}`;
|
| 122 |
+
card.appendChild(description);
|
| 123 |
+
|
| 124 |
+
const time = document.createElement('p');
|
| 125 |
+
time.innerHTML = `<strong>Time:</strong> ${item.time}`;
|
| 126 |
+
card.appendChild(time);
|
| 127 |
+
|
| 128 |
+
dietContainer.appendChild(card);
|
| 129 |
+
});
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
// Render diet suggestions
|
| 134 |
+
data.dietSuggestions.forEach(suggestion => {
|
| 135 |
+
const suggestionDiv = document.createElement('div');
|
| 136 |
+
suggestionDiv.classList.add('suggestion');
|
| 137 |
+
suggestionDiv.textContent = suggestion.tip;
|
| 138 |
+
dietSuggestions.appendChild(suggestionDiv);
|
| 139 |
+
});
|
| 140 |
+
})
|
| 141 |
+
.catch(error => {
|
| 142 |
+
console.error('Error fetching diet data:', error);
|
| 143 |
+
});
|
| 144 |
+
</script>
|
| 145 |
+
</body>
|
| 146 |
+
</html>
|
templates/feed_back.html
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>User Progress</title>
|
| 7 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 8 |
+
<style>
|
| 9 |
+
body {
|
| 10 |
+
font-family: Arial, sans-serif;
|
| 11 |
+
background-color: #000; /* Black background */
|
| 12 |
+
background-image: url('pexels-pranjall-kumar-150768-7849087.jpg'); /* Optional: Add your background image here */
|
| 13 |
+
background-size: cover; /* Cover the entire page */
|
| 14 |
+
background-position: center;
|
| 15 |
+
color: #fff; /* White text for contrast */
|
| 16 |
+
margin: 0;
|
| 17 |
+
padding: 20px;
|
| 18 |
+
}
|
| 19 |
+
.container {
|
| 20 |
+
max-width: 900px;
|
| 21 |
+
margin: auto;
|
| 22 |
+
text-align: center;
|
| 23 |
+
}
|
| 24 |
+
h1 {
|
| 25 |
+
color: #fff;
|
| 26 |
+
}
|
| 27 |
+
canvas {
|
| 28 |
+
max-width: 100%;
|
| 29 |
+
height: 200px; /* Smaller pie charts */
|
| 30 |
+
margin-top: 20px;
|
| 31 |
+
}
|
| 32 |
+
.chart-container {
|
| 33 |
+
display: inline-block;
|
| 34 |
+
width: 250px; /* Smaller pie chart size */
|
| 35 |
+
margin: 10px;
|
| 36 |
+
}
|
| 37 |
+
</style>
|
| 38 |
+
</head>
|
| 39 |
+
<body>
|
| 40 |
+
<div class="container">
|
| 41 |
+
<h1>User Progress</h1>
|
| 42 |
+
|
| 43 |
+
<!-- Daily Pie Chart -->
|
| 44 |
+
<div class="chart-container">
|
| 45 |
+
<h3>Daily Rest vs. Workout Time</h3>
|
| 46 |
+
<canvas id="dailyPieChart"></canvas>
|
| 47 |
+
</div>
|
| 48 |
+
|
| 49 |
+
<!-- Weekly Pie Chart -->
|
| 50 |
+
<div class="chart-container">
|
| 51 |
+
<h3>Weekly Rest vs. Workout Time</h3>
|
| 52 |
+
<canvas id="weeklyPieChart"></canvas>
|
| 53 |
+
</div>
|
| 54 |
+
|
| 55 |
+
<!-- Daily Progress Bar Chart -->
|
| 56 |
+
<h3>Daily Progress</h3>
|
| 57 |
+
<canvas id="dailyProgressChart"></canvas>
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
<script>
|
| 61 |
+
// Fetch the data from feedback.json
|
| 62 |
+
fetch('static/feedback.json')
|
| 63 |
+
.then(response => response.json())
|
| 64 |
+
.then(data => {
|
| 65 |
+
const dailyProgress = data.daily_progress;
|
| 66 |
+
const weeklySummary = data.weekly_summary;
|
| 67 |
+
|
| 68 |
+
// Daily Pie Chart (Rest vs. Workout)
|
| 69 |
+
const dailyRestTime = dailyProgress.map(item => item.rest_time);
|
| 70 |
+
const dailyWorkoutTime = dailyProgress.map(item => item.workout_time);
|
| 71 |
+
|
| 72 |
+
const ctxDailyPie = document.getElementById('dailyPieChart').getContext('2d');
|
| 73 |
+
new Chart(ctxDailyPie, {
|
| 74 |
+
type: 'pie',
|
| 75 |
+
data: {
|
| 76 |
+
labels: ['Rest Time', 'Workout Time'],
|
| 77 |
+
datasets: [{
|
| 78 |
+
data: [
|
| 79 |
+
dailyRestTime.reduce((a, b) => a + b, 0),
|
| 80 |
+
dailyWorkoutTime.reduce((a, b) => a + b, 0)
|
| 81 |
+
],
|
| 82 |
+
backgroundColor: ['#ffa500', '#9E9E9E'] /* Orange and Grey */
|
| 83 |
+
}]
|
| 84 |
+
},
|
| 85 |
+
options: {
|
| 86 |
+
responsive: true,
|
| 87 |
+
plugins: {
|
| 88 |
+
legend: {
|
| 89 |
+
position: 'top',
|
| 90 |
+
labels: {
|
| 91 |
+
color: '#fff' /* White text for legend */
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
});
|
| 97 |
+
|
| 98 |
+
// Weekly Pie Chart (Rest vs. Workout)
|
| 99 |
+
const ctxWeeklyPie = document.getElementById('weeklyPieChart').getContext('2d');
|
| 100 |
+
new Chart(ctxWeeklyPie, {
|
| 101 |
+
type: 'pie',
|
| 102 |
+
data: {
|
| 103 |
+
labels: ['Rest Time', 'Workout Time'],
|
| 104 |
+
datasets: [{
|
| 105 |
+
data: [weeklySummary.rest_time, weeklySummary.workout_time],
|
| 106 |
+
backgroundColor: ['#ffa500', '#9E9E9E'] /* Orange and Grey */
|
| 107 |
+
}]
|
| 108 |
+
},
|
| 109 |
+
options: {
|
| 110 |
+
responsive: true,
|
| 111 |
+
plugins: {
|
| 112 |
+
legend: {
|
| 113 |
+
position: 'top',
|
| 114 |
+
labels: {
|
| 115 |
+
color: '#fff' /* White text for legend */
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
});
|
| 121 |
+
|
| 122 |
+
// Daily Progress Bar Chart (with points touching)
|
| 123 |
+
const labels = dailyProgress.map(item => item.day);
|
| 124 |
+
const progressData = dailyProgress.map(item => item.progress);
|
| 125 |
+
|
| 126 |
+
const ctxBar = document.getElementById('dailyProgressChart').getContext('2d');
|
| 127 |
+
new Chart(ctxBar, {
|
| 128 |
+
type: 'line',
|
| 129 |
+
data: {
|
| 130 |
+
labels: labels,
|
| 131 |
+
datasets: [{
|
| 132 |
+
label: 'Daily Progress (%)',
|
| 133 |
+
data: progressData,
|
| 134 |
+
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
| 135 |
+
borderColor: 'rgba(75, 192, 192, 1)',
|
| 136 |
+
borderWidth: 1,
|
| 137 |
+
fill: true,
|
| 138 |
+
tension: 0.4, // Smooth the line
|
| 139 |
+
pointBackgroundColor: 'rgba(75, 192, 192, 1)', // Points will touch the line
|
| 140 |
+
pointBorderWidth: 2
|
| 141 |
+
}]
|
| 142 |
+
},
|
| 143 |
+
options: {
|
| 144 |
+
scales: {
|
| 145 |
+
y: {
|
| 146 |
+
beginAtZero: true,
|
| 147 |
+
ticks: {
|
| 148 |
+
stepSize: 10
|
| 149 |
+
},
|
| 150 |
+
grid: {
|
| 151 |
+
color: '#9E9E9E' /* Grey grid lines */
|
| 152 |
+
}
|
| 153 |
+
},
|
| 154 |
+
x: {
|
| 155 |
+
grid: {
|
| 156 |
+
color: '#9E9E9E' /* Grey grid lines */
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
},
|
| 160 |
+
plugins: {
|
| 161 |
+
legend: {
|
| 162 |
+
labels: {
|
| 163 |
+
color: '#fff' /* White legend text */
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
}
|
| 167 |
+
}
|
| 168 |
+
});
|
| 169 |
+
})
|
| 170 |
+
.catch(error => console.error('Error loading the feedback data:', error));
|
| 171 |
+
</script>
|
| 172 |
+
</body>
|
| 173 |
+
</html>
|
templates/index.html
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>NRI HACKS</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* Basic Reset */
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
box-sizing: border-box;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
body {
|
| 16 |
+
font-family: Arial, sans-serif;
|
| 17 |
+
background-color: #000000; /* Black background */
|
| 18 |
+
color: #ffa500; /* Orange text */
|
| 19 |
+
display: flex;
|
| 20 |
+
justify-content: center;
|
| 21 |
+
align-items: center;
|
| 22 |
+
height: 100vh;
|
| 23 |
+
background-image: url('{{ url_for('static', filename='index.jpg') }}'); /* Add your image path here */
|
| 24 |
+
background-size: cover; /* Ensure the image covers the entire background */
|
| 25 |
+
background-position: center; /* Center the image */
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.form-container {
|
| 29 |
+
width: 100%;
|
| 30 |
+
max-width: 450px;
|
| 31 |
+
background-color: rgba(51, 51, 51, 0.8); /* Dark background with opacity for the form */
|
| 32 |
+
padding: 20px;
|
| 33 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 34 |
+
border-radius: 8px;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
h2 {
|
| 38 |
+
text-align: center;
|
| 39 |
+
color: #ffa500; /* Orange text */
|
| 40 |
+
margin-bottom: 20px;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.form-group {
|
| 44 |
+
margin-bottom: 15px;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.form-group label {
|
| 48 |
+
font-size: 14px;
|
| 49 |
+
color: #ffa500; /* Orange text */
|
| 50 |
+
display: block;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.form-group input,
|
| 54 |
+
.form-group select {
|
| 55 |
+
width: 100%;
|
| 56 |
+
padding: 10px;
|
| 57 |
+
font-size: 14px;
|
| 58 |
+
border: 1px solid #ffa500; /* Orange border */
|
| 59 |
+
border-radius: 5px;
|
| 60 |
+
margin-top: 5px;
|
| 61 |
+
background-color: #222222; /* Dark background for input fields */
|
| 62 |
+
color: #ffa500; /* Orange text in inputs */
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.form-group input[type="submit"] {
|
| 66 |
+
background-color: #ffa500; /* Orange background for submit button */
|
| 67 |
+
color: black;
|
| 68 |
+
border: none;
|
| 69 |
+
cursor: pointer;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.form-group input[type="submit"]:hover {
|
| 73 |
+
background-color: #cc8400; /* Darker orange on hover */
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.switch-form {
|
| 77 |
+
text-align: center;
|
| 78 |
+
font-size: 14px;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.switch-form span {
|
| 82 |
+
color: #d5d2cd; /* Orange text */
|
| 83 |
+
cursor: pointer;
|
| 84 |
+
font-weight: bold;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.form-content {
|
| 88 |
+
display: none;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.form-content.active {
|
| 92 |
+
display: block;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
#registration-form .form-group {
|
| 96 |
+
display: block;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
#registration-form .form-group input,
|
| 100 |
+
#registration-form .form-group select {
|
| 101 |
+
width: 100%;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
#registration-form .form-group input[type="submit"] {
|
| 105 |
+
margin-top: 10px;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
/* Gender dropdown style (no default selection) */
|
| 109 |
+
#registration-form .form-group select {
|
| 110 |
+
padding: 10px;
|
| 111 |
+
border-radius: 5px;
|
| 112 |
+
border: 1px solid #ffa500; /* Orange border */
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
/* Fixing the age input size issue */
|
| 116 |
+
#registration-form .form-group input#age {
|
| 117 |
+
width: 100%;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
/* Style for the age, height, weight fields side by side */
|
| 121 |
+
#registration-form .form-group input#height,
|
| 122 |
+
#registration-form .form-group input#weight {
|
| 123 |
+
width: 48%;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
#registration-form .form-group {
|
| 127 |
+
display: flex;
|
| 128 |
+
justify-content: space-between;
|
| 129 |
+
gap: 4%;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
/* Mobile responsiveness */
|
| 133 |
+
@media (max-width: 500px) {
|
| 134 |
+
.form-container {
|
| 135 |
+
width: 90%;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
#registration-form .form-group {
|
| 139 |
+
display: block;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
#registration-form .form-group input,
|
| 143 |
+
#registration-form .form-group select {
|
| 144 |
+
width: 100%;
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
</style>
|
| 148 |
+
</head>
|
| 149 |
+
<body>
|
| 150 |
+
|
| 151 |
+
<div class="form-container">
|
| 152 |
+
<!-- Login Form -->
|
| 153 |
+
<div id="login-form" class="form-content active">
|
| 154 |
+
<h2>Login</h2>
|
| 155 |
+
<form id="login-form-element" method="post">
|
| 156 |
+
<div class="form-group">
|
| 157 |
+
<label for="login-email">Email:</label>
|
| 158 |
+
<input type="email" id="login-email" name="email" required />
|
| 159 |
+
</div>
|
| 160 |
+
<div class="form-group">
|
| 161 |
+
<label for="login-password">Password:</label>
|
| 162 |
+
<input type="password" id="login-password" name="password" required />
|
| 163 |
+
</div>
|
| 164 |
+
<div class="form-group">
|
| 165 |
+
<input type="submit" value="Login" />
|
| 166 |
+
</div>
|
| 167 |
+
<p class="switch-form">Don't have an account? <span id="to-register">Sign up</span></p>
|
| 168 |
+
</form>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<!-- Registration Form -->
|
| 172 |
+
<div id="registration-form" class="form-content">
|
| 173 |
+
<h2>Sign Up</h2>
|
| 174 |
+
<form id="registration-form-element" method="post">
|
| 175 |
+
<div class="form-group">
|
| 176 |
+
<label for="name">Name:</label>
|
| 177 |
+
<input type="text" id="name" name="name" required />
|
| 178 |
+
</div>
|
| 179 |
+
<div class="form-group">
|
| 180 |
+
<label for="email">Email:</label>
|
| 181 |
+
<input type="email" id="email" name="email" required />
|
| 182 |
+
</div>
|
| 183 |
+
<div class="form-group">
|
| 184 |
+
<label for="password">Password:</label>
|
| 185 |
+
<input type="password" id="password" name="password" required />
|
| 186 |
+
</div>
|
| 187 |
+
<div class="form-group">
|
| 188 |
+
<label for="age">Age:</label>
|
| 189 |
+
<input type="number" id="age" name="age" required />
|
| 190 |
+
</div>
|
| 191 |
+
<div class="form-group">
|
| 192 |
+
<label for="height">Height (cm):</label>
|
| 193 |
+
<input type="number" id="height" name="height" required />
|
| 194 |
+
</div>
|
| 195 |
+
<div class="form-group">
|
| 196 |
+
<label for="weight">Weight (kg):</label>
|
| 197 |
+
<input type="number" id="weight" name="weight" required />
|
| 198 |
+
</div>
|
| 199 |
+
<div class="form-group">
|
| 200 |
+
<label for="max-pullups">Max Pullups:</label>
|
| 201 |
+
<input type="number" id="max-pullups" name="maxPullups" required />
|
| 202 |
+
</div>
|
| 203 |
+
<div class="form-group">
|
| 204 |
+
<label for="min-pullups">Min Pullups:</label>
|
| 205 |
+
<input type="number" id="min-pullups" name="minPullups" required />
|
| 206 |
+
</div>
|
| 207 |
+
<div class="form-group">
|
| 208 |
+
<label for="gender">Gender:</label>
|
| 209 |
+
<select id="gender" name="gender" required>
|
| 210 |
+
<option value="male">Male</option>
|
| 211 |
+
<option value="female">Female</option>
|
| 212 |
+
<option value="other">Other</option>
|
| 213 |
+
</select>
|
| 214 |
+
</div>
|
| 215 |
+
<div class="form-group">
|
| 216 |
+
<input type="submit" value="Sign Up" />
|
| 217 |
+
</div>
|
| 218 |
+
<p class="switch-form">Already have an account? <span id="to-login">Login</span></p>
|
| 219 |
+
</form>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<script>
|
| 224 |
+
document.getElementById("to-register").addEventListener("click", function() {
|
| 225 |
+
document.getElementById("login-form").classList.remove("active");
|
| 226 |
+
document.getElementById("registration-form").classList.add("active");
|
| 227 |
+
});
|
| 228 |
+
|
| 229 |
+
document.getElementById("to-login").addEventListener("click", function() {
|
| 230 |
+
document.getElementById("registration-form").classList.remove("active");
|
| 231 |
+
document.getElementById("login-form").classList.add("active");
|
| 232 |
+
});
|
| 233 |
+
|
| 234 |
+
// Registration form submit
|
| 235 |
+
document.getElementById("registration-form-element").addEventListener("submit", function(event) {
|
| 236 |
+
event.preventDefault(); // Prevent the form from submitting normally
|
| 237 |
+
|
| 238 |
+
const name = document.getElementById("name").value;
|
| 239 |
+
const email = document.getElementById("email").value;
|
| 240 |
+
const password = document.getElementById("password").value;
|
| 241 |
+
const age = document.getElementById("age").value;
|
| 242 |
+
const height = document.getElementById("height").value;
|
| 243 |
+
const weight = document.getElementById("weight").value;
|
| 244 |
+
const maxPullups = document.getElementById("max-pullups").value;
|
| 245 |
+
const minPullups = document.getElementById("min-pullups").value;
|
| 246 |
+
const gender = document.getElementById("gender").value;
|
| 247 |
+
|
| 248 |
+
fetch("/register", {
|
| 249 |
+
method: "POST",
|
| 250 |
+
headers: {
|
| 251 |
+
"Content-Type": "application/json"
|
| 252 |
+
},
|
| 253 |
+
body: JSON.stringify({
|
| 254 |
+
name,
|
| 255 |
+
email,
|
| 256 |
+
password,
|
| 257 |
+
age,
|
| 258 |
+
height,
|
| 259 |
+
weight,
|
| 260 |
+
maxPullups,
|
| 261 |
+
minPullups,
|
| 262 |
+
gender
|
| 263 |
+
})
|
| 264 |
+
})
|
| 265 |
+
.then(response => response.json())
|
| 266 |
+
.then(data => {
|
| 267 |
+
if (data.message) {
|
| 268 |
+
// alert(data.message);
|
| 269 |
+
window.location.href = "/home"; // Redirect after successful registration
|
| 270 |
+
} else {
|
| 271 |
+
// alert(data.error);
|
| 272 |
+
}
|
| 273 |
+
})
|
| 274 |
+
.catch(error => {
|
| 275 |
+
console.error("Error during registration:", error);
|
| 276 |
+
alert("An error occurred during registration");
|
| 277 |
+
});
|
| 278 |
+
});
|
| 279 |
+
|
| 280 |
+
// Login form submit
|
| 281 |
+
document.getElementById("login-form-element").addEventListener("submit", function(event) {
|
| 282 |
+
event.preventDefault(); // Prevent the form from submitting normally
|
| 283 |
+
|
| 284 |
+
const email = document.getElementById("login-email").value;
|
| 285 |
+
const password = document.getElementById("login-password").value;
|
| 286 |
+
|
| 287 |
+
fetch("/login", {
|
| 288 |
+
method: "POST",
|
| 289 |
+
headers: {
|
| 290 |
+
"Content-Type": "application/json"
|
| 291 |
+
},
|
| 292 |
+
body: JSON.stringify({
|
| 293 |
+
email: email,
|
| 294 |
+
password: password
|
| 295 |
+
})
|
| 296 |
+
})
|
| 297 |
+
.then(response => response.json())
|
| 298 |
+
.then(data => {
|
| 299 |
+
if (data.message) {
|
| 300 |
+
window.location.href = "/home"; // Redirect after successful login
|
| 301 |
+
} else {
|
| 302 |
+
alert(data.error);
|
| 303 |
+
}
|
| 304 |
+
})
|
| 305 |
+
.catch(error => {
|
| 306 |
+
console.error("Error during login:", error);
|
| 307 |
+
alert("An error occurred during login");
|
| 308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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Fitness Plan Recommendation</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* Basic Reset */
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
box-sizing: border-box;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
body {
|
| 16 |
+
font-family: Arial, sans-serif;
|
| 17 |
+
color: #ffa500; /* Orange text */
|
| 18 |
+
display: flex;
|
| 19 |
+
justify-content: center;
|
| 20 |
+
align-items: center;
|
| 21 |
+
height: 100vh;
|
| 22 |
+
background-image: url('{{ url_for('static', filename='new_user.jpg') }}'); /* Reference the image */
|
| 23 |
+
background-size: cover; /* Ensure the image covers the entire background */
|
| 24 |
+
background-position: center; /* Center the image */
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.container {
|
| 28 |
+
width: 90%;
|
| 29 |
+
max-width: 800px;
|
| 30 |
+
background-color: rgba(51, 51, 51, 0.8); /* Transparent black */
|
| 31 |
+
padding: 20px;
|
| 32 |
+
border-radius: 10px;
|
| 33 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
|
| 34 |
+
text-align: center;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
h1 {
|
| 38 |
+
font-size: 2.5em;
|
| 39 |
+
color: #ffa500; /* Orange text */
|
| 40 |
+
margin-bottom: 20px;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
p {
|
| 44 |
+
font-size: 1.2em;
|
| 45 |
+
color: #f0e68c; /* Lighter yellowish color for description */
|
| 46 |
+
margin-bottom: 30px;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.plan-options {
|
| 50 |
+
display: flex;
|
| 51 |
+
flex-wrap: wrap;
|
| 52 |
+
gap: 10px;
|
| 53 |
+
justify-content: center;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.plan-card {
|
| 57 |
+
background-color: #222222; /* Dark card background */
|
| 58 |
+
border: 2px solid #ffa500; /* Orange border */
|
| 59 |
+
border-radius: 8px;
|
| 60 |
+
width: 300px;
|
| 61 |
+
padding: 20px;
|
| 62 |
+
text-align: center;
|
| 63 |
+
color: #ffa500; /* Orange text */
|
| 64 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
| 65 |
+
transition: transform 0.3s, background-color 0.3s;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.plan-card:hover {
|
| 69 |
+
transform: scale(1.05);
|
| 70 |
+
background-color: #333333;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.plan-card h2 {
|
| 74 |
+
font-size: 1.8em;
|
| 75 |
+
margin-bottom: 10px;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.plan-card p {
|
| 79 |
+
font-size: 1em;
|
| 80 |
+
margin-bottom: 20px;
|
| 81 |
+
color: #f0e68c;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.select-btn {
|
| 85 |
+
background-color: #ffa500; /* Orange button */
|
| 86 |
+
color: black; /* Black text */
|
| 87 |
+
font-size: 1.1em;
|
| 88 |
+
padding: 10px 20px;
|
| 89 |
+
border: none;
|
| 90 |
+
border-radius: 5px;
|
| 91 |
+
cursor: pointer;
|
| 92 |
+
transition: background-color 0.3s;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.select-btn:hover {
|
| 96 |
+
background-color: #cc8400; /* Darker orange on hover */
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
/* Recommended Plan Card Styling */
|
| 100 |
+
.recommended-plan {
|
| 101 |
+
background-color: #444444; /* Darker background for recommended plan */
|
| 102 |
+
border: 2px solid #09ef20; /* Lighter red-orange border */
|
| 103 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
#selected-plan {
|
| 107 |
+
display: none;
|
| 108 |
+
font-size: 1.5em;
|
| 109 |
+
color: #ffa500;
|
| 110 |
+
margin-top: 30px;
|
| 111 |
+
}
|
| 112 |
+
</style>
|
| 113 |
+
</head>
|
| 114 |
+
<body>
|
| 115 |
+
<div class="container">
|
| 116 |
+
<header>
|
| 117 |
+
<h1>Welcome to Your Personalized Fitness Plan</h1>
|
| 118 |
+
<p>Please choose your fitness goal to get started:</p>
|
| 119 |
+
</header>
|
| 120 |
+
|
| 121 |
+
<div class="plan-options">
|
| 122 |
+
<div class="plan-card recommended-plan" onclick="handleClick({{ recommended_plan }})">
|
| 123 |
+
<h2>Recommended Plan: {{ recommended_plan }}</h2>
|
| 124 |
+
<p>Based on your preferences, we recommend the <strong>{{ recommended_plan }}</strong> plan to help you achieve your fitness goals!</p>
|
| 125 |
+
<button class="select-btn" onclick="handleClick('{{ recommended_plan }}')">Select Plan</button>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<!-- Available Plans Selection -->
|
| 129 |
+
<div class="plan-selection">
|
| 130 |
+
<!-- Loop through available plans -->
|
| 131 |
+
{% for plan in available_plans %}
|
| 132 |
+
<div class="plan-card">
|
| 133 |
+
<h2>{{ plan.name }}</h2>
|
| 134 |
+
<p>{{ plan.description }}</p>
|
| 135 |
+
<!-- Correct the onclick attribute -->
|
| 136 |
+
<button class="select-btn" onclick="handleClick('{{ plan.name }}')">Select Plan</button>
|
| 137 |
+
</div>
|
| 138 |
+
{% endfor %}
|
| 139 |
+
|
| 140 |
+
<div class="plan-card">
|
| 141 |
+
<h2>Progress Track</h2>
|
| 142 |
+
<p>Tracks the information about user workouts</p>
|
| 143 |
+
|
| 144 |
+
<button class="select-btn" onclick="handleClick('progress')">Show</button>
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
<!-- Display Recommended Plan -->
|
| 149 |
+
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
<script>
|
| 153 |
+
// Function to handle plan selection (on card click)
|
| 154 |
+
function handleClick(planName) {
|
| 155 |
+
// Redirect to the plan's details page or trigger any other action
|
| 156 |
+
planName = planName.trim();
|
| 157 |
+
planName = planName.replace(/ /g,"-")
|
| 158 |
+
console.log(planName)
|
| 159 |
+
window.location.href = '/' +planName; // Ensure the plan name is URL-safe
|
| 160 |
+
}
|
| 161 |
+
</script>
|
| 162 |
+
</body>
|
| 163 |
+
</html>
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
|
templates/workouts_List.html
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Exercise Video Upload</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* Basic Reset */
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
box-sizing: border-box;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
body {
|
| 16 |
+
font-family: Arial, sans-serif;
|
| 17 |
+
background-image: url('{{ url_for('static', filename='workouts_list.jpg') }}'); /* Replace with your image URL */
|
| 18 |
+
background-size: cover; /* Ensure the image covers the entire background */
|
| 19 |
+
background-position: center; /* Center the image */
|
| 20 |
+
background-attachment: fixed; /* Keep the background fixed while scrolling */
|
| 21 |
+
color: #ffa500; /* Orange text */
|
| 22 |
+
padding: 20px;
|
| 23 |
+
text-align: center;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
h1, h2 {
|
| 27 |
+
color: #ffa500; /* Orange text */
|
| 28 |
+
margin-bottom: 20px;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.exercise-container {
|
| 32 |
+
display: flex;
|
| 33 |
+
flex-direction: column; /* Stack cards vertically */
|
| 34 |
+
justify-content: center;
|
| 35 |
+
align-items: center;
|
| 36 |
+
gap: 30px; /* Spacing between cards */
|
| 37 |
+
max-width: 800px; /* Limit container width */
|
| 38 |
+
margin: 0 auto; /* Center the container */
|
| 39 |
+
overflow-y: auto; /* Enable scrolling if needed */
|
| 40 |
+
padding: 10px;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.exercise-card {
|
| 44 |
+
background-color: rgba(34, 34, 34, 0.8); /* Dark background with transparency */
|
| 45 |
+
border: 2px solid #ffa500; /* Orange border */
|
| 46 |
+
border-radius: 8px;
|
| 47 |
+
width: 100%; /* Full width of container */
|
| 48 |
+
max-width: 500px; /* Restrict maximum width */
|
| 49 |
+
padding: 20px;
|
| 50 |
+
text-align: center;
|
| 51 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
|
| 52 |
+
transition: transform 0.3s, box-shadow 0.3s;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.exercise-card:hover {
|
| 56 |
+
transform: translateY(-10px);
|
| 57 |
+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.exercise-card h2 {
|
| 61 |
+
font-size: 1.5em;
|
| 62 |
+
color: #ffa500; /* Orange text */
|
| 63 |
+
margin-bottom: 10px;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.exercise-card p {
|
| 67 |
+
font-size: 1.2em;
|
| 68 |
+
color: #ddd; /* Lighter text */
|
| 69 |
+
margin-bottom: 15px;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.upload-container {
|
| 73 |
+
display: flex;
|
| 74 |
+
flex-direction: column; /* Stack elements vertically */
|
| 75 |
+
align-items: center; /* Center align elements */
|
| 76 |
+
gap: 10px; /* Space between input and button */
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
/* Hidden file input */
|
| 80 |
+
.hidden-file-input {
|
| 81 |
+
position: absolute;
|
| 82 |
+
opacity: 0;
|
| 83 |
+
width: 0;
|
| 84 |
+
height: 0;
|
| 85 |
+
pointer-events: none;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
/* Upload icon styling */
|
| 89 |
+
.upload-symbol {
|
| 90 |
+
background-color: #ffa500; /* Orange background */
|
| 91 |
+
color: black;
|
| 92 |
+
border: none;
|
| 93 |
+
border-radius: 50%;
|
| 94 |
+
width: 50px;
|
| 95 |
+
height: 50px;
|
| 96 |
+
display: flex;
|
| 97 |
+
justify-content: center;
|
| 98 |
+
align-items: center;
|
| 99 |
+
cursor: pointer;
|
| 100 |
+
font-size: 1.5em;
|
| 101 |
+
transition: background-color 0.3s;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.upload-symbol:hover {
|
| 105 |
+
background-color: #cc8400; /* Darker orange on hover */
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
/* Upload button styling */
|
| 109 |
+
.upload-btn {
|
| 110 |
+
background-color: #ffa500; /* Orange button */
|
| 111 |
+
color: black;
|
| 112 |
+
font-size: 1em;
|
| 113 |
+
padding: 10px 20px;
|
| 114 |
+
border: none;
|
| 115 |
+
border-radius: 5px;
|
| 116 |
+
cursor: pointer;
|
| 117 |
+
transition: background-color 0.3s;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.upload-btn:hover {
|
| 121 |
+
background-color: #cc8400; /* Darker orange on hover */
|
| 122 |
+
}
|
| 123 |
+
/* Finish button styling */
|
| 124 |
+
.finish-btn {
|
| 125 |
+
background-color: #ffa500; /* Orange button */
|
| 126 |
+
color: black;
|
| 127 |
+
font-size: 1em;
|
| 128 |
+
padding: 10px 20px;
|
| 129 |
+
border: none;
|
| 130 |
+
border-radius: 5px;
|
| 131 |
+
cursor: pointer;
|
| 132 |
+
transition: background-color 0.3s;
|
| 133 |
+
margin-top: 15px; /* Space from the other buttons */
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.finish-btn:hover {
|
| 137 |
+
background-color: #cc8400; /* Darker orange on hover */
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
/* Card scrolling animation */
|
| 141 |
+
@keyframes scroll-animation {
|
| 142 |
+
0% {
|
| 143 |
+
opacity: 0;
|
| 144 |
+
transform: translateY(50px);
|
| 145 |
+
}
|
| 146 |
+
100% {
|
| 147 |
+
opacity: 1;
|
| 148 |
+
transform: translateY(0);
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
/* Responsive Design */
|
| 153 |
+
@media (max-width: 768px) {
|
| 154 |
+
.exercise-card {
|
| 155 |
+
width: 90%;
|
| 156 |
+
}
|
| 157 |
+
}
|
| 158 |
+
</style>
|
| 159 |
+
</head>
|
| 160 |
+
<body>
|
| 161 |
+
<header>
|
| 162 |
+
<h1>Exercise List</h1>
|
| 163 |
+
<p>Upload a video for each exercise you perform!</p>
|
| 164 |
+
</header>
|
| 165 |
+
|
| 166 |
+
<div class="exercise-container">
|
| 167 |
+
<!-- Dynamically render exercises -->
|
| 168 |
+
{% for exercise in exercises %}
|
| 169 |
+
<div class="exercise-card">
|
| 170 |
+
<h2>{{ exercise.name }}</h2>
|
| 171 |
+
<p>Repetitions: {{ exercise.reps }}</p>
|
| 172 |
+
<form class="upload-container" action="/upload-video/{{ exercise.name }}" method="POST" enctype="multipart/form-data">
|
| 173 |
+
<!-- Hidden file input -->
|
| 174 |
+
<input type="file" name="video" accept="video/*" class="hidden-file-input" id="upload-{{ loop.index }}" required>
|
| 175 |
+
<!-- Custom label acting as the upload button -->
|
| 176 |
+
<label for="upload-{{ loop.index }}" class="upload-symbol">📤</label>
|
| 177 |
+
<!-- Submit button -->
|
| 178 |
+
<button type="submit" class="upload-btn">Start</button>
|
| 179 |
+
</form>
|
| 180 |
+
</div>
|
| 181 |
+
{% endfor %}
|
| 182 |
+
<button class="finish-btn" onclick="window.location.href='/daily-report'">Finish</button>
|
| 183 |
+
</div>
|
| 184 |
+
|
| 185 |
+
<h2>Live Processed Video</h2>
|
| 186 |
+
<div>
|
| 187 |
+
<img id="videoStream" src="/video_feed" alt="Live Processed Video" style="width: 100%; max-width: 800px; margin-top: 20px;">
|
| 188 |
+
</div>
|
| 189 |
+
</body>
|
| 190 |
+
</html>
|