commit 16c849e81bd4c0b75adb3826a48c2f774687b923
Author: root <root@hub.scroll.pub> Date: 2024-12-27 17:01:17 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..7a104ce --- /dev/null +++ b/body.html @@ -0,0 +1,65 @@ +<header> + <nav class="top-nav"> + <div class="logo">Latest<span>Now</span></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="#">World</a></li> + <li><a href="#">Technology</a></li> + <li><a href="#">Business</a></li> + <li><a href="#">Science</a></li> + </ul> + </nav> +</header> + +<main> + <section class="featured"> + <article class="main-story"> + <div class="story-content"> + <span class="category">Technology</span> + <h1>Breakthrough in Quantum Computing Promises New Era of Technology</h1> + <p class="excerpt">Scientists achieve major milestone in quantum supremacy, opening doors to unprecedented computing power.</p> + <div class="meta"> + <time datetime="2024-01-20">20 Jan 2024</time> + <span class="reading-time">5 min read</span> + </div> + </div> + </article> + </section> + + <section class="news-grid"> + <h2 class="section-title">Latest Stories</h2> + <div class="grid-container"> + <!-- News items will be dynamically inserted here by JavaScript --> + </div> + </section> + + <section class="newsletter"> + <h2>Stay Updated</h2> + <p>Get the latest news delivered to your inbox</p> + <form id="newsletter-form"> + <input type="email" placeholder="Enter your email" required> + <button type="submit">Subscribe</button> + </form> + </section> +</main> + +<footer> + <div class="footer-content"> + <div class="footer-section"> + <h3>LatestNow</h3> + <p>Your trusted source for breaking news and in-depth stories.</p> + </div> + <div class="footer-section"> + <h3>Quick Links</h3> + <ul> + <li><a href="#">About Us</a></li> + <li><a href="#">Contact</a></li> + <li><a href="#">Privacy Policy</a></li> + <li><a href="#">Terms of Use</a></li> + </ul> + </div> + </div> +</footer> diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..a0d05b3 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://latestnow.scroll.pub +metaTags +editButton /edit.html +title Latest Now - Breaking News & Updates +style.css +body.html +script.js diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..d714383 --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_01NyZKx3S7YanipYYDbffHdV", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "I'll create a clean news website. For the domain, I suggest:\n\n---domain---\nlatestnow.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://latestnow.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Latest Now - Breaking News & Updates\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <nav class=\"top-nav\">\n <div class=\"logo\">Latest<span>Now</span></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=\"#\" class=\"active\">Home</a></li>\n <li><a href=\"#\">World</a></li>\n <li><a href=\"#\">Technology</a></li>\n <li><a href=\"#\">Business</a></li>\n <li><a href=\"#\">Science</a></li>\n </ul>\n </nav>\n</header>\n\n<main>\n <section class=\"featured\">\n <article class=\"main-story\">\n <div class=\"story-content\">\n <span class=\"category\">Technology</span>\n <h1>Breakthrough in Quantum Computing Promises New Era of Technology</h1>\n <p class=\"excerpt\">Scientists achieve major milestone in quantum supremacy, opening doors to unprecedented computing power.</p>\n <div class=\"meta\">\n <time datetime=\"2024-01-20\">20 Jan 2024</time>\n <span class=\"reading-time\">5 min read</span>\n </div>\n </div>\n </article>\n </section>\n\n <section class=\"news-grid\">\n <h2 class=\"section-title\">Latest Stories</h2>\n <div class=\"grid-container\">\n <!-- News items will be dynamically inserted here by JavaScript -->\n </div>\n </section>\n\n <section class=\"newsletter\">\n <h2>Stay Updated</h2>\n <p>Get the latest news delivered to your inbox</p>\n <form id=\"newsletter-form\">\n <input type=\"email\" placeholder=\"Enter your email\" required>\n <button type=\"submit\">Subscribe</button>\n </form>\n </section>\n</main>\n\n<footer>\n <div class=\"footer-content\">\n <div class=\"footer-section\">\n <h3>LatestNow</h3>\n <p>Your trusted source for breaking news and in-depth stories.</p>\n </div>\n <div class=\"footer-section\">\n <h3>Quick Links</h3>\n <ul>\n <li><a href=\"#\">About Us</a></li>\n <li><a href=\"#\">Contact</a></li>\n <li><a href=\"#\">Privacy Policy</a></li>\n <li><a href=\"#\">Terms of Use</a></li>\n </ul>\n </div>\n </div>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #2a2a2a;\n --accent-color: #ff4757;\n --text-color: #333;\n --light-gray: #f5f5f5;\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 line-height: 1.6;\n color: var(--text-color);\n}\n\n/* Header & Navigation */\n.top-nav {\n background: white;\n padding: 1rem 5%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n position: sticky;\n top: 0;\n z-index: 1000;\n}\n\n.logo {\n font-size: 1.8rem;\n font-weight: 700;\n color: var(--primary-color);\n}\n\n.logo span {\n color: var(--accent-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.menu-toggle {\n display: none;\n}\n\n/* Featured Section */\n.featured {\n padding: 2rem 5%;\n}\n\n.main-story {\n background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)),\n url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDABQODxIPDRQSEBIXFRQdHx0cHBwcHx0cHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBz/2wBDAR0XFxkcJBwcJBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBz/wAARCAAIAAoDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAX/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABmX/9k=');\n background-size: cover;\n background-position: center;\n border-radius: 1rem;\n min-height: 400px;\n display: flex;\n align-items: flex-end;\n overflow: hidden;\n}\n\n.story-content {\n color: white;\n padding: 2rem;\n background: linear-gradient(transparent, rgba(0,0,0,0.8));\n width: 100%;\n}\n\n.category {\n background: var(--accent-color);\n padding: 0.3rem 1rem;\n border-radius: 2rem;\n font-size: 0.9rem;\n font-weight: 500;\n}\n\n.meta {\n margin-top: 1rem;\n font-size: 0.9rem;\n opacity: 0.8;\n}\n\n/* News Grid */\n.news-grid {\n padding: 2rem 5%;\n}\n\n.section-title {\n margin-bottom: 2rem;\n font-size: 2rem;\n color: var(--primary-color);\n}\n\n.grid-container {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 2rem;\n}\n\n/* Newsletter Section */\n.newsletter {\n background: var(--light-gray);\n padding: 4rem 5%;\n text-align: center;\n}\n\n.newsletter form {\n max-width: 500px;\n margin: 2rem auto;\n display: flex;\n gap: 1rem;\n}\n\n.newsletter input {\n flex: 1;\n padding: 1rem;\n border: 2px solid transparent;\n border-radius: 0.5rem;\n font-size: 1rem;\n}\n\n.newsletter button {\n background: var(--accent-color);\n color: white;\n border: none;\n padding: 1rem 2rem;\n border-radius: 0.5rem;\n cursor: pointer;\n transition: var(--transition);\n}\n\n.newsletter button:hover {\n background: #e0394a;\n}\n\n/* Footer */\nfooter {\n background: var(--primary-color);\n color: white;\n padding: 4rem 5%;\n}\n\n.footer-content {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 2rem;\n}\n\n.footer-section h3 {\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: var(--transition);\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: 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: white;\n flex-direction: column;\n padding: 1rem;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n }\n\n .nav-links.active {\n display: flex;\n }\n\n .newsletter form {\n flex-direction: column;\n }\n\n .main-story {\n min-height: 300px;\n }\n}\n\n---script.js---\n// Sample news data\nconst newsData = [\n {\n title: \"Global Climate Summit Reaches Historic Agreement\",\n category: \"World\",\n date: \"2024-01-19\",\n excerpt: \"World leaders commit to ambitious carbon reduction targets in landmark decision.\"\n },\n {\n title: \"New AI Model Revolutionizes Medical Diagnosis\",\n category: \"Technology\",\n date: \"2024-01-18\",\n excerpt: \"Artificial intelligence system achieves breakthrough in early disease detection.\"\n },\n {\n title: \"Space Tourism Company Announces First Commercial Flight\",\n category: \"Science\",\n date: \"2024-01-17\",\n excerpt: \"Private space travel becomes reality as company sets launch date.\"\n }\n];\n\n// Mobile menu toggle\ndocument.querySelector('.menu-toggle').addEventListener('click', () => {\n document.querySelector('.nav-links').classList.toggle('active');\n});\n\n// Populate news grid\nfunction populateNews() {\n const gridContainer = document.querySelector('.grid-container');\n \n newsData.forEach(news => {\n const article = document.createElement('article');\n article.className = 'news-item';\n article.innerHTML = `\n <span class=\"category\">${news.category}</span>\n <h3>${news.title}</h3>\n <p>${news.excerpt}</p>\n <div class=\"meta\">\n <time datetime=\"${news.date}\">${formatDate(news.date)}</time>\n </div>\n `;\n gridContainer.appendChild(article);\n });\n}\n\n// Format date\nfunction formatDate(dateString) {\n const options = { day: 'numeric', month: 'short', year: 'numeric' };\n return new Date(dateString).toLocaleDateString('en-US', options);\n}\n\n// Newsletter form handling\ndocument.getElementById('newsletter-form').addEventListener('submit', (e) => {\n e.preventDefault();\n const email = e.target.querySelector('input[type=\"email\"]').value;\n alert(`Thank you for subscribing with: ${email}`);\n e.target.reset();\n});\n\n// Initialize\ndocument.addEventListener('DOMContentLoaded', () => {\n populateNews();\n});\n\n---end---" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 275, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 3463 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..e6e0ba6 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# latestnow.scroll.pub +Website generated by Claude from prompt: create a website latest news \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..7eefa17 --- /dev/null +++ b/script.js @@ -0,0 +1,64 @@ +// Sample news data +const newsData = [ + { + title: "Global Climate Summit Reaches Historic Agreement", + category: "World", + date: "2024-01-19", + excerpt: "World leaders commit to ambitious carbon reduction targets in landmark decision." + }, + { + title: "New AI Model Revolutionizes Medical Diagnosis", + category: "Technology", + date: "2024-01-18", + excerpt: "Artificial intelligence system achieves breakthrough in early disease detection." + }, + { + title: "Space Tourism Company Announces First Commercial Flight", + category: "Science", + date: "2024-01-17", + excerpt: "Private space travel becomes reality as company sets launch date." + } +]; + +// Mobile menu toggle +document.querySelector('.menu-toggle').addEventListener('click', () => { + document.querySelector('.nav-links').classList.toggle('active'); +}); + +// Populate news grid +function populateNews() { + const gridContainer = document.querySelector('.grid-container'); + + newsData.forEach(news => { + const article = document.createElement('article'); + article.className = 'news-item'; + article.innerHTML = ` + <span class="category">${news.category}</span> + <h3>${news.title}</h3> + <p>${news.excerpt}</p> + <div class="meta"> + <time datetime="${news.date}">${formatDate(news.date)}</time> + </div> + `; + gridContainer.appendChild(article); + }); +} + +// Format date +function formatDate(dateString) { + const options = { day: 'numeric', month: 'short', year: 'numeric' }; + return new Date(dateString).toLocaleDateString('en-US', options); +} + +// Newsletter form handling +document.getElementById('newsletter-form').addEventListener('submit', (e) => { + e.preventDefault(); + const email = e.target.querySelector('input[type="email"]').value; + alert(`Thank you for subscribing with: ${email}`); + e.target.reset(); +}); + +// Initialize +document.addEventListener('DOMContentLoaded', () => { + populateNews(); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..f5d4026 --- /dev/null +++ b/style.css @@ -0,0 +1,230 @@ +:root { + --primary-color: #2a2a2a; + --accent-color: #ff4757; + --text-color: #333; + --light-gray: #f5f5f5; + --transition: all 0.3s ease; +} + +* { + 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); +} + +/* Header & Navigation */ +.top-nav { + background: white; + padding: 1rem 5%; + display: flex; + justify-content: space-between; + align-items: center; + box-shadow: 0 2px 10px rgba(0,0,0,0.1); + position: sticky; + top: 0; + z-index: 1000; +} + +.logo { + font-size: 1.8rem; + font-weight: 700; + color: var(--primary-color); +} + +.logo span { + color: var(--accent-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); +} + +.menu-toggle { + display: none; +} + +/* Featured Section */ +.featured { + padding: 2rem 5%; +} + +.main-story { + background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)), + url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDABQODxIPDRQSEBIXFRQdHx0cHBwcHx0cHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBz/2wBDAR0XFxkcJBwcJBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBz/wAARCAAIAAoDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAX/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABmX/9k='); + background-size: cover; + background-position: center; + border-radius: 1rem; + min-height: 400px; + display: flex; + align-items: flex-end; + overflow: hidden; +} + +.story-content { + color: white; + padding: 2rem; + background: linear-gradient(transparent, rgba(0,0,0,0.8)); + width: 100%; +} + +.category { + background: var(--accent-color); + padding: 0.3rem 1rem; + border-radius: 2rem; + font-size: 0.9rem; + font-weight: 500; +} + +.meta { + margin-top: 1rem; + font-size: 0.9rem; + opacity: 0.8; +} + +/* News Grid */ +.news-grid { + padding: 2rem 5%; +} + +.section-title { + margin-bottom: 2rem; + font-size: 2rem; + color: var(--primary-color); +} + +.grid-container { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: 2rem; +} + +/* Newsletter Section */ +.newsletter { + background: var(--light-gray); + padding: 4rem 5%; + text-align: center; +} + +.newsletter form { + max-width: 500px; + margin: 2rem auto; + display: flex; + gap: 1rem; +} + +.newsletter input { + flex: 1; + padding: 1rem; + border: 2px solid transparent; + border-radius: 0.5rem; + font-size: 1rem; +} + +.newsletter button { + background: var(--accent-color); + color: white; + border: none; + padding: 1rem 2rem; + border-radius: 0.5rem; + cursor: pointer; + transition: var(--transition); +} + +.newsletter button:hover { + background: #e0394a; +} + +/* Footer */ +footer { + background: var(--primary-color); + color: white; + padding: 4rem 5%; +} + +.footer-content { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 2rem; +} + +.footer-section h3 { + margin-bottom: 1rem; +} + +.footer-section ul { + list-style: none; +} + +.footer-section a { + color: white; + text-decoration: none; + opacity: 0.8; + transition: var(--transition); +} + +.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: var(--text-color); + margin: 5px 0; + transition: var(--transition); + } + + .nav-links { + display: none; + position: absolute; + top: 100%; + left: 0; + right: 0; + background: white; + flex-direction: column; + padding: 1rem; + box-shadow: 0 2px 10px rgba(0,0,0,0.1); + } + + .nav-links.active { + display: flex; + } + + .newsletter form { + flex-direction: column; + } + + .main-story { + min-height: 300px; + } +}