commit 509ae2a01bd07538f95a3dafcd89bb7a457f94b5
Author: root <root@hub.scroll.pub> Date: 2024-12-31 04:31:05 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..bda425b --- /dev/null +++ b/body.html @@ -0,0 +1,75 @@ +<header class="site-header"> + <nav> + <div class="logo">Simple Blog</div> + <button class="menu-toggle" aria-label="Toggle menu"> + <span></span> + <span></span> + <span></span> + </button> + <ul class="nav-links"> + <li><a href="/" class="active">Home</a></li> + <li><a href="/articles">Articles</a></li> + <li><a href="/about">About</a></li> + <li><a href="/contact">Contact</a></li> + </ul> + </nav> +</header> + +<main> + <section class="hero"> + <h1>Welcome to Simple Blog</h1> + <p>A space for thoughts and ideas</p> + </section> + + <section class="featured-posts"> + <h2>Latest Posts</h2> + <div class="post-grid"> + <article class="post-card"> + <div class="post-image"></div> + <div class="post-content"> + <h3>Getting Started with Web Development</h3> + <p>Learn the fundamentals of modern web development...</p> + <time datetime="2024-01-20">Jan 20, 2024</time> + </div> + </article> + <article class="post-card"> + <div class="post-image"></div> + <div class="post-content"> + <h3>The Art of Minimalism</h3> + <p>Exploring the beauty of simplicity in design...</p> + <time datetime="2024-01-18">Jan 18, 2024</time> + </div> + </article> + <article class="post-card"> + <div class="post-image"></div> + <div class="post-content"> + <h3>Creative Writing Tips</h3> + <p>Enhance your writing skills with these proven techniques...</p> + <time datetime="2024-01-15">Jan 15, 2024</time> + </div> + </article> + </div> + </section> +</main> + +<footer> + <div class="footer-content"> + <div class="footer-section"> + <h4>Navigation</h4> + <ul> + <li><a href="/">Home</a></li> + <li><a href="/articles">Articles</a></li> + <li><a href="/about">About</a></li> + <li><a href="/contact">Contact</a></li> + </ul> + </div> + <div class="footer-section"> + <h4>Connect</h4> + <ul class="social-links"> + <li><a href="#" aria-label="Twitter">Twitter</a></li> + <li><a href="#" aria-label="GitHub">GitHub</a></li> + <li><a href="#" aria-label="LinkedIn">LinkedIn</a></li> + </ul> + </div> + </div> +</footer> diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..c85fbee --- /dev/null +++ b/index.scroll @@ -0,0 +1,11 @@ +buildHtml +baseUrl https://simpleblog.scroll.pub +metaTags + description A minimalist and elegant personal blog + keywords blog, writing, personal, articles + author Simple Blog +editButton /edit.html +title Simple Blog +style.css +body.html +script.js diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..bbc988b --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_01YYqYMbbiWvXQHKhLyYF687", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "I'll help create a simple but elegant blog website.\n\n---domain---\nsimpleblog.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://simpleblog.scroll.pub\nmetaTags\n description A minimalist and elegant personal blog\n keywords blog, writing, personal, articles\n author Simple Blog\neditButton /edit.html\ntitle Simple Blog\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header class=\"site-header\">\n <nav>\n <div class=\"logo\">Simple Blog</div>\n <button class=\"menu-toggle\" aria-label=\"Toggle menu\">\n <span></span>\n <span></span>\n <span></span>\n </button>\n <ul class=\"nav-links\">\n <li><a href=\"/\" class=\"active\">Home</a></li>\n <li><a href=\"/articles\">Articles</a></li>\n <li><a href=\"/about\">About</a></li>\n <li><a href=\"/contact\">Contact</a></li>\n </ul>\n </nav>\n</header>\n\n<main>\n <section class=\"hero\">\n <h1>Welcome to Simple Blog</h1>\n <p>A space for thoughts and ideas</p>\n </section>\n\n <section class=\"featured-posts\">\n <h2>Latest Posts</h2>\n <div class=\"post-grid\">\n <article class=\"post-card\">\n <div class=\"post-image\"></div>\n <div class=\"post-content\">\n <h3>Getting Started with Web Development</h3>\n <p>Learn the fundamentals of modern web development...</p>\n <time datetime=\"2024-01-20\">Jan 20, 2024</time>\n </div>\n </article>\n <article class=\"post-card\">\n <div class=\"post-image\"></div>\n <div class=\"post-content\">\n <h3>The Art of Minimalism</h3>\n <p>Exploring the beauty of simplicity in design...</p>\n <time datetime=\"2024-01-18\">Jan 18, 2024</time>\n </div>\n </article>\n <article class=\"post-card\">\n <div class=\"post-image\"></div>\n <div class=\"post-content\">\n <h3>Creative Writing Tips</h3>\n <p>Enhance your writing skills with these proven techniques...</p>\n <time datetime=\"2024-01-15\">Jan 15, 2024</time>\n </div>\n </article>\n </div>\n </section>\n</main>\n\n<footer>\n <div class=\"footer-content\">\n <div class=\"footer-section\">\n <h4>Navigation</h4>\n <ul>\n <li><a href=\"/\">Home</a></li>\n <li><a href=\"/articles\">Articles</a></li>\n <li><a href=\"/about\">About</a></li>\n <li><a href=\"/contact\">Contact</a></li>\n </ul>\n </div>\n <div class=\"footer-section\">\n <h4>Connect</h4>\n <ul class=\"social-links\">\n <li><a href=\"#\" aria-label=\"Twitter\">Twitter</a></li>\n <li><a href=\"#\" aria-label=\"GitHub\">GitHub</a></li>\n <li><a href=\"#\" aria-label=\"LinkedIn\">LinkedIn</a></li>\n </ul>\n </div>\n </div>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #2a2a2a;\n --accent-color: #6b17e6;\n --background-color: #ffffff;\n --text-color: #333333;\n --shadow-color: 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: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--background-color);\n}\n\n/* Header Styles */\n.site-header {\n background: var(--primary-color);\n padding: 1rem;\n position: sticky;\n top: 0;\n z-index: 1000;\n box-shadow: 0 2px 8px var(--shadow-color);\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 {\n display: flex;\n list-style: none;\n gap: 2rem;\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n transition: color 0.3s ease;\n}\n\n.nav-links a:hover {\n color: var(--accent-color);\n}\n\n.menu-toggle {\n display: none;\n}\n\n/* Hero Section */\n.hero {\n text-align: center;\n padding: 4rem 2rem;\n background: linear-gradient(135deg, var(--accent-color), #8e44ad);\n color: white;\n}\n\n.hero h1 {\n font-size: 3rem;\n margin-bottom: 1rem;\n}\n\n/* Featured Posts */\n.featured-posts {\n max-width: 1200px;\n margin: 4rem auto;\n padding: 0 2rem;\n}\n\n.post-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n margin-top: 2rem;\n}\n\n.post-card {\n background: white;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 4px 12px var(--shadow-color);\n transition: transform 0.3s ease;\n}\n\n.post-card:hover {\n transform: translateY(-5px);\n}\n\n.post-image {\n height: 200px;\n background: var(--accent-color);\n opacity: 0.8;\n}\n\n.post-content {\n padding: 1.5rem;\n}\n\n.post-content h3 {\n margin-bottom: 0.5rem;\n color: var(--primary-color);\n}\n\n.post-content time {\n color: #666;\n font-size: 0.9rem;\n}\n\n/* Footer */\nfooter {\n background: var(--primary-color);\n color: white;\n padding: 3rem 2rem;\n margin-top: 4rem;\n}\n\n.footer-content {\n max-width: 1200px;\n margin: 0 auto;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 2rem;\n}\n\n.footer-section h4 {\n margin-bottom: 1rem;\n}\n\n.footer-section ul {\n list-style: none;\n}\n\n.footer-section a {\n color: white;\n text-decoration: none;\n opacity: 0.8;\n transition: opacity 0.3s ease;\n}\n\n.footer-section a:hover {\n opacity: 1;\n}\n\n/* Mobile Responsive */\n@media (max-width: 768px) {\n .menu-toggle {\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0.5rem;\n }\n\n .menu-toggle span {\n display: block;\n width: 25px;\n height: 3px;\n background: white;\n margin: 5px 0;\n transition: 0.3s;\n }\n\n .nav-links {\n display: none;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: var(--primary-color);\n flex-direction: column;\n padding: 1rem;\n gap: 1rem;\n }\n\n .nav-links.active {\n display: flex;\n }\n\n .hero h1 {\n font-size: 2rem;\n }\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 // Animate hamburger menu\n const spans = menuToggle.querySelectorAll('span');\n spans.forEach(span => span.classList.toggle('active'));\n });\n\n // Close mobile menu when clicking outside\n document.addEventListener('click', (e) => {\n if (!menuToggle.contains(e.target) && !navLinks.contains(e.target)) {\n navLinks.classList.remove('active');\n }\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 // Add animation to post cards on scroll\n const observerOptions = {\n threshold: 0.1\n };\n\n const observer = new IntersectionObserver((entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n entry.target.style.opacity = '1';\n entry.target.style.transform = 'translateY(0)';\n }\n });\n }, observerOptions);\n\n document.querySelectorAll('.post-card').forEach(card => {\n card.style.opacity = '0';\n card.style.transform = 'translateY(20px)';\n card.style.transition = 'opacity 0.5s ease, transform 0.5s ease';\n observer.observe(card);\n });\n});\n\n---end---\n\nThis creates a beautiful, responsive blog website with modern animations and interactions. The design features:\n\n1. Clean, minimal aesthetic with a purple accent color\n2. Smooth animations and transitions\n3. Responsive grid layout for blog posts\n4. Mobile-friendly navigation with hamburger menu\n5. Intersection Observer for scroll animations\n6. Accessible semantic HTML\n7. Modern CSS features including CSS Grid and Flexbox\n8. Beautiful hover effects and shadows\n9. Sticky header with smooth color transitions\n10. Gradient hero section\n\nThe code is completely self-contained with no external dependencies, optimized for performance, and follows modern web development best practices." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 279, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 2775 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..1f16b98 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# simpleblog.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..883005c --- /dev/null +++ b/script.js @@ -0,0 +1,51 @@ +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'); + + // Animate hamburger menu + const spans = menuToggle.querySelectorAll('span'); + spans.forEach(span => span.classList.toggle('active')); + }); + + // Close mobile menu when clicking outside + document.addEventListener('click', (e) => { + if (!menuToggle.contains(e.target) && !navLinks.contains(e.target)) { + navLinks.classList.remove('active'); + } + }); + + // 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' + }); + }); + }); + + // Add animation to post cards on scroll + const observerOptions = { + threshold: 0.1 + }; + + const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.style.opacity = '1'; + entry.target.style.transform = 'translateY(0)'; + } + }); + }, observerOptions); + + document.querySelectorAll('.post-card').forEach(card => { + card.style.opacity = '0'; + card.style.transform = 'translateY(20px)'; + card.style.transition = 'opacity 0.5s ease, transform 0.5s ease'; + observer.observe(card); + }); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..0f7829b --- /dev/null +++ b/style.css @@ -0,0 +1,198 @@ +:root { + --primary-color: #2a2a2a; + --accent-color: #6b17e6; + --background-color: #ffffff; + --text-color: #333333; + --shadow-color: rgba(0, 0, 0, 0.1); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + line-height: 1.6; + color: var(--text-color); + background-color: var(--background-color); +} + +/* Header Styles */ +.site-header { + background: var(--primary-color); + padding: 1rem; + position: sticky; + top: 0; + z-index: 1000; + box-shadow: 0 2px 8px var(--shadow-color); +} + +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 { + display: flex; + list-style: none; + gap: 2rem; +} + +.nav-links a { + color: white; + text-decoration: none; + transition: color 0.3s ease; +} + +.nav-links a:hover { + color: var(--accent-color); +} + +.menu-toggle { + display: none; +} + +/* Hero Section */ +.hero { + text-align: center; + padding: 4rem 2rem; + background: linear-gradient(135deg, var(--accent-color), #8e44ad); + color: white; +} + +.hero h1 { + font-size: 3rem; + margin-bottom: 1rem; +} + +/* Featured Posts */ +.featured-posts { + max-width: 1200px; + margin: 4rem auto; + padding: 0 2rem; +} + +.post-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 2rem; + margin-top: 2rem; +} + +.post-card { + background: white; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 4px 12px var(--shadow-color); + transition: transform 0.3s ease; +} + +.post-card:hover { + transform: translateY(-5px); +} + +.post-image { + height: 200px; + background: var(--accent-color); + opacity: 0.8; +} + +.post-content { + padding: 1.5rem; +} + +.post-content h3 { + margin-bottom: 0.5rem; + color: var(--primary-color); +} + +.post-content time { + color: #666; + font-size: 0.9rem; +} + +/* Footer */ +footer { + background: var(--primary-color); + color: white; + padding: 3rem 2rem; + margin-top: 4rem; +} + +.footer-content { + max-width: 1200px; + margin: 0 auto; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 2rem; +} + +.footer-section h4 { + margin-bottom: 1rem; +} + +.footer-section ul { + list-style: none; +} + +.footer-section a { + color: white; + text-decoration: none; + opacity: 0.8; + transition: opacity 0.3s ease; +} + +.footer-section a:hover { + opacity: 1; +} + +/* Mobile Responsive */ +@media (max-width: 768px) { + .menu-toggle { + display: block; + background: none; + border: none; + cursor: pointer; + padding: 0.5rem; + } + + .menu-toggle span { + display: block; + width: 25px; + height: 3px; + background: white; + margin: 5px 0; + transition: 0.3s; + } + + .nav-links { + display: none; + position: absolute; + top: 100%; + left: 0; + right: 0; + background: var(--primary-color); + flex-direction: column; + padding: 1rem; + gap: 1rem; + } + + .nav-links.active { + display: flex; + } + + .hero h1 { + font-size: 2rem; + } +}