commit ab80836c05bf59f0cf0a4d819adb76a1ca318ab0
Author: root <root@hub.scroll.pub> Date: 2024-12-24 15:14:38 +0000 Subject: Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..76d4ca7 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# prose.scroll.pub +Website generated from prompt: An aggregator that lists daily updates of short stories and poems published by the top independent literary magazines from across the web \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..3e6e8e5 --- /dev/null +++ b/index.html @@ -0,0 +1,80 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content="Daily curated short stories and poems from top independent literary magazines"> + <meta name="keywords" content="short stories, poetry, literary magazines, fiction, creative writing"> + <title>Prose Scroll | Daily Literary Updates</title> + <link rel="stylesheet" href="style.css"> +</head> +<body> + <header> + <nav> + <div class="logo">ProseScroll</div> + <button class="menu-toggle" aria-label="Toggle menu"> + <span></span><span></span><span></span> + </button> + <ul class="nav-links"> + <li><a href="#stories">Stories</a></li> + <li><a href="#poems">Poems</a></li> + <li><a href="#magazines">Magazines</a></li> + <li><a href="#about">About</a></li> + </ul> + </nav> + </header> + + <main> + <section class="hero"> + <h1>Today's Literary Discoveries</h1> + <p>Fresh stories and poems from the world's finest independent magazines</p> + </section> + + <section id="featured" class="featured"> + <h2>Featured Today</h2> + <div class="featured-grid"></div> + </section> + + <section id="stories" class="content-section"> + <h2>Latest Stories</h2> + <div class="story-grid"></div> + </section> + + <section id="poems" class="content-section"> + <h2>Fresh Poems</h2> + <div class="poem-grid"></div> + </section> + + <section id="magazines" class="magazines"> + <h2>Contributing Magazines</h2> + <div class="magazine-list"></div> + </section> + </main> + + <footer> + <div class="footer-content"> + <div class="footer-section"> + <h3>ProseScroll</h3> + <p>Daily literary updates from independent magazines</p> + </div> + <div class="footer-section"> + <h3>Navigation</h3> + <ul> + <li><a href="#stories">Stories</a></li> + <li><a href="#poems">Poems</a></li> + <li><a href="#magazines">Magazines</a></li> + </ul> + </div> + <div class="footer-section"> + <h3>Connect</h3> + <ul class="social-links"> + <li><a href="#" aria-label="Twitter">Twitter</a></li> + <li><a href="#" aria-label="Instagram">Instagram</a></li> + <li><a href="#" aria-label="RSS Feed">RSS</a></li> + </ul> + </div> + </div> + </footer> + <script src="script.js"></script> +</body> +</html> diff --git a/script.js b/script.js new file mode 100644 index 0000000..43e2085 --- /dev/null +++ b/script.js @@ -0,0 +1,118 @@ +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'); + menuToggle.classList.toggle('active'); + }); + + // Sample data - In a real application, this would come from an API + const sampleContent = { + featured: [ + { + title: "The Last Summer Day", + author: "Sarah Chen", + magazine: "Narrative Magazine", + excerpt: "The sun hung low on the horizon, painting the sky in impossible colors..." + }, + { + title: "Metamorphosis in Blue", + author: "James Wright", + magazine: "Poetry Foundation", + excerpt: "Where the light bends / In the corners of your mind..." + } + ], + stories: [ + { + title: "The Silent House", + author: "Michael Torres", + magazine: "Ploughshares" + }, + { + title: "Beyond the Fence", + author: "Lisa Kumar", + magazine: "Granta" + } + ], + poems: [ + { + title: "Morning Ritual", + author: "Emma Wilson", + magazine: "Paris Review" + }, + { + title: "Urban Symphony", + author: "David Chang", + magazine: "Poetry Magazine" + } + ] + }; + + // Populate content + function createCard(item, type) { + const card = document.createElement('article'); + card.className = 'card'; + card.innerHTML = ` + <h3>${item.title}</h3> + <p class="author">by ${item.author}</p> + <p class="magazine">${item.magazine}</p> + ${item.excerpt ? `<p class="excerpt">${item.excerpt}</p>` : ''} + `; + return card; + } + + // Populate featured content + const featuredGrid = document.querySelector('.featured-grid'); + sampleContent.featured.forEach(item => { + featuredGrid.appendChild(createCard(item, 'featured')); + }); + + // Populate stories + const storyGrid = document.querySelector('.story-grid'); + sampleContent.stories.forEach(item => { + storyGrid.appendChild(createCard(item, 'story')); + }); + + // Populate poems + const poemGrid = document.querySelector('.poem-grid'); + sampleContent.poems.forEach(item => { + poemGrid.appendChild(createCard(item, 'poem')); + }); + + // Smooth scroll for navigation links + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + const target = document.querySelector(this.getAttribute('href')); + if (target) { + target.scrollIntoView({ + behavior: 'smooth', + block: 'start' + }); + // Close mobile menu if open + navLinks.classList.remove('active'); + } + }); + }); + + // Intersection Observer for animation + const observer = new IntersectionObserver((entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.style.opacity = '1'; + entry.target.style.transform = 'translateY(0)'; + } + }); + }, { + threshold: 0.1 + }); + + document.querySelectorAll('.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..0e6ef4a --- /dev/null +++ b/style.css @@ -0,0 +1,205 @@ +:root { + --primary-color: #2a2a4a; + --secondary-color: #4a4a6a; + --accent-color: #f0b429; + --text-color: #333; + --background-color: #fafafa; + --card-shadow: 0 4px 6px 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 & Navigation */ +header { + background: var(--primary-color); + padding: 1rem; + position: fixed; + width: 100%; + top: 0; + z-index: 1000; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +nav { + max-width: 1200px; + margin: 0 auto; + display: flex; + justify-content: space-between; + align-items: center; +} + +.logo { + font-size: 1.5rem; + font-weight: bold; + color: white; + text-decoration: none; +} + +.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 { + margin-top: 4rem; + padding: 6rem 2rem; + text-align: center; + background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); + color: white; +} + +.hero h1 { + font-size: 3rem; + margin-bottom: 1rem; + animation: fadeIn 1s ease-out; +} + +.hero p { + font-size: 1.2rem; + max-width: 600px; + margin: 0 auto; + opacity: 0.9; +} + +/* Content Sections */ +section { + padding: 4rem 2rem; + max-width: 1200px; + margin: 0 auto; +} + +.featured-grid, +.story-grid, +.poem-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 2rem; + margin-top: 2rem; +} + +.card { + background: white; + border-radius: 8px; + padding: 1.5rem; + box-shadow: var(--card-shadow); + transition: transform 0.3s ease; +} + +.card:hover { + transform: translateY(-5px); +} + +/* Magazine List */ +.magazine-list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1.5rem; + margin-top: 2rem; +} + +/* Footer */ +footer { + background: var(--primary-color); + color: white; + padding: 4rem 2rem; + margin-top: 4rem; +} + +.footer-content { + max-width: 1200px; + margin: 0 auto; + 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; + transition: color 0.3s ease; +} + +.footer-section a:hover { + color: var(--accent-color); +} + +/* Animations */ +@keyframes fadeIn { + from { opacity: 0; transform: translateY(20px); } + to { opacity: 1; transform: translateY(0); } +} + +/* 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; + text-align: center; + } + + .nav-links.active { + display: flex; + } + + .hero h1 { + font-size: 2rem; + } +}