commit a3ba031b72d1ca6c28ed84c704946b8f1f33ccb6
Author: root <root@hub.scroll.pub> Date: 2024-12-30 05:46:13 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..077f035 --- /dev/null +++ b/body.html @@ -0,0 +1,48 @@ +<header> + <nav> + <div class="logo">FitFlow</div> + <button class="menu-toggle" aria-label="Toggle menu"> + <span></span><span></span><span></span> + </button> + <ul class="nav-links"> + <li><a href="#dashboard" class="active">Dashboard</a></li> + <li><a href="#history">History</a></li> + <li><a href="#recommendations">Diet Tips</a></li> + </ul> + </nav> +</header> + +<main> + <section id="weight-input" class="card"> + <h2>Track Your Weight</h2> + <form id="weight-form"> + <div class="form-group"> + <label for="weight">Current Weight (kg)</label> + <input type="number" id="weight" step="0.1" required> + </div> + <div class="form-group"> + <label for="goal">Goal Weight (kg)</label> + <input type="number" id="goal" step="0.1" required> + </div> + <button type="submit" class="btn-primary">Update</button> + </form> + </section> + + <section id="progress" class="card"> + <h2>Your Progress</h2> + <canvas id="weight-chart" aria-label="Weight progress chart" role="img"></canvas> + </section> + + <section id="recommendations" class="card"> + <h2>Dietary Recommendations</h2> + <div id="diet-recommendations"> + <div class="recommendation-card"> + <h3>Loading recommendations...</h3> + </div> + </div> + </section> +</main> + +<footer> + <p>FitFlow | Made with passion for your health journey</p> +</footer> diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..7bf99ca --- /dev/null +++ b/index.scroll @@ -0,0 +1,11 @@ +buildHtml +baseUrl https://fitflow.scroll.pub +metaTags + description Track your weight journey and get personalized diet recommendations + keywords weight tracking, diet recommendations, fitness goals, health tracking + author FitFlow +editButton /edit.html +title FitFlow - Track Your Weight & Diet Journey +style.css +body.html +script.js diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..fd86968 --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_01RKnhmgczKkRi5EXkKqLngF", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "Here's a complete weight tracking and diet recommendation website:\n\n---domain---\nfitflow.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://fitflow.scroll.pub\nmetaTags\n description Track your weight journey and get personalized diet recommendations\n keywords weight tracking, diet recommendations, fitness goals, health tracking\n author FitFlow\neditButton /edit.html\ntitle FitFlow - Track Your Weight & Diet Journey\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <nav>\n <div class=\"logo\">FitFlow</div>\n <button class=\"menu-toggle\" aria-label=\"Toggle menu\">\n <span></span><span></span><span></span>\n </button>\n <ul class=\"nav-links\">\n <li><a href=\"#dashboard\" class=\"active\">Dashboard</a></li>\n <li><a href=\"#history\">History</a></li>\n <li><a href=\"#recommendations\">Diet Tips</a></li>\n </ul>\n </nav>\n</header>\n\n<main>\n <section id=\"weight-input\" class=\"card\">\n <h2>Track Your Weight</h2>\n <form id=\"weight-form\">\n <div class=\"form-group\">\n <label for=\"weight\">Current Weight (kg)</label>\n <input type=\"number\" id=\"weight\" step=\"0.1\" required>\n </div>\n <div class=\"form-group\">\n <label for=\"goal\">Goal Weight (kg)</label>\n <input type=\"number\" id=\"goal\" step=\"0.1\" required>\n </div>\n <button type=\"submit\" class=\"btn-primary\">Update</button>\n </form>\n </section>\n\n <section id=\"progress\" class=\"card\">\n <h2>Your Progress</h2>\n <canvas id=\"weight-chart\" aria-label=\"Weight progress chart\" role=\"img\"></canvas>\n </section>\n\n <section id=\"recommendations\" class=\"card\">\n <h2>Dietary Recommendations</h2>\n <div id=\"diet-recommendations\">\n <div class=\"recommendation-card\">\n <h3>Loading recommendations...</h3>\n </div>\n </div>\n </section>\n</main>\n\n<footer>\n <p>FitFlow | Made with passion for your health journey</p>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #2c3e50;\n --accent-color: #3498db;\n --background-color: #f5f6fa;\n --card-color: #ffffff;\n --text-color: #2c3e50;\n --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n --transition: all 0.3s ease;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n background: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\n/* Header & Navigation */\nheader {\n background: var(--card-color);\n box-shadow: var(--shadow);\n position: sticky;\n top: 0;\n z-index: 100;\n}\n\nnav {\n max-width: 1200px;\n margin: 0 auto;\n padding: 1rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n color: var(--primary-color);\n}\n\n.nav-links {\n display: flex;\n list-style: none;\n gap: 2rem;\n}\n\n.nav-links a {\n text-decoration: none;\n color: var(--text-color);\n font-weight: 500;\n transition: var(--transition);\n}\n\n.nav-links a:hover {\n color: var(--accent-color);\n}\n\n/* Main Content */\nmain {\n max-width: 1200px;\n margin: 2rem auto;\n padding: 0 1rem;\n display: grid;\n gap: 2rem;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n}\n\n.card {\n background: var(--card-color);\n padding: 2rem;\n border-radius: 10px;\n box-shadow: var(--shadow);\n transition: var(--transition);\n}\n\n.card:hover {\n transform: translateY(-5px);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);\n}\n\n/* Forms */\n.form-group {\n margin-bottom: 1.5rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\ninput {\n width: 100%;\n padding: 0.8rem;\n border: 2px solid #e1e1e1;\n border-radius: 5px;\n font-size: 1rem;\n transition: var(--transition);\n}\n\ninput:focus {\n border-color: var(--accent-color);\n outline: none;\n}\n\n.btn-primary {\n background: var(--accent-color);\n color: white;\n border: none;\n padding: 0.8rem 1.5rem;\n border-radius: 5px;\n cursor: pointer;\n font-size: 1rem;\n transition: var(--transition);\n}\n\n.btn-primary:hover {\n background: #2980b9;\n transform: translateY(-2px);\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n .menu-toggle {\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n }\n\n .menu-toggle span {\n display: block;\n width: 25px;\n height: 3px;\n background: var(--text-color);\n margin: 5px 0;\n transition: var(--transition);\n }\n\n .nav-links {\n display: none;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: var(--card-color);\n flex-direction: column;\n padding: 1rem;\n text-align: center;\n }\n\n .nav-links.active {\n display: flex;\n }\n}\n\n/* Footer */\nfooter {\n text-align: center;\n padding: 2rem;\n background: var(--card-color);\n margin-top: 2rem;\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n // Mobile menu toggle\n const menuToggle = document.querySelector('.menu-toggle');\n const navLinks = document.querySelector('.nav-links');\n \n menuToggle?.addEventListener('click', () => {\n navLinks.classList.toggle('active');\n });\n\n // Weight tracking functionality\n const weightForm = document.getElementById('weight-form');\n const weightChart = document.getElementById('weight-chart');\n \n let weightData = JSON.parse(localStorage.getItem('weightData')) || [];\n\n function updateChart() {\n const ctx = weightChart.getContext('2d');\n ctx.clearRect(0, 0, weightChart.width, weightChart.height);\n \n if (weightData.length > 0) {\n // Simple line chart implementation\n ctx.beginPath();\n ctx.moveTo(0, weightChart.height - (weightData[0].weight * 2));\n \n weightData.forEach((data, index) => {\n const x = (index / (weightData.length - 1)) * weightChart.width;\n const y = weightChart.height - (data.weight * 2);\n ctx.lineTo(x, y);\n });\n \n ctx.strokeStyle = '#3498db';\n ctx.lineWidth = 2;\n ctx.stroke();\n }\n }\n\n function updateRecommendations() {\n const recommendations = document.getElementById('diet-recommendations');\n const latestWeight = weightData[weightData.length - 1]?.weight;\n const goalWeight = document.getElementById('goal').value;\n\n if (latestWeight && goalWeight) {\n const diff = latestWeight - goalWeight;\n let recommendationText = '';\n\n if (diff > 0) {\n recommendationText = `\n <div class=\"recommendation-card\">\n <h3>Weight Loss Recommendations</h3>\n <ul>\n <li>Aim for a caloric deficit of 500 calories per day</li>\n <li>Increase protein intake to preserve muscle mass</li>\n <li>Include more vegetables in your meals</li>\n <li>Stay hydrated with at least 8 glasses of water daily</li>\n </ul>\n </div>\n `;\n } else if (diff < 0) {\n recommendationText = `\n <div class=\"recommendation-card\">\n <h3>Weight Gain Recommendations</h3>\n <ul>\n <li>Increase caloric intake by 500 calories per day</li>\n <li>Focus on nutrient-dense foods</li>\n <li>Include healthy fats in your diet</li>\n <li>Consume protein-rich foods with each meal</li>\n </ul>\n </div>\n `;\n } else {\n recommendationText = `\n <div class=\"recommendation-card\">\n <h3>Maintenance Recommendations</h3>\n <ul>\n <li>Maintain current caloric intake</li>\n <li>Focus on balanced nutrition</li>\n <li>Stay active and consistent with exercise</li>\n <li>Monitor weight weekly</li>\n </ul>\n </div>\n `;\n }\n \n recommendations.innerHTML = recommendationText;\n }\n }\n\n weightForm?.addEventListener('submit', (e) => {\n e.preventDefault();\n const weight = parseFloat(document.getElementById('weight').value);\n const date = new Date().toISOString();\n \n weightData.push({ weight, date });\n localStorage.setItem('weightData', JSON.stringify(weightData));\n \n updateChart();\n updateRecommendations();\n });\n\n // Initialize chart and recommendations\n updateChart();\n updateRecommendations();\n});\n\n---end---" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 287, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 2681 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..45aa22f --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# fitflow.scroll.pub +Website generated by Claude from prompt: I want a website to track my weight changes and provide dietary recommendations based on my goals \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..f931aa7 --- /dev/null +++ b/script.js @@ -0,0 +1,103 @@ +document.addEventListener('DOMContentLoaded', () => { + // Mobile menu toggle + const menuToggle = document.querySelector('.menu-toggle'); + const navLinks = document.querySelector('.nav-links'); + + menuToggle?.addEventListener('click', () => { + navLinks.classList.toggle('active'); + }); + + // Weight tracking functionality + const weightForm = document.getElementById('weight-form'); + const weightChart = document.getElementById('weight-chart'); + + let weightData = JSON.parse(localStorage.getItem('weightData')) || []; + + function updateChart() { + const ctx = weightChart.getContext('2d'); + ctx.clearRect(0, 0, weightChart.width, weightChart.height); + + if (weightData.length > 0) { + // Simple line chart implementation + ctx.beginPath(); + ctx.moveTo(0, weightChart.height - (weightData[0].weight * 2)); + + weightData.forEach((data, index) => { + const x = (index / (weightData.length - 1)) * weightChart.width; + const y = weightChart.height - (data.weight * 2); + ctx.lineTo(x, y); + }); + + ctx.strokeStyle = '#3498db'; + ctx.lineWidth = 2; + ctx.stroke(); + } + } + + function updateRecommendations() { + const recommendations = document.getElementById('diet-recommendations'); + const latestWeight = weightData[weightData.length - 1]?.weight; + const goalWeight = document.getElementById('goal').value; + + if (latestWeight && goalWeight) { + const diff = latestWeight - goalWeight; + let recommendationText = ''; + + if (diff > 0) { + recommendationText = ` + <div class="recommendation-card"> + <h3>Weight Loss Recommendations</h3> + <ul> + <li>Aim for a caloric deficit of 500 calories per day</li> + <li>Increase protein intake to preserve muscle mass</li> + <li>Include more vegetables in your meals</li> + <li>Stay hydrated with at least 8 glasses of water daily</li> + </ul> + </div> + `; + } else if (diff < 0) { + recommendationText = ` + <div class="recommendation-card"> + <h3>Weight Gain Recommendations</h3> + <ul> + <li>Increase caloric intake by 500 calories per day</li> + <li>Focus on nutrient-dense foods</li> + <li>Include healthy fats in your diet</li> + <li>Consume protein-rich foods with each meal</li> + </ul> + </div> + `; + } else { + recommendationText = ` + <div class="recommendation-card"> + <h3>Maintenance Recommendations</h3> + <ul> + <li>Maintain current caloric intake</li> + <li>Focus on balanced nutrition</li> + <li>Stay active and consistent with exercise</li> + <li>Monitor weight weekly</li> + </ul> + </div> + `; + } + + recommendations.innerHTML = recommendationText; + } + } + + weightForm?.addEventListener('submit', (e) => { + e.preventDefault(); + const weight = parseFloat(document.getElementById('weight').value); + const date = new Date().toISOString(); + + weightData.push({ weight, date }); + localStorage.setItem('weightData', JSON.stringify(weightData)); + + updateChart(); + updateRecommendations(); + }); + + // Initialize chart and recommendations + updateChart(); + updateRecommendations(); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..c0ecb0e --- /dev/null +++ b/style.css @@ -0,0 +1,170 @@ +:root { + --primary-color: #2c3e50; + --accent-color: #3498db; + --background-color: #f5f6fa; + --card-color: #ffffff; + --text-color: #2c3e50; + --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + --transition: all 0.3s ease; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', system-ui, sans-serif; + background: var(--background-color); + color: var(--text-color); + line-height: 1.6; +} + +/* Header & Navigation */ +header { + background: var(--card-color); + box-shadow: var(--shadow); + position: sticky; + top: 0; + z-index: 100; +} + +nav { + max-width: 1200px; + margin: 0 auto; + padding: 1rem; + display: flex; + justify-content: space-between; + align-items: center; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: var(--primary-color); +} + +.nav-links { + display: flex; + list-style: none; + gap: 2rem; +} + +.nav-links a { + text-decoration: none; + color: var(--text-color); + font-weight: 500; + transition: var(--transition); +} + +.nav-links a:hover { + color: var(--accent-color); +} + +/* Main Content */ +main { + max-width: 1200px; + margin: 2rem auto; + padding: 0 1rem; + display: grid; + gap: 2rem; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); +} + +.card { + background: var(--card-color); + padding: 2rem; + border-radius: 10px; + box-shadow: var(--shadow); + transition: var(--transition); +} + +.card:hover { + transform: translateY(-5px); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); +} + +/* Forms */ +.form-group { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 500; +} + +input { + width: 100%; + padding: 0.8rem; + border: 2px solid #e1e1e1; + border-radius: 5px; + font-size: 1rem; + transition: var(--transition); +} + +input:focus { + border-color: var(--accent-color); + outline: none; +} + +.btn-primary { + background: var(--accent-color); + color: white; + border: none; + padding: 0.8rem 1.5rem; + border-radius: 5px; + cursor: pointer; + font-size: 1rem; + transition: var(--transition); +} + +.btn-primary:hover { + background: #2980b9; + transform: translateY(-2px); +} + +/* Responsive Design */ +@media (max-width: 768px) { + .menu-toggle { + display: block; + background: none; + border: none; + cursor: pointer; + } + + .menu-toggle span { + display: block; + width: 25px; + height: 3px; + background: var(--text-color); + margin: 5px 0; + transition: var(--transition); + } + + .nav-links { + display: none; + position: absolute; + top: 100%; + left: 0; + right: 0; + background: var(--card-color); + flex-direction: column; + padding: 1rem; + text-align: center; + } + + .nav-links.active { + display: flex; + } +} + +/* Footer */ +footer { + text-align: center; + padding: 2rem; + background: var(--card-color); + margin-top: 2rem; +}