commit daa6e630b6802eeaa06069ea791f302e0ea3ab3a
Author: root <root@hub.scroll.pub> Date: 2025-01-06 07:52:54 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..474e181 --- /dev/null +++ b/body.html @@ -0,0 +1,47 @@ +<header class="header"> + <h1>MedConsult</h1> + <p>Your Online Medical Consultation Platform</p> +</header> + +<main class="container"> + <section class="consultation-form"> + <h2>Online Consultation</h2> + <form id="consultationForm"> + <div class="form-group"> + <label for="name">Full Name</label> + <input type="text" id="name" name="name" required> + </div> + <div class="form-group"> + <label for="email">Email</label> + <input type="email" id="email" name="email" required> + </div> + <div class="form-group"> + <label for="symptoms">Describe Your Symptoms</label> + <textarea id="symptoms" name="symptoms" rows="5" required></textarea> + </div> + <div class="form-group"> + <label for="image">Upload Image (optional)</label> + <input type="file" id="image" name="image" accept="image/*"> + </div> + <button type="submit" class="submit-btn">Submit Consultation</button> + </form> + </section> + + <section class="comments-section"> + <h2>Patient Comments</h2> + <div class="comments-container" id="commentsContainer"> + <!-- Comments will be dynamically added here --> + </div> + <div class="new-comment"> + <h3>Leave a Comment</h3> + <form id="commentForm"> + <textarea id="comment" name="comment" rows="3" required></textarea> + <button type="submit" class="submit-btn">Post Comment</button> + </form> + </div> + </section> +</main> + +<footer class="footer"> + <p>MedConsult - Professional Online Medical Services</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..26c978a --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://medconsult.scroll.pub +metaTags +editButton /edit.html +title MedConsult - Online Medical Consultation +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..882bfa0 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "20635e4a-f49f-4e94-b49c-02b793b5be4c", + "object": "chat.completion", + "created": 1736149928, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nmedconsult.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://medconsult.scroll.pub\nmetaTags\neditButton /edit.html\ntitle MedConsult - Online Medical Consultation\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header class=\"header\">\n <h1>MedConsult</h1>\n <p>Your Online Medical Consultation Platform</p>\n</header>\n\n<main class=\"container\">\n <section class=\"consultation-form\">\n <h2>Online Consultation</h2>\n <form id=\"consultationForm\">\n <div class=\"form-group\">\n <label for=\"name\">Full Name</label>\n <input type=\"text\" id=\"name\" name=\"name\" required>\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Email</label>\n <input type=\"email\" id=\"email\" name=\"email\" required>\n </div>\n <div class=\"form-group\">\n <label for=\"symptoms\">Describe Your Symptoms</label>\n <textarea id=\"symptoms\" name=\"symptoms\" rows=\"5\" required></textarea>\n </div>\n <div class=\"form-group\">\n <label for=\"image\">Upload Image (optional)</label>\n <input type=\"file\" id=\"image\" name=\"image\" accept=\"image/*\">\n </div>\n <button type=\"submit\" class=\"submit-btn\">Submit Consultation</button>\n </form>\n </section>\n\n <section class=\"comments-section\">\n <h2>Patient Comments</h2>\n <div class=\"comments-container\" id=\"commentsContainer\">\n <!-- Comments will be dynamically added here -->\n </div>\n <div class=\"new-comment\">\n <h3>Leave a Comment</h3>\n <form id=\"commentForm\">\n <textarea id=\"comment\" name=\"comment\" rows=\"3\" required></textarea>\n <button type=\"submit\" class=\"submit-btn\">Post Comment</button>\n </form>\n </div>\n </section>\n</main>\n\n<footer class=\"footer\">\n <p>MedConsult - Professional Online Medical Services</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #1a73e8;\n --secondary-color: #f1f3f4;\n --text-color: #202124;\n --white: #ffffff;\n --shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n margin: 0;\n padding: 0;\n background-color: var(--secondary-color);\n}\n\n.header {\n background: var(--primary-color);\n color: var(--white);\n padding: 2rem;\n text-align: center;\n box-shadow: var(--shadow);\n}\n\n.container {\n max-width: 800px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n.consultation-form, .comments-section {\n background: var(--white);\n padding: 2rem;\n border-radius: 8px;\n box-shadow: var(--shadow);\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: 500;\n}\n\ninput, textarea {\n width: 100%;\n padding: 0.8rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 1rem;\n}\n\ntextarea {\n resize: vertical;\n}\n\n.submit-btn {\n background: var(--primary-color);\n color: var(--white);\n padding: 0.8rem 1.5rem;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 1rem;\n transition: background 0.3s ease;\n}\n\n.submit-btn:hover {\n background: #1557b0;\n}\n\n.comments-container {\n margin-top: 1.5rem;\n}\n\n.comment {\n background: var(--secondary-color);\n padding: 1rem;\n border-radius: 4px;\n margin-bottom: 1rem;\n}\n\n.footer {\n text-align: center;\n padding: 1.5rem;\n background: var(--white);\n box-shadow: var(--shadow);\n}\n\n@media (max-width: 768px) {\n .container {\n padding: 0 0.5rem;\n }\n \n .consultation-form, .comments-section {\n padding: 1rem;\n }\n}\n---script.js---\n// Handle consultation form submission\ndocument.getElementById('consultationForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const formData = new FormData(this);\n const imageFile = formData.get('image');\n \n // Basic validation\n if (!formData.get('name') || !formData.get('email') || !formData.get('symptoms')) {\n alert('Please fill in all required fields');\n return;\n }\n \n // Process form data (this would be sent to server in real app)\n console.log('Consultation submitted:', {\n name: formData.get('name'),\n email: formData.get('email'),\n symptoms: formData.get('symptoms'),\n image: imageFile ? imageFile.name : 'No image'\n });\n \n alert('Your consultation has been submitted successfully!');\n this.reset();\n});\n\n// Handle comment submission\ndocument.getElementById('commentForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const commentText = document.getElementById('comment').value.trim();\n \n if (!commentText) {\n alert('Please enter a comment');\n return;\n }\n \n // Create new comment element\n const commentDiv = document.createElement('div');\n commentDiv.className = 'comment';\n commentDiv.textContent = commentText;\n \n // Add to comments container\n document.getElementById('commentsContainer').prepend(commentDiv);\n \n // Clear input\n document.getElementById('comment').value = '';\n});\n\n// Basic image preview (optional enhancement)\ndocument.getElementById('image').addEventListener('change', function(e) {\n const file = e.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.onload = function(e) {\n // Could display preview here if desired\n };\n reader.readAsDataURL(file);\n }\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 251, + "completion_tokens": 1429, + "total_tokens": 1680, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 251 + }, + "system_fingerprint": "fp_3a5770e1b4" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..0c5e872 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# medconsult.scroll.pub +Website generated by DeepSeek from prompt: 一个在线问诊系统,有问诊表单,可以留言评论、上传图片 \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..35bab2d --- /dev/null +++ b/script.js @@ -0,0 +1,59 @@ +// Handle consultation form submission +document.getElementById('consultationForm').addEventListener('submit', function(e) { + e.preventDefault(); + + const formData = new FormData(this); + const imageFile = formData.get('image'); + + // Basic validation + if (!formData.get('name') || !formData.get('email') || !formData.get('symptoms')) { + alert('Please fill in all required fields'); + return; + } + + // Process form data (this would be sent to server in real app) + console.log('Consultation submitted:', { + name: formData.get('name'), + email: formData.get('email'), + symptoms: formData.get('symptoms'), + image: imageFile ? imageFile.name : 'No image' + }); + + alert('Your consultation has been submitted successfully!'); + this.reset(); +}); + +// Handle comment submission +document.getElementById('commentForm').addEventListener('submit', function(e) { + e.preventDefault(); + + const commentText = document.getElementById('comment').value.trim(); + + if (!commentText) { + alert('Please enter a comment'); + return; + } + + // Create new comment element + const commentDiv = document.createElement('div'); + commentDiv.className = 'comment'; + commentDiv.textContent = commentText; + + // Add to comments container + document.getElementById('commentsContainer').prepend(commentDiv); + + // Clear input + document.getElementById('comment').value = ''; +}); + +// Basic image preview (optional enhancement) +document.getElementById('image').addEventListener('change', function(e) { + const file = e.target.files[0]; + if (file) { + const reader = new FileReader(); + reader.onload = function(e) { + // Could display preview here if desired + }; + reader.readAsDataURL(file); + } +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..ed95e74 --- /dev/null +++ b/style.css @@ -0,0 +1,103 @@ +:root { + --primary-color: #1a73e8; + --secondary-color: #f1f3f4; + --text-color: #202124; + --white: #ffffff; + --shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +body { + font-family: 'Segoe UI', system-ui, sans-serif; + line-height: 1.6; + color: var(--text-color); + margin: 0; + padding: 0; + background-color: var(--secondary-color); +} + +.header { + background: var(--primary-color); + color: var(--white); + padding: 2rem; + text-align: center; + box-shadow: var(--shadow); +} + +.container { + max-width: 800px; + margin: 2rem auto; + padding: 0 1rem; +} + +.consultation-form, .comments-section { + background: var(--white); + padding: 2rem; + border-radius: 8px; + box-shadow: var(--shadow); + margin-bottom: 2rem; +} + +.form-group { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 500; +} + +input, textarea { + width: 100%; + padding: 0.8rem; + border: 1px solid #ddd; + border-radius: 4px; + font-size: 1rem; +} + +textarea { + resize: vertical; +} + +.submit-btn { + background: var(--primary-color); + color: var(--white); + padding: 0.8rem 1.5rem; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 1rem; + transition: background 0.3s ease; +} + +.submit-btn:hover { + background: #1557b0; +} + +.comments-container { + margin-top: 1.5rem; +} + +.comment { + background: var(--secondary-color); + padding: 1rem; + border-radius: 4px; + margin-bottom: 1rem; +} + +.footer { + text-align: center; + padding: 1.5rem; + background: var(--white); + box-shadow: var(--shadow); +} + +@media (max-width: 768px) { + .container { + padding: 0 0.5rem; + } + + .consultation-form, .comments-section { + padding: 1rem; + } +} \ No newline at end of file