Spaces:
Sleeping
Sleeping
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Fitness Plan Recommendation</title> | |
| <style> | |
| /* Basic Reset */ | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: Arial, sans-serif; | |
| color: #ffa500; /* Orange text */ | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| height: 100vh; | |
| background-image: url('{{ url_for('static', filename='new_user.jpg') }}'); /* Reference the image */ | |
| background-size: cover; /* Ensure the image covers the entire background */ | |
| background-position: center; /* Center the image */ | |
| } | |
| .container { | |
| width: 90%; | |
| max-width: 800px; | |
| background-color: rgba(51, 51, 51, 0.8); /* Transparent black */ | |
| padding: 20px; | |
| border-radius: 10px; | |
| box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); | |
| text-align: center; | |
| } | |
| h1 { | |
| font-size: 2.5em; | |
| color: #ffa500; /* Orange text */ | |
| margin-bottom: 20px; | |
| } | |
| p { | |
| font-size: 1.2em; | |
| color: #f0e68c; /* Lighter yellowish color for description */ | |
| margin-bottom: 30px; | |
| } | |
| .plan-options { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 10px; | |
| justify-content: center; | |
| } | |
| .plan-card { | |
| background-color: #222222; /* Dark card background */ | |
| border: 2px solid #ffa500; /* Orange border */ | |
| border-radius: 8px; | |
| width: 300px; | |
| padding: 20px; | |
| text-align: center; | |
| color: #ffa500; /* Orange text */ | |
| box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); | |
| transition: transform 0.3s, background-color 0.3s; | |
| } | |
| .plan-card:hover { | |
| transform: scale(1.05); | |
| background-color: #333333; | |
| } | |
| .plan-card h2 { | |
| font-size: 1.8em; | |
| margin-bottom: 10px; | |
| } | |
| .plan-card p { | |
| font-size: 1em; | |
| margin-bottom: 20px; | |
| color: #f0e68c; | |
| } | |
| .select-btn { | |
| background-color: #ffa500; /* Orange button */ | |
| color: black; /* Black text */ | |
| font-size: 1.1em; | |
| padding: 10px 20px; | |
| border: none; | |
| border-radius: 5px; | |
| cursor: pointer; | |
| transition: background-color 0.3s; | |
| } | |
| .select-btn:hover { | |
| background-color: #cc8400; /* Darker orange on hover */ | |
| } | |
| /* Recommended Plan Card Styling */ | |
| .recommended-plan { | |
| background-color: #444444; /* Darker background for recommended plan */ | |
| border: 2px solid #09ef20; /* Lighter red-orange border */ | |
| box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); | |
| } | |
| #selected-plan { | |
| display: none; | |
| font-size: 1.5em; | |
| color: #ffa500; | |
| margin-top: 30px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <header> | |
| <h1>Welcome to Your Personalized Fitness Plan</h1> | |
| <p>Please choose your fitness goal to get started:</p> | |
| </header> | |
| <div class="plan-options"> | |
| <div class="plan-card recommended-plan" onclick="handleClick({{ recommended_plan }})"> | |
| <h2>Recommended Plan: {{ recommended_plan }}</h2> | |
| <p>Based on your preferences, we recommend the <strong>{{ recommended_plan }}</strong> plan to help you achieve your fitness goals!</p> | |
| <button class="select-btn" onclick="handleClick('{{ recommended_plan }}')">Select Plan</button> | |
| </div> | |
| <!-- Available Plans Selection --> | |
| <div class="plan-selection"> | |
| <!-- Loop through available plans --> | |
| {% for plan in available_plans %} | |
| <div class="plan-card"> | |
| <h2>{{ plan.name }}</h2> | |
| <p>{{ plan.description }}</p> | |
| <!-- Correct the onclick attribute --> | |
| <button class="select-btn" onclick="handleClick('{{ plan.name }}')">Select Plan</button> | |
| </div> | |
| {% endfor %} | |
| <div class="plan-card"> | |
| <h2>Progress Track</h2> | |
| <p>Tracks the information about user workouts</p> | |
| <button class="select-btn" onclick="handleClick('progress')">Show</button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Display Recommended Plan --> | |
| </div> | |
| <script> | |
| // Function to handle plan selection (on card click) | |
| function handleClick(planName) { | |
| // Redirect to the plan's details page or trigger any other action | |
| planName = planName.trim(); | |
| planName = planName.replace(/ /g,"-") | |
| console.log(planName) | |
| window.location.href = '/' +planName; // Ensure the plan name is URL-safe | |
| } | |
| </script> | |
| </body> | |
| </html> | |