commit d9d4219885995c4e309139531c909cdd10f1f23f
Author: root <root@hub.scroll.pub> Date: 2024-12-28 15:06:38 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..f784cb5 --- /dev/null +++ b/body.html @@ -0,0 +1,53 @@ +<header> + <h1>FitPlan</h1> + <p>Your Personalized Fitness Training Plan</p> +</header> + +<main> + <section class="form-section"> + <h2>Create Your Plan</h2> + <form id="fitnessForm"> + <div class="form-group"> + <label for="goal">Fitness Goal:</label> + <select id="goal" required> + <option value="">Select your goal</option> + <option value="weightLoss">Weight Loss</option> + <option value="muscleGain">Muscle Gain</option> + <option value="endurance">Endurance</option> + <option value="flexibility">Flexibility</option> + </select> + </div> + + <div class="form-group"> + <label for="level">Fitness Level:</label> + <select id="level" required> + <option value="">Select your level</option> + <option value="beginner">Beginner</option> + <option value="intermediate">Intermediate</option> + <option value="advanced">Advanced</option> + </select> + </div> + + <div class="form-group"> + <label for="time">Weekly Time Commitment:</label> + <select id="time" required> + <option value="">Select your time</option> + <option value="3">3 hours</option> + <option value="5">5 hours</option> + <option value="7">7+ hours</option> + </select> + </div> + + <button type="submit">Generate Plan</button> + </form> + </section> + + <section class="result-section" id="resultSection"> + <h2>Your Personalized Plan</h2> + <div id="planResult"></div> + </section> +</main> + +<footer> + <p>FitPlan - Helping you achieve your fitness goals</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..0884699 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://fitplan.scroll.pub +metaTags +editButton /edit.html +title FitPlan - Your Personalized Fitness Training Plan +style.css +body.html +script.js \ No newline at end of file diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..e279edb --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "c86b95c5-4fb2-41cf-a4d7-157376cad815", + "object": "chat.completion", + "created": 1735398375, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nfitplan.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://fitplan.scroll.pub\nmetaTags\neditButton /edit.html\ntitle FitPlan - Your Personalized Fitness Training Plan\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>FitPlan</h1>\n <p>Your Personalized Fitness Training Plan</p>\n</header>\n\n<main>\n <section class=\"form-section\">\n <h2>Create Your Plan</h2>\n <form id=\"fitnessForm\">\n <div class=\"form-group\">\n <label for=\"goal\">Fitness Goal:</label>\n <select id=\"goal\" required>\n <option value=\"\">Select your goal</option>\n <option value=\"weightLoss\">Weight Loss</option>\n <option value=\"muscleGain\">Muscle Gain</option>\n <option value=\"endurance\">Endurance</option>\n <option value=\"flexibility\">Flexibility</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"level\">Fitness Level:</label>\n <select id=\"level\" required>\n <option value=\"\">Select your level</option>\n <option value=\"beginner\">Beginner</option>\n <option value=\"intermediate\">Intermediate</option>\n <option value=\"advanced\">Advanced</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"time\">Weekly Time Commitment:</label>\n <select id=\"time\" required>\n <option value=\"\">Select your time</option>\n <option value=\"3\">3 hours</option>\n <option value=\"5\">5 hours</option>\n <option value=\"7\">7+ hours</option>\n </select>\n </div>\n\n <button type=\"submit\">Generate Plan</button>\n </form>\n </section>\n\n <section class=\"result-section\" id=\"resultSection\">\n <h2>Your Personalized Plan</h2>\n <div id=\"planResult\"></div>\n </section>\n</main>\n\n<footer>\n <p>FitPlan - Helping you achieve your fitness goals</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #45a049;\n --background-color: #f4f4f4;\n --text-color: #333;\n --white: #fff;\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n line-height: 1.6;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n}\n\nheader {\n background: var(--primary-color);\n color: var(--white);\n padding: 2rem 1rem;\n text-align: center;\n}\n\nh1 {\n margin: 0;\n font-size: 2.5rem;\n}\n\nmain {\n padding: 2rem;\n max-width: 800px;\n margin: 0 auto;\n}\n\n.form-section, .result-section {\n background: var(--white);\n padding: 2rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n margin-bottom: 2rem;\n}\n\n.form-group {\n margin-bottom: 1.5rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 600;\n}\n\nselect, button {\n width: 100%;\n padding: 0.8rem;\n border-radius: 4px;\n border: 1px solid #ddd;\n font-size: 1rem;\n}\n\nbutton {\n background: var(--primary-color);\n color: var(--white);\n border: none;\n cursor: pointer;\n transition: background 0.3s ease;\n}\n\nbutton:hover {\n background: var(--secondary-color);\n}\n\n#planResult {\n margin-top: 1rem;\n padding: 1rem;\n background: var(--background-color);\n border-radius: 4px;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background: var(--primary-color);\n color: var(--white);\n margin-top: 2rem;\n}\n\n@media (max-width: 600px) {\n h1 {\n font-size: 2rem;\n }\n \n main {\n padding: 1rem;\n }\n \n .form-section, .result-section {\n padding: 1rem;\n }\n}\n---script.js---\ndocument.getElementById('fitnessForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const goal = document.getElementById('goal').value;\n const level = document.getElementById('level').value;\n const time = document.getElementById('time').value;\n \n const plan = generatePlan(goal, level, time);\n displayPlan(plan);\n});\n\nfunction generatePlan(goal, level, time) {\n const plans = {\n weightLoss: {\n beginner: `Start with 30 minutes of brisk walking 3 times a week. Add 2 days of light strength training.`,\n intermediate: `Combine 4 days of cardio (running, cycling) with 2 days of strength training.`,\n advanced: `High-intensity interval training (HIIT) 4-5 times a week with strength training.`\n },\n muscleGain: {\n beginner: `Focus on full-body workouts 3 times a week with light weights.`,\n intermediate: `Split workouts (upper/lower body) 4 times a week with moderate weights.`,\n advanced: `Targeted muscle group training 5-6 times a week with heavy weights.`\n },\n endurance: {\n beginner: `Start with 20-30 minutes of steady-state cardio 3 times a week.`,\n intermediate: `Increase to 45 minutes of cardio 4 times a week with interval training.`,\n advanced: `Long-distance training 5 times a week with tempo runs.`\n },\n flexibility: {\n beginner: `Daily stretching routine focusing on major muscle groups.`,\n intermediate: `Yoga or Pilates 3-4 times a week.`,\n advanced: `Advanced yoga or mobility training 5-6 times a week.`\n }\n };\n\n let plan = plans[goal][level];\n \n if (time == 3) {\n plan = `For 3 hours/week: ${plan}`;\n } else if (time == 5) {\n plan = `For 5 hours/week: ${plan}`;\n } else if (time == 7) {\n plan = `For 7+ hours/week: ${plan}`;\n }\n\n return plan;\n}\n\nfunction displayPlan(plan) {\n const resultSection = document.getElementById('resultSection');\n const planResult = document.getElementById('planResult');\n \n planResult.textContent = plan;\n resultSection.style.display = 'block';\n resultSection.scrollIntoView({ behavior: 'smooth' });\n}\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 247, + "completion_tokens": 1530, + "total_tokens": 1777, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 247 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..e98c532 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# fitplan3.scroll.pub +Website generated by DeepSeek from prompt: Create a website that calculates the best fitness training plan. Be creative! \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..d7b5257 --- /dev/null +++ b/script.js @@ -0,0 +1,56 @@ +document.getElementById('fitnessForm').addEventListener('submit', function(e) { + e.preventDefault(); + + const goal = document.getElementById('goal').value; + const level = document.getElementById('level').value; + const time = document.getElementById('time').value; + + const plan = generatePlan(goal, level, time); + displayPlan(plan); +}); + +function generatePlan(goal, level, time) { + const plans = { + weightLoss: { + beginner: `Start with 30 minutes of brisk walking 3 times a week. Add 2 days of light strength training.`, + intermediate: `Combine 4 days of cardio (running, cycling) with 2 days of strength training.`, + advanced: `High-intensity interval training (HIIT) 4-5 times a week with strength training.` + }, + muscleGain: { + beginner: `Focus on full-body workouts 3 times a week with light weights.`, + intermediate: `Split workouts (upper/lower body) 4 times a week with moderate weights.`, + advanced: `Targeted muscle group training 5-6 times a week with heavy weights.` + }, + endurance: { + beginner: `Start with 20-30 minutes of steady-state cardio 3 times a week.`, + intermediate: `Increase to 45 minutes of cardio 4 times a week with interval training.`, + advanced: `Long-distance training 5 times a week with tempo runs.` + }, + flexibility: { + beginner: `Daily stretching routine focusing on major muscle groups.`, + intermediate: `Yoga or Pilates 3-4 times a week.`, + advanced: `Advanced yoga or mobility training 5-6 times a week.` + } + }; + + let plan = plans[goal][level]; + + if (time == 3) { + plan = `For 3 hours/week: ${plan}`; + } else if (time == 5) { + plan = `For 5 hours/week: ${plan}`; + } else if (time == 7) { + plan = `For 7+ hours/week: ${plan}`; + } + + return plan; +} + +function displayPlan(plan) { + const resultSection = document.getElementById('resultSection'); + const planResult = document.getElementById('planResult'); + + planResult.textContent = plan; + resultSection.style.display = 'block'; + resultSection.scrollIntoView({ behavior: 'smooth' }); +} \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..f6bbecc --- /dev/null +++ b/style.css @@ -0,0 +1,101 @@ +:root { + --primary-color: #4CAF50; + --secondary-color: #45a049; + --background-color: #f4f4f4; + --text-color: #333; + --white: #fff; +} + +body { + font-family: 'Segoe UI', sans-serif; + line-height: 1.6; + margin: 0; + padding: 0; + background-color: var(--background-color); + color: var(--text-color); +} + +header { + background: var(--primary-color); + color: var(--white); + padding: 2rem 1rem; + text-align: center; +} + +h1 { + margin: 0; + font-size: 2.5rem; +} + +main { + padding: 2rem; + max-width: 800px; + margin: 0 auto; +} + +.form-section, .result-section { + background: var(--white); + padding: 2rem; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); + margin-bottom: 2rem; +} + +.form-group { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 600; +} + +select, button { + width: 100%; + padding: 0.8rem; + border-radius: 4px; + border: 1px solid #ddd; + font-size: 1rem; +} + +button { + background: var(--primary-color); + color: var(--white); + border: none; + cursor: pointer; + transition: background 0.3s ease; +} + +button:hover { + background: var(--secondary-color); +} + +#planResult { + margin-top: 1rem; + padding: 1rem; + background: var(--background-color); + border-radius: 4px; +} + +footer { + text-align: center; + padding: 1rem; + background: var(--primary-color); + color: var(--white); + margin-top: 2rem; +} + +@media (max-width: 600px) { + h1 { + font-size: 2rem; + } + + main { + padding: 1rem; + } + + .form-section, .result-section { + padding: 1rem; + } +} \ No newline at end of file