commit 131cb58e12a07b89f646e92ba8f82908e6f429e9
Author: root <root@hub.scroll.pub> Date: 2024-12-29 02:02:54 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..a81b5d9 --- /dev/null +++ b/body.html @@ -0,0 +1,61 @@ +<header> + <nav> + <div class="logo">Travel Vote</div> + <div class="nav-links"> + <a href="#destinations">Destinations</a> + <a href="#voting">Vote</a> + <a href="#results">Results</a> + </div> + </nav> +</header> + +<main> + <section class="hero"> + <h1>Where Should We Travel Next?</h1> + <p>Help us choose our next group travel destination by voting for your favorite places!</p> + </section> + + <section id="destinations" class="destinations"> + <h2>Popular Destinations</h2> + <div class="destination-grid"> + <div class="destination-card" data-destination="paris"> + <div class="card-content"> + <h3>Paris</h3> + <p>The City of Light</p> + <button class="vote-btn" aria-label="Vote for Paris">Vote</button> + <span class="vote-count">0</span> + </div> + </div> + <div class="destination-card" data-destination="tokyo"> + <div class="card-content"> + <h3>Tokyo</h3> + <p>Modern Meets Traditional</p> + <button class="vote-btn" aria-label="Vote for Tokyo">Vote</button> + <span class="vote-count">0</span> + </div> + </div> + <div class="destination-card" data-destination="bali"> + <div class="card-content"> + <h3>Bali</h3> + <p>Island Paradise</p> + <button class="vote-btn" aria-label="Vote for Bali">Vote</button> + <span class="vote-count">0</span> + </div> + </div> + </div> + </section> + + <section id="results" class="results"> + <h2>Current Results</h2> + <div class="results-chart"></div> + </section> +</main> + +<footer> + <p>Travel Vote - Making group travel decisions easier</p> + <nav> + <a href="#privacy">Privacy Policy</a> + <a href="#terms">Terms of Use</a> + <a href="#contact">Contact</a> + </nav> +</footer> diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..d7da443 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://travelvote.scroll.pub +metaTags +editButton /edit.html +title Travel Vote - Share Your Dream Destinations +style.css +body.html +script.js diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..20af709 --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_013UeDJ2b7GwcdMcSwyGg88u", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "Let me create a travel voting website with a clean, modern design.\n\n---domain---\ntravelvote.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://travelvote.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Travel Vote - Share Your Dream Destinations\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <nav>\n <div class=\"logo\">Travel Vote</div>\n <div class=\"nav-links\">\n <a href=\"#destinations\">Destinations</a>\n <a href=\"#voting\">Vote</a>\n <a href=\"#results\">Results</a>\n </div>\n </nav>\n</header>\n\n<main>\n <section class=\"hero\">\n <h1>Where Should We Travel Next?</h1>\n <p>Help us choose our next group travel destination by voting for your favorite places!</p>\n </section>\n\n <section id=\"destinations\" class=\"destinations\">\n <h2>Popular Destinations</h2>\n <div class=\"destination-grid\">\n <div class=\"destination-card\" data-destination=\"paris\">\n <div class=\"card-content\">\n <h3>Paris</h3>\n <p>The City of Light</p>\n <button class=\"vote-btn\" aria-label=\"Vote for Paris\">Vote</button>\n <span class=\"vote-count\">0</span>\n </div>\n </div>\n <div class=\"destination-card\" data-destination=\"tokyo\">\n <div class=\"card-content\">\n <h3>Tokyo</h3>\n <p>Modern Meets Traditional</p>\n <button class=\"vote-btn\" aria-label=\"Vote for Tokyo\">Vote</button>\n <span class=\"vote-count\">0</span>\n </div>\n </div>\n <div class=\"destination-card\" data-destination=\"bali\">\n <div class=\"card-content\">\n <h3>Bali</h3>\n <p>Island Paradise</p>\n <button class=\"vote-btn\" aria-label=\"Vote for Bali\">Vote</button>\n <span class=\"vote-count\">0</span>\n </div>\n </div>\n </div>\n </section>\n\n <section id=\"results\" class=\"results\">\n <h2>Current Results</h2>\n <div class=\"results-chart\"></div>\n </section>\n</main>\n\n<footer>\n <p>Travel Vote - Making group travel decisions easier</p>\n <nav>\n <a href=\"#privacy\">Privacy Policy</a>\n <a href=\"#terms\">Terms of Use</a>\n <a href=\"#contact\">Contact</a>\n </nav>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #2a6bc2;\n --secondary-color: #f5f7fa;\n --accent-color: #ff6b6b;\n --text-color: #333;\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\nheader {\n background: var(--secondary-color);\n padding: 1rem;\n position: fixed;\n width: 100%;\n top: 0;\n z-index: 100;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\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 font-size: 1.5rem;\n font-weight: bold;\n color: var(--primary-color);\n}\n\n.nav-links a {\n margin-left: 2rem;\n text-decoration: none;\n color: var(--text-color);\n transition: var(--transition);\n}\n\n.nav-links a:hover {\n color: var(--primary-color);\n}\n\nmain {\n margin-top: 4rem;\n}\n\n.hero {\n height: 60vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n background: linear-gradient(135deg, #6ab7ff 0%, #2a6bc2 100%);\n color: white;\n padding: 2rem;\n}\n\n.hero h1 {\n font-size: 3rem;\n margin-bottom: 1rem;\n}\n\n.destinations {\n padding: 4rem 2rem;\n}\n\n.destination-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n max-width: 1200px;\n margin: 2rem auto;\n}\n\n.destination-card {\n background: var(--secondary-color);\n border-radius: 1rem;\n overflow: hidden;\n transition: var(--transition);\n position: relative;\n}\n\n.destination-card:hover {\n transform: translateY(-5px);\n box-shadow: 0 10px 20px rgba(0,0,0,0.1);\n}\n\n.card-content {\n padding: 2rem;\n text-align: center;\n}\n\n.vote-btn {\n background: var(--accent-color);\n color: white;\n border: none;\n padding: 0.5rem 2rem;\n border-radius: 2rem;\n cursor: pointer;\n transition: var(--transition);\n margin-top: 1rem;\n}\n\n.vote-btn:hover {\n background: darken(var(--accent-color), 10%);\n transform: scale(1.05);\n}\n\n.vote-count {\n display: block;\n margin-top: 1rem;\n font-size: 1.2rem;\n font-weight: bold;\n}\n\n.results {\n padding: 4rem 2rem;\n background: var(--secondary-color);\n}\n\nfooter {\n background: var(--text-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nfooter nav {\n margin-top: 1rem;\n}\n\nfooter a {\n color: white;\n text-decoration: none;\n margin: 0 1rem;\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 .destination-grid {\n grid-template-columns: 1fr;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const voteButtons = document.querySelectorAll('.vote-btn');\n const votes = new Map();\n\n // Initialize votes\n document.querySelectorAll('.destination-card').forEach(card => {\n votes.set(card.dataset.destination, 0);\n });\n\n // Handle voting\n voteButtons.forEach(button => {\n button.addEventListener('click', (e) => {\n const card = e.target.closest('.destination-card');\n const destination = card.dataset.destination;\n const currentVotes = votes.get(destination) || 0;\n \n // Increment votes\n votes.set(destination, currentVotes + 1);\n \n // Update display\n card.querySelector('.vote-count').textContent = votes.get(destination);\n \n // Animate button\n button.classList.add('voted');\n setTimeout(() => button.classList.remove('voted'), 300);\n \n // Update chart\n updateResults();\n });\n });\n\n function updateResults() {\n const resultsChart = document.querySelector('.results-chart');\n resultsChart.innerHTML = '';\n \n votes.forEach((count, destination) => {\n const percentage = calculatePercentage(count);\n const bar = document.createElement('div');\n bar.className = 'result-bar';\n bar.innerHTML = `\n <div class=\"bar-label\">${destination}</div>\n <div class=\"bar-fill\" style=\"width: ${percentage}%\"></div>\n <div class=\"bar-value\">${count} votes (${percentage}%)</div>\n `;\n resultsChart.appendChild(bar);\n });\n }\n\n function calculatePercentage(count) {\n const total = Array.from(votes.values()).reduce((sum, current) => sum + current, 0);\n return total === 0 ? 0 : Math.round((count / total) * 100);\n }\n\n // Initialize results chart\n updateResults();\n});\n\n---end---\n\nThis website features:\n1. A clean, modern design with smooth animations\n2. Responsive layout that works on all devices\n3. Real-time voting system with visual feedback\n4. Results chart that updates automatically\n5. Accessible navigation and interactive elements\n6. SEO-friendly structure\n7. Beautiful gradient backgrounds and card designs\n8. Smooth hover effects and transitions\n9. Clear visual hierarchy\n10. Professional typography and spacing\n\nThe domain name \"travelvote.scroll.pub\" is:\n- Short and memorable\n- Directly describes the purpose\n- Easy to spell and pronounce\n- Professional sounding\n- Available (hypothetically)" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 285, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 2409 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..116608e --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# travelvote.scroll.pub +Website generated by Claude from prompt: I want a website to collect my customers who like travel to aboard by vote \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..1aaec16 --- /dev/null +++ b/script.js @@ -0,0 +1,56 @@ +document.addEventListener('DOMContentLoaded', () => { + const voteButtons = document.querySelectorAll('.vote-btn'); + const votes = new Map(); + + // Initialize votes + document.querySelectorAll('.destination-card').forEach(card => { + votes.set(card.dataset.destination, 0); + }); + + // Handle voting + voteButtons.forEach(button => { + button.addEventListener('click', (e) => { + const card = e.target.closest('.destination-card'); + const destination = card.dataset.destination; + const currentVotes = votes.get(destination) || 0; + + // Increment votes + votes.set(destination, currentVotes + 1); + + // Update display + card.querySelector('.vote-count').textContent = votes.get(destination); + + // Animate button + button.classList.add('voted'); + setTimeout(() => button.classList.remove('voted'), 300); + + // Update chart + updateResults(); + }); + }); + + function updateResults() { + const resultsChart = document.querySelector('.results-chart'); + resultsChart.innerHTML = ''; + + votes.forEach((count, destination) => { + const percentage = calculatePercentage(count); + const bar = document.createElement('div'); + bar.className = 'result-bar'; + bar.innerHTML = ` + <div class="bar-label">${destination}</div> + <div class="bar-fill" style="width: ${percentage}%"></div> + <div class="bar-value">${count} votes (${percentage}%)</div> + `; + resultsChart.appendChild(bar); + }); + } + + function calculatePercentage(count) { + const total = Array.from(votes.values()).reduce((sum, current) => sum + current, 0); + return total === 0 ? 0 : Math.round((count / total) * 100); + } + + // Initialize results chart + updateResults(); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..135137d --- /dev/null +++ b/style.css @@ -0,0 +1,164 @@ +:root { + --primary-color: #2a6bc2; + --secondary-color: #f5f7fa; + --accent-color: #ff6b6b; + --text-color: #333; + --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 { + background: var(--secondary-color); + padding: 1rem; + position: fixed; + width: 100%; + top: 0; + z-index: 100; + box-shadow: 0 2px 10px 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: var(--primary-color); +} + +.nav-links a { + margin-left: 2rem; + text-decoration: none; + color: var(--text-color); + transition: var(--transition); +} + +.nav-links a:hover { + color: var(--primary-color); +} + +main { + margin-top: 4rem; +} + +.hero { + height: 60vh; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; + background: linear-gradient(135deg, #6ab7ff 0%, #2a6bc2 100%); + color: white; + padding: 2rem; +} + +.hero h1 { + font-size: 3rem; + margin-bottom: 1rem; +} + +.destinations { + padding: 4rem 2rem; +} + +.destination-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 2rem; + max-width: 1200px; + margin: 2rem auto; +} + +.destination-card { + background: var(--secondary-color); + border-radius: 1rem; + overflow: hidden; + transition: var(--transition); + position: relative; +} + +.destination-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 20px rgba(0,0,0,0.1); +} + +.card-content { + padding: 2rem; + text-align: center; +} + +.vote-btn { + background: var(--accent-color); + color: white; + border: none; + padding: 0.5rem 2rem; + border-radius: 2rem; + cursor: pointer; + transition: var(--transition); + margin-top: 1rem; +} + +.vote-btn:hover { + background: darken(var(--accent-color), 10%); + transform: scale(1.05); +} + +.vote-count { + display: block; + margin-top: 1rem; + font-size: 1.2rem; + font-weight: bold; +} + +.results { + padding: 4rem 2rem; + background: var(--secondary-color); +} + +footer { + background: var(--text-color); + color: white; + padding: 2rem; + text-align: center; +} + +footer nav { + margin-top: 1rem; +} + +footer a { + color: white; + text-decoration: none; + margin: 0 1rem; +} + +@media (max-width: 768px) { + .nav-links { + display: none; + } + + .hero h1 { + font-size: 2rem; + } + + .destination-grid { + grid-template-columns: 1fr; + } +}