commit d596fb064d4600050badb10a94bd6c6114eb92b4
Author: root <root@hub.scroll.pub>
Date: 2025-01-06 07:50:07 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..0fccda8
--- /dev/null
+++ b/body.html
@@ -0,0 +1,67 @@
+<header>
+ <nav>
+ <div class="logo">MedQuery</div>
+ <div class="nav-links">
+ <a href="#home">Home</a>
+ <a href="#consult">Consult</a>
+ <a href="#reviews">Reviews</a>
+ </div>
+ </nav>
+</header>
+
+<main>
+ <section id="home" class="hero">
+ <h1>Professional Medical Consultation Online</h1>
+ <p>Get expert medical advice from licensed professionals</p>
+ </section>
+
+ <section id="consult" class="consultation-form">
+ <h2>Medical Consultation Form</h2>
+ <form id="consultForm">
+ <div class="form-group">
+ <label for="name">Full Name</label>
+ <input type="text" id="name" required>
+ </div>
+
+ <div class="form-group">
+ <label for="email">Email</label>
+ <input type="email" id="email" required>
+ </div>
+
+ <div class="form-group">
+ <label for="symptoms">Describe Your Symptoms</label>
+ <textarea id="symptoms" rows="4" required></textarea>
+ </div>
+
+ <div class="form-group">
+ <label for="images">Upload Images (Optional)</label>
+ <input type="file" id="images" accept="image/*" multiple>
+ <div id="imagePreview" class="image-preview"></div>
+ </div>
+
+ <button type="submit">Submit Consultation</button>
+ </form>
+ </section>
+
+ <section id="reviews" class="reviews">
+ <h2>Patient Reviews</h2>
+ <div class="reviews-container" id="reviewsContainer"></div>
+
+ <form id="reviewForm" class="review-form">
+ <h3>Leave a Review</h3>
+ <div class="form-group">
+ <label for="reviewName">Name</label>
+ <input type="text" id="reviewName" required>
+ </div>
+ <div class="form-group">
+ <label for="reviewText">Your Review</label>
+ <textarea id="reviewText" rows="3" required></textarea>
+ </div>
+ <button type="submit">Post Review</button>
+ </form>
+ </section>
+</main>
+
+<footer>
+ <p>MedQuery - Online Medical Consultation Platform</p>
+</footer>
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..55f7a7f
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://medquery.scroll.pub
+metaTags
+editButton /consult.html
+title MedQuery - Online Medical Consultation
+style.css
+body.html
+script.js
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..abf46e1
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,20 @@
+{
+ "id": "msg_01V8x1DBAiqMp5tedgeEjtyQ",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a medical consultation website with the requested features. Here's a suitable domain name and implementation:\n\n---domain---\nmedquery.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://medquery.scroll.pub\nmetaTags\neditButton /consult.html\ntitle MedQuery - Online Medical Consultation\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <nav>\n <div class=\"logo\">MedQuery</div>\n <div class=\"nav-links\">\n <a href=\"#home\">Home</a>\n <a href=\"#consult\">Consult</a>\n <a href=\"#reviews\">Reviews</a>\n </div>\n </nav>\n</header>\n\n<main>\n <section id=\"home\" class=\"hero\">\n <h1>Professional Medical Consultation Online</h1>\n <p>Get expert medical advice from licensed professionals</p>\n </section>\n\n <section id=\"consult\" class=\"consultation-form\">\n <h2>Medical Consultation Form</h2>\n <form id=\"consultForm\">\n <div class=\"form-group\">\n <label for=\"name\">Full Name</label>\n <input type=\"text\" id=\"name\" required>\n </div>\n \n <div class=\"form-group\">\n <label for=\"email\">Email</label>\n <input type=\"email\" id=\"email\" required>\n </div>\n\n <div class=\"form-group\">\n <label for=\"symptoms\">Describe Your Symptoms</label>\n <textarea id=\"symptoms\" rows=\"4\" required></textarea>\n </div>\n\n <div class=\"form-group\">\n <label for=\"images\">Upload Images (Optional)</label>\n <input type=\"file\" id=\"images\" accept=\"image/*\" multiple>\n <div id=\"imagePreview\" class=\"image-preview\"></div>\n </div>\n\n <button type=\"submit\">Submit Consultation</button>\n </form>\n </section>\n\n <section id=\"reviews\" class=\"reviews\">\n <h2>Patient Reviews</h2>\n <div class=\"reviews-container\" id=\"reviewsContainer\"></div>\n \n <form id=\"reviewForm\" class=\"review-form\">\n <h3>Leave a Review</h3>\n <div class=\"form-group\">\n <label for=\"reviewName\">Name</label>\n <input type=\"text\" id=\"reviewName\" required>\n </div>\n <div class=\"form-group\">\n <label for=\"reviewText\">Your Review</label>\n <textarea id=\"reviewText\" rows=\"3\" required></textarea>\n </div>\n <button type=\"submit\">Post Review</button>\n </form>\n </section>\n</main>\n\n<footer>\n <p>MedQuery - Online Medical Consultation Platform</p>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #2c3e50;\n --accent-color: #3498db;\n --bg-color: #f9fafb;\n --text-color: #333;\n --shadow: 0 2px 15px rgba(0,0,0,0.1);\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 line-height: 1.6;\n color: var(--text-color);\n background: var(--bg-color);\n}\n\nheader {\n background: var(--primary-color);\n padding: 1rem;\n position: fixed;\n width: 100%;\n top: 0;\n z-index: 100;\n}\n\nnav {\n max-width: 1200px;\n margin: 0 auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.logo {\n color: white;\n font-size: 1.5rem;\n font-weight: bold;\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n margin-left: 2rem;\n transition: color 0.3s;\n}\n\n.nav-links a:hover {\n color: var(--accent-color);\n}\n\nmain {\n margin-top: 4rem;\n padding: 2rem;\n}\n\n.hero {\n text-align: center;\n padding: 4rem 1rem;\n background: linear-gradient(135deg, var(--primary-color), var(--accent-color));\n color: white;\n border-radius: 10px;\n margin-bottom: 3rem;\n}\n\n.hero h1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n}\n\n.consultation-form, .reviews {\n max-width: 800px;\n margin: 0 auto 3rem;\n padding: 2rem;\n background: white;\n border-radius: 10px;\n box-shadow: var(--shadow);\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: 5px;\n font-size: 1rem;\n}\n\nbutton {\n background: var(--accent-color);\n color: white;\n padding: 0.8rem 1.5rem;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n transition: background 0.3s;\n}\n\nbutton:hover {\n background: #2980b9;\n}\n\n.image-preview {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));\n gap: 1rem;\n margin-top: 1rem;\n}\n\n.image-preview img {\n width: 100%;\n height: 100px;\n object-fit: cover;\n border-radius: 5px;\n}\n\n.reviews-container {\n margin-bottom: 2rem;\n}\n\n.review {\n background: #f8f9fa;\n padding: 1rem;\n border-radius: 5px;\n margin-bottom: 1rem;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: var(--primary-color);\n color: white;\n}\n\n@media (max-width: 768px) {\n .nav-links {\n display: none;\n }\n \n .hero h1 {\n font-size: 2rem;\n }\n \n main {\n padding: 1rem;\n }\n \n .consultation-form, .reviews {\n padding: 1rem;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const consultForm = document.getElementById('consultForm');\n const reviewForm = document.getElementById('reviewForm');\n const reviewsContainer = document.getElementById('reviewsContainer');\n const imageInput = document.getElementById('images');\n const imagePreview = document.getElementById('imagePreview');\n\n // Handle image preview\n imageInput.addEventListener('change', (e) => {\n imagePreview.innerHTML = '';\n const files = Array.from(e.target.files);\n \n files.forEach(file => {\n if (file.type.startsWith('image/')) {\n const reader = new FileReader();\n reader.onload = (e) => {\n const img = document.createElement('img');\n img.src = e.target.result;\n imagePreview.appendChild(img);\n };\n reader.readAsDataURL(file);\n }\n });\n });\n\n // Handle consultation form submission\n consultForm.addEventListener('submit', (e) => {\n e.preventDefault();\n const formData = new FormData(consultForm);\n // Here you would typically send the data to a server\n alert('Consultation submitted successfully!');\n consultForm.reset();\n imagePreview.innerHTML = '';\n });\n\n // Handle review form submission\n reviewForm.addEventListener('submit', (e) => {\n e.preventDefault();\n const name = document.getElementById('reviewName').value;\n const text = document.getElementById('reviewText').value;\n \n addReview(name, text);\n reviewForm.reset();\n });\n\n // Add a new review to the page\n function addReview(name, text) {\n const review = document.createElement('div');\n review.className = 'review';\n review.innerHTML = `\n <strong>${name}</strong>\n <p>${text}</p>\n <small>${new Date().toLocaleDateString()}</small>\n `;\n reviewsContainer.prepend(review);\n }\n\n // Smooth scroll for navigation links\n document.querySelectorAll('a[href^=\"#\"]').forEach(anchor => {\n anchor.addEventListener('click', function (e) {\n e.preventDefault();\n document.querySelector(this.getAttribute('href')).scrollIntoView({\n behavior: 'smooth'\n });\n });\n });\n});\n\n---end---\n\nThis implementation creates a professional medical consultation website with:\n- Clean, modern design with smooth animations\n- Responsive layout that works on all devices\n- Consultation form with image upload functionality\n- Review system with dynamic review addition\n- Smooth scroll navigation\n- Accessible form controls and semantic HTML\n- Modern CSS with variables and gradients\n- Professional color scheme and typography\n\nThe site follows best practices for performance and accessibility while maintaining a professional medical appearance suitable for healthcare consultations."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 298,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2454
+ }
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..c03251a
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# medquery.scroll.pub
+Website generated by Claude from prompt: 一个在线问诊系统,有问诊表单,可以留言评论、上传图片
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..fe9d234
--- /dev/null
+++ b/script.js
@@ -0,0 +1,67 @@
+document.addEventListener('DOMContentLoaded', () => {
+ const consultForm = document.getElementById('consultForm');
+ const reviewForm = document.getElementById('reviewForm');
+ const reviewsContainer = document.getElementById('reviewsContainer');
+ const imageInput = document.getElementById('images');
+ const imagePreview = document.getElementById('imagePreview');
+
+ // Handle image preview
+ imageInput.addEventListener('change', (e) => {
+ imagePreview.innerHTML = '';
+ const files = Array.from(e.target.files);
+
+ files.forEach(file => {
+ if (file.type.startsWith('image/')) {
+ const reader = new FileReader();
+ reader.onload = (e) => {
+ const img = document.createElement('img');
+ img.src = e.target.result;
+ imagePreview.appendChild(img);
+ };
+ reader.readAsDataURL(file);
+ }
+ });
+ });
+
+ // Handle consultation form submission
+ consultForm.addEventListener('submit', (e) => {
+ e.preventDefault();
+ const formData = new FormData(consultForm);
+ // Here you would typically send the data to a server
+ alert('Consultation submitted successfully!');
+ consultForm.reset();
+ imagePreview.innerHTML = '';
+ });
+
+ // Handle review form submission
+ reviewForm.addEventListener('submit', (e) => {
+ e.preventDefault();
+ const name = document.getElementById('reviewName').value;
+ const text = document.getElementById('reviewText').value;
+
+ addReview(name, text);
+ reviewForm.reset();
+ });
+
+ // Add a new review to the page
+ function addReview(name, text) {
+ const review = document.createElement('div');
+ review.className = 'review';
+ review.innerHTML = `
+ <strong>${name}</strong>
+ <p>${text}</p>
+ <small>${new Date().toLocaleDateString()}</small>
+ `;
+ reviewsContainer.prepend(review);
+ }
+
+ // Smooth scroll for navigation links
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });
+});
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..eb8065a
--- /dev/null
+++ b/style.css
@@ -0,0 +1,164 @@
+:root {
+ --primary-color: #2c3e50;
+ --accent-color: #3498db;
+ --bg-color: #f9fafb;
+ --text-color: #333;
+ --shadow: 0 2px 15px rgba(0,0,0,0.1);
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background: var(--bg-color);
+}
+
+header {
+ background: var(--primary-color);
+ padding: 1rem;
+ position: fixed;
+ width: 100%;
+ top: 0;
+ z-index: 100;
+}
+
+nav {
+ max-width: 1200px;
+ margin: 0 auto;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.logo {
+ color: white;
+ font-size: 1.5rem;
+ font-weight: bold;
+}
+
+.nav-links a {
+ color: white;
+ text-decoration: none;
+ margin-left: 2rem;
+ transition: color 0.3s;
+}
+
+.nav-links a:hover {
+ color: var(--accent-color);
+}
+
+main {
+ margin-top: 4rem;
+ padding: 2rem;
+}
+
+.hero {
+ text-align: center;
+ padding: 4rem 1rem;
+ background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
+ color: white;
+ border-radius: 10px;
+ margin-bottom: 3rem;
+}
+
+.hero h1 {
+ font-size: 2.5rem;
+ margin-bottom: 1rem;
+}
+
+.consultation-form, .reviews {
+ max-width: 800px;
+ margin: 0 auto 3rem;
+ padding: 2rem;
+ background: white;
+ border-radius: 10px;
+ box-shadow: var(--shadow);
+}
+
+.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: 5px;
+ font-size: 1rem;
+}
+
+button {
+ background: var(--accent-color);
+ color: white;
+ padding: 0.8rem 1.5rem;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ transition: background 0.3s;
+}
+
+button:hover {
+ background: #2980b9;
+}
+
+.image-preview {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
+ gap: 1rem;
+ margin-top: 1rem;
+}
+
+.image-preview img {
+ width: 100%;
+ height: 100px;
+ object-fit: cover;
+ border-radius: 5px;
+}
+
+.reviews-container {
+ margin-bottom: 2rem;
+}
+
+.review {
+ background: #f8f9fa;
+ padding: 1rem;
+ border-radius: 5px;
+ margin-bottom: 1rem;
+}
+
+footer {
+ text-align: center;
+ padding: 2rem;
+ background: var(--primary-color);
+ color: white;
+}
+
+@media (max-width: 768px) {
+ .nav-links {
+ display: none;
+ }
+
+ .hero h1 {
+ font-size: 2rem;
+ }
+
+ main {
+ padding: 1rem;
+ }
+
+ .consultation-form, .reviews {
+ padding: 1rem;
+ }
+}