commit 3fc499f18c576f3da2da65e4ea81ad646a34e5ad
Author: root <root@hub.scroll.pub> Date: 2024-12-28 01:41:58 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..18a8914 --- /dev/null +++ b/body.html @@ -0,0 +1,90 @@ +<header> + <h1>Dog Cognitive Assessment</h1> + <p>Evaluate your dog's cognitive function and get personalized recommendations</p> +</header> + +<main> + <form id="cognitiveTest"> + <section class="question-container"> + <h2>Cognitive Assessment Questions</h2> + + <div class="question"> + <label>1. How often does your dog seem disoriented in familiar places?</label> + <select name="q1" required> + <option value="">Select an answer</option> + <option value="0">Never</option> + <option value="1">Rarely</option> + <option value="2">Sometimes</option> + <option value="3">Often</option> + <option value="4">Very Often</option> + </select> + </div> + + <div class="question"> + <label>2. Does your dog have trouble recognizing familiar people?</label> + <select name="q2" required> + <option value="">Select an answer</option> + <option value="0">Never</option> + <option value="1">Rarely</option> + <option value="2">Sometimes</option> + <option value="3">Often</option> + <option value="4">Very Often</option> + </select> + </div> + + <div class="question"> + <label>3. How often does your dog appear anxious or restless at night?</label> + <select name="q3" required> + <option value="">Select an answer</option> + <option value="0">Never</option> + <option value="1">Rarely</option> + <option value="2">Sometimes</option> + <option value="3">Often</option> + <option value="4">Very Often</option> + </select> + </div> + + <div class="question"> + <label>4. Has your dog's sleep pattern changed significantly?</label> + <select name="q4" required> + <option value="">Select an answer</option> + <option value="0">No change</option> + <option value="1">Slight change</option> + <option value="2">Moderate change</option> + <option value="3">Significant change</option> + <option value="4">Severe change</option> + </select> + </div> + + <div class="question"> + <label>5. How often does your dog have accidents inside despite being house-trained?</label> + <select name="q5" required> + <option value="">Select an answer</option> + <option value="0">Never</option> + <option value="1">Rarely</option> + <option value="2">Sometimes</option> + <option value="3">Often</option> + <option value="4">Very Often</option> + </select> + </div> + + <button type="submit" class="submit-btn">Get Results</button> + </section> + </form> + + <section id="results" class="hidden"> + <h2>Assessment Results</h2> + <div class="score-container"> + <div class="score-circle"> + <span id="score">0</span> + <span class="max">/20</span> + </div> + <p id="severity-level"></p> + </div> + <div id="recommendations"></div> + </section> +</main> + +<footer> + <p>This assessment is for informational purposes only. Please consult with your veterinarian for professional medical advice.</p> +</footer> diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..75ac6e3 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://dogcogtest.scroll.pub +metaTags +editButton /edit.html +title Dog Cognitive Assessment Test +style.css +body.html +script.js diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..1203df4 --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_01DKYn46n5jfDfkK7XS6Xhuw", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "Here's a dog cognitive assessment website:\n\n---domain---\ndogcogtest.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://dogcogtest.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Dog Cognitive Assessment Test\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <h1>Dog Cognitive Assessment</h1>\n <p>Evaluate your dog's cognitive function and get personalized recommendations</p>\n</header>\n\n<main>\n <form id=\"cognitiveTest\">\n <section class=\"question-container\">\n <h2>Cognitive Assessment Questions</h2>\n \n <div class=\"question\">\n <label>1. How often does your dog seem disoriented in familiar places?</label>\n <select name=\"q1\" required>\n <option value=\"\">Select an answer</option>\n <option value=\"0\">Never</option>\n <option value=\"1\">Rarely</option>\n <option value=\"2\">Sometimes</option>\n <option value=\"3\">Often</option>\n <option value=\"4\">Very Often</option>\n </select>\n </div>\n\n <div class=\"question\">\n <label>2. Does your dog have trouble recognizing familiar people?</label>\n <select name=\"q2\" required>\n <option value=\"\">Select an answer</option>\n <option value=\"0\">Never</option>\n <option value=\"1\">Rarely</option>\n <option value=\"2\">Sometimes</option>\n <option value=\"3\">Often</option>\n <option value=\"4\">Very Often</option>\n </select>\n </div>\n\n <div class=\"question\">\n <label>3. How often does your dog appear anxious or restless at night?</label>\n <select name=\"q3\" required>\n <option value=\"\">Select an answer</option>\n <option value=\"0\">Never</option>\n <option value=\"1\">Rarely</option>\n <option value=\"2\">Sometimes</option>\n <option value=\"3\">Often</option>\n <option value=\"4\">Very Often</option>\n </select>\n </div>\n\n <div class=\"question\">\n <label>4. Has your dog's sleep pattern changed significantly?</label>\n <select name=\"q4\" required>\n <option value=\"\">Select an answer</option>\n <option value=\"0\">No change</option>\n <option value=\"1\">Slight change</option>\n <option value=\"2\">Moderate change</option>\n <option value=\"3\">Significant change</option>\n <option value=\"4\">Severe change</option>\n </select>\n </div>\n\n <div class=\"question\">\n <label>5. How often does your dog have accidents inside despite being house-trained?</label>\n <select name=\"q5\" required>\n <option value=\"\">Select an answer</option>\n <option value=\"0\">Never</option>\n <option value=\"1\">Rarely</option>\n <option value=\"2\">Sometimes</option>\n <option value=\"3\">Often</option>\n <option value=\"4\">Very Often</option>\n </select>\n </div>\n\n <button type=\"submit\" class=\"submit-btn\">Get Results</button>\n </section>\n </form>\n\n <section id=\"results\" class=\"hidden\">\n <h2>Assessment Results</h2>\n <div class=\"score-container\">\n <div class=\"score-circle\">\n <span id=\"score\">0</span>\n <span class=\"max\">/20</span>\n </div>\n <p id=\"severity-level\"></p>\n </div>\n <div id=\"recommendations\"></div>\n </section>\n</main>\n\n<footer>\n <p>This assessment is for informational purposes only. Please consult with your veterinarian for professional medical advice.</p>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5f6fa;\n --text-color: #2c3e50;\n --accent-color: #e74c3c;\n --success-color: #2ecc71;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);\n min-height: 100vh;\n}\n\nheader {\n text-align: center;\n padding: 2rem 1rem;\n background: white;\n box-shadow: 0 2px 15px rgba(0,0,0,0.1);\n}\n\nh1 {\n color: var(--primary-color);\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\nmain {\n max-width: 800px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n.question-container {\n background: white;\n padding: 2rem;\n border-radius: 15px;\n box-shadow: 0 5px 15px rgba(0,0,0,0.1);\n}\n\n.question {\n margin-bottom: 1.5rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\nselect {\n width: 100%;\n padding: 0.8rem;\n border: 2px solid #e0e0e0;\n border-radius: 8px;\n font-size: 1rem;\n transition: border-color 0.3s ease;\n}\n\nselect:focus {\n border-color: var(--primary-color);\n outline: none;\n}\n\n.submit-btn {\n display: block;\n width: 100%;\n padding: 1rem;\n background: var(--primary-color);\n color: white;\n border: none;\n border-radius: 8px;\n font-size: 1.1rem;\n cursor: pointer;\n transition: transform 0.3s ease, background-color 0.3s ease;\n}\n\n.submit-btn:hover {\n background: #357abd;\n transform: translateY(-2px);\n}\n\n.hidden {\n display: none;\n}\n\n.score-container {\n text-align: center;\n margin: 2rem 0;\n}\n\n.score-circle {\n width: 150px;\n height: 150px;\n border-radius: 50%;\n background: white;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 auto;\n box-shadow: 0 0 15px rgba(0,0,0,0.1);\n font-size: 2.5rem;\n position: relative;\n}\n\n.max {\n font-size: 1rem;\n color: #666;\n}\n\n#recommendations {\n background: white;\n padding: 2rem;\n border-radius: 15px;\n margin-top: 2rem;\n box-shadow: 0 5px 15px rgba(0,0,0,0.1);\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: white;\n margin-top: 3rem;\n font-size: 0.9rem;\n color: #666;\n}\n\n@media (max-width: 600px) {\n h1 {\n font-size: 2rem;\n }\n \n .question-container {\n padding: 1.5rem;\n }\n \n .score-circle {\n width: 120px;\n height: 120px;\n font-size: 2rem;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const form = document.getElementById('cognitiveTest');\n const results = document.getElementById('results');\n const scoreElement = document.getElementById('score');\n const severityLevel = document.getElementById('severity-level');\n const recommendationsDiv = document.getElementById('recommendations');\n\n form.addEventListener('submit', (e) => {\n e.preventDefault();\n \n const formData = new FormData(form);\n let totalScore = 0;\n \n for (let value of formData.values()) {\n totalScore += parseInt(value);\n }\n\n scoreElement.textContent = totalScore;\n \n // Determine severity level\n let severity = '';\n let recommendations = '';\n \n if (totalScore <= 5) {\n severity = 'Minimal cognitive concerns';\n recommendations = `\n <h3>Recommendations:</h3>\n <ul>\n <li>Continue regular mental stimulation through play and training</li>\n <li>Maintain regular exercise routine</li>\n <li>Regular veterinary check-ups</li>\n </ul>\n `;\n } else if (totalScore <= 10) {\n severity = 'Mild cognitive concerns';\n recommendations = `\n <h3>Recommendations:</h3>\n <ul>\n <li>Increase mental enrichment activities</li>\n <li>Consider brain-training games</li>\n <li>Maintain consistent daily routines</li>\n <li>Discuss with your vet about preventive measures</li>\n </ul>\n `;\n } else if (totalScore <= 15) {\n severity = 'Moderate cognitive concerns';\n recommendations = `\n <h3>Recommendations:</h3>\n <ul>\n <li>Schedule a veterinary appointment soon</li>\n <li>Consider dietary supplements (after vet consultation)</li>\n <li>Implement environmental enrichment</li>\n <li>Establish strict routine for feeding and walks</li>\n <li>Monitor changes more closely</li>\n </ul>\n `;\n } else {\n severity = 'Significant cognitive concerns';\n recommendations = `\n <h3>Recommendations:</h3>\n <ul>\n <li>Immediate veterinary consultation recommended</li>\n <li>Discuss medication options with your vet</li>\n <li>Adapt home environment for safety</li>\n <li>Consider night lights and anxiety management</li>\n <li>Monitor eating, drinking, and bathroom habits closely</li>\n </ul>\n `;\n }\n \n severityLevel.textContent = severity;\n recommendationsDiv.innerHTML = recommendations;\n \n // Show results\n results.classList.remove('hidden');\n results.scrollIntoView({ behavior: 'smooth' });\n });\n\n // Add animation to score display\n const animateScore = (finalScore) => {\n let currentScore = 0;\n const duration = 1000; // 1 second\n const increment = finalScore / (duration / 16); // 60 FPS\n \n const animation = setInterval(() => {\n currentScore += increment;\n if (currentScore >= finalScore) {\n currentScore = finalScore;\n clearInterval(animation);\n }\n scoreElement.textContent = Math.round(currentScore);\n }, 16);\n };\n});\n\n---end---" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 303, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 2887 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..e0a4095 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# dogcogtest.scroll.pub +Website generated by Claude from prompt: un formulario para hacer un etst de disfuncion cognitiva en perros que nos de puntuacion al finalizar recomendaciones \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..97ccd96 --- /dev/null +++ b/script.js @@ -0,0 +1,94 @@ +document.addEventListener('DOMContentLoaded', () => { + const form = document.getElementById('cognitiveTest'); + const results = document.getElementById('results'); + const scoreElement = document.getElementById('score'); + const severityLevel = document.getElementById('severity-level'); + const recommendationsDiv = document.getElementById('recommendations'); + + form.addEventListener('submit', (e) => { + e.preventDefault(); + + const formData = new FormData(form); + let totalScore = 0; + + for (let value of formData.values()) { + totalScore += parseInt(value); + } + + scoreElement.textContent = totalScore; + + // Determine severity level + let severity = ''; + let recommendations = ''; + + if (totalScore <= 5) { + severity = 'Minimal cognitive concerns'; + recommendations = ` + <h3>Recommendations:</h3> + <ul> + <li>Continue regular mental stimulation through play and training</li> + <li>Maintain regular exercise routine</li> + <li>Regular veterinary check-ups</li> + </ul> + `; + } else if (totalScore <= 10) { + severity = 'Mild cognitive concerns'; + recommendations = ` + <h3>Recommendations:</h3> + <ul> + <li>Increase mental enrichment activities</li> + <li>Consider brain-training games</li> + <li>Maintain consistent daily routines</li> + <li>Discuss with your vet about preventive measures</li> + </ul> + `; + } else if (totalScore <= 15) { + severity = 'Moderate cognitive concerns'; + recommendations = ` + <h3>Recommendations:</h3> + <ul> + <li>Schedule a veterinary appointment soon</li> + <li>Consider dietary supplements (after vet consultation)</li> + <li>Implement environmental enrichment</li> + <li>Establish strict routine for feeding and walks</li> + <li>Monitor changes more closely</li> + </ul> + `; + } else { + severity = 'Significant cognitive concerns'; + recommendations = ` + <h3>Recommendations:</h3> + <ul> + <li>Immediate veterinary consultation recommended</li> + <li>Discuss medication options with your vet</li> + <li>Adapt home environment for safety</li> + <li>Consider night lights and anxiety management</li> + <li>Monitor eating, drinking, and bathroom habits closely</li> + </ul> + `; + } + + severityLevel.textContent = severity; + recommendationsDiv.innerHTML = recommendations; + + // Show results + results.classList.remove('hidden'); + results.scrollIntoView({ behavior: 'smooth' }); + }); + + // Add animation to score display + const animateScore = (finalScore) => { + let currentScore = 0; + const duration = 1000; // 1 second + const increment = finalScore / (duration / 16); // 60 FPS + + const animation = setInterval(() => { + currentScore += increment; + if (currentScore >= finalScore) { + currentScore = finalScore; + clearInterval(animation); + } + scoreElement.textContent = Math.round(currentScore); + }, 16); + }; +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..064b492 --- /dev/null +++ b/style.css @@ -0,0 +1,150 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #f5f6fa; + --text-color: #2c3e50; + --accent-color: #e74c3c; + --success-color: #2ecc71; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + line-height: 1.6; + color: var(--text-color); + background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); + min-height: 100vh; +} + +header { + text-align: center; + padding: 2rem 1rem; + background: white; + box-shadow: 0 2px 15px rgba(0,0,0,0.1); +} + +h1 { + color: var(--primary-color); + font-size: 2.5rem; + margin-bottom: 0.5rem; +} + +main { + max-width: 800px; + margin: 2rem auto; + padding: 0 1rem; +} + +.question-container { + background: white; + padding: 2rem; + border-radius: 15px; + box-shadow: 0 5px 15px rgba(0,0,0,0.1); +} + +.question { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 500; +} + +select { + width: 100%; + padding: 0.8rem; + border: 2px solid #e0e0e0; + border-radius: 8px; + font-size: 1rem; + transition: border-color 0.3s ease; +} + +select:focus { + border-color: var(--primary-color); + outline: none; +} + +.submit-btn { + display: block; + width: 100%; + padding: 1rem; + background: var(--primary-color); + color: white; + border: none; + border-radius: 8px; + font-size: 1.1rem; + cursor: pointer; + transition: transform 0.3s ease, background-color 0.3s ease; +} + +.submit-btn:hover { + background: #357abd; + transform: translateY(-2px); +} + +.hidden { + display: none; +} + +.score-container { + text-align: center; + margin: 2rem 0; +} + +.score-circle { + width: 150px; + height: 150px; + border-radius: 50%; + background: white; + display: flex; + align-items: center; + justify-content: center; + margin: 0 auto; + box-shadow: 0 0 15px rgba(0,0,0,0.1); + font-size: 2.5rem; + position: relative; +} + +.max { + font-size: 1rem; + color: #666; +} + +#recommendations { + background: white; + padding: 2rem; + border-radius: 15px; + margin-top: 2rem; + box-shadow: 0 5px 15px rgba(0,0,0,0.1); +} + +footer { + text-align: center; + padding: 2rem; + background: white; + margin-top: 3rem; + font-size: 0.9rem; + color: #666; +} + +@media (max-width: 600px) { + h1 { + font-size: 2rem; + } + + .question-container { + padding: 1.5rem; + } + + .score-circle { + width: 120px; + height: 120px; + font-size: 2rem; + } +}