commit 9b6ccb99ebc5c951c125b45b83e916c5b8a9edd2
Author: root <root@hub.scroll.pub> Date: 2024-12-27 19:13:53 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..f6a04b5 --- /dev/null +++ b/body.html @@ -0,0 +1,50 @@ +<header> + <h1>EconoJokes</h1> + <p class="tagline">Compare economies, get dad jokes!</p> +</header> + +<main> + <section class="comparison-form"> + <div class="country-selectors"> + <div class="country-select"> + <label for="country1">First Country</label> + <select id="country1" required> + <option value="">Select country...</option> + </select> + </div> + <div class="vs-circle">VS</div> + <div class="country-select"> + <label for="country2">Second Country</label> + <select id="country2" required> + <option value="">Select country...</option> + </select> + </div> + </div> + <div class="metrics-select"> + <label for="metric">Choose Metric</label> + <select id="metric" required> + <option value="gdp">GDP</option> + <option value="inflation">Inflation Rate</option> + <option value="unemployment">Unemployment Rate</option> + <option value="debt">Public Debt to GDP</option> + </select> + <button id="compareBtn">Compare</button> + </div> + </section> + + <section class="results hidden"> + <h2>Comparison Results</h2> + <div class="comparison-grid"> + <div class="country-data" id="country1Data"></div> + <div class="country-data" id="country2Data"></div> + </div> + <div class="joke-box"> + <h3>Economy Joke of the Moment</h3> + <p id="joke"></p> + </div> + </section> +</main> + +<footer> + <p>Made with economic wisdom and dad jokes</p> +</footer> diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..1848736 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://econojokes.scroll.pub +metaTags +editButton /edit.html +title EconoJokes - Compare Countries with a Smile +style.css +body.html +script.js diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..2be5d01 --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_01SXqdo5ifXFmWg7Jd4MJkYc", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "I'll create a website for comparing economic indicators between countries with added jokes. Here's the implementation:\n\n---domain---\neconojokes.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://econojokes.scroll.pub\nmetaTags\neditButton /edit.html\ntitle EconoJokes - Compare Countries with a Smile\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <h1>EconoJokes</h1>\n <p class=\"tagline\">Compare economies, get dad jokes!</p>\n</header>\n\n<main>\n <section class=\"comparison-form\">\n <div class=\"country-selectors\">\n <div class=\"country-select\">\n <label for=\"country1\">First Country</label>\n <select id=\"country1\" required>\n <option value=\"\">Select country...</option>\n </select>\n </div>\n <div class=\"vs-circle\">VS</div>\n <div class=\"country-select\">\n <label for=\"country2\">Second Country</label>\n <select id=\"country2\" required>\n <option value=\"\">Select country...</option>\n </select>\n </div>\n </div>\n <div class=\"metrics-select\">\n <label for=\"metric\">Choose Metric</label>\n <select id=\"metric\" required>\n <option value=\"gdp\">GDP</option>\n <option value=\"inflation\">Inflation Rate</option>\n <option value=\"unemployment\">Unemployment Rate</option>\n <option value=\"debt\">Public Debt to GDP</option>\n </select>\n <button id=\"compareBtn\">Compare</button>\n </div>\n </section>\n\n <section class=\"results hidden\">\n <h2>Comparison Results</h2>\n <div class=\"comparison-grid\">\n <div class=\"country-data\" id=\"country1Data\"></div>\n <div class=\"country-data\" id=\"country2Data\"></div>\n </div>\n <div class=\"joke-box\">\n <h3>Economy Joke of the Moment</h3>\n <p id=\"joke\"></p>\n </div>\n </section>\n</main>\n\n<footer>\n <p>Made with economic wisdom and dad jokes</p>\n</footer>\n\n---style.css---\n:root {\n --primary-color: #2c3e50;\n --accent-color: #3498db;\n --background-color: #ecf0f1;\n --text-color: #2c3e50;\n --border-radius: 8px;\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 background: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\nheader {\n background: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n.tagline {\n font-size: 1.1rem;\n opacity: 0.9;\n}\n\nmain {\n max-width: 1200px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n.comparison-form {\n background: white;\n padding: 2rem;\n border-radius: var(--border-radius);\n box-shadow: 0 2px 15px rgba(0,0,0,0.1);\n}\n\n.country-selectors {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\n.country-select {\n flex: 1;\n}\n\n.vs-circle {\n width: 50px;\n height: 50px;\n background: var(--accent-color);\n color: white;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: bold;\n}\n\nselect, button {\n width: 100%;\n padding: 0.8rem;\n border: 2px solid #ddd;\n border-radius: var(--border-radius);\n font-size: 1rem;\n margin-top: 0.5rem;\n}\n\nbutton {\n background: var(--accent-color);\n color: white;\n border: none;\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\nbutton:hover {\n background-color: #2980b9;\n}\n\n.metrics-select {\n max-width: 400px;\n margin: 0 auto;\n}\n\n.results {\n margin-top: 2rem;\n background: white;\n padding: 2rem;\n border-radius: var(--border-radius);\n box-shadow: 0 2px 15px rgba(0,0,0,0.1);\n}\n\n.comparison-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2rem;\n margin: 2rem 0;\n}\n\n.joke-box {\n text-align: center;\n padding: 1rem;\n background: #f7f9fc;\n border-radius: var(--border-radius);\n margin-top: 2rem;\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n margin-top: 2rem;\n background: var(--primary-color);\n color: white;\n}\n\n@media (max-width: 768px) {\n .country-selectors {\n flex-direction: column;\n }\n \n .comparison-grid {\n grid-template-columns: 1fr;\n }\n \n .vs-circle {\n margin: 1rem 0;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const countries = [\n 'Poland', 'Germany', 'France', 'Spain', 'Italy', 'United Kingdom',\n 'United States', 'Canada', 'Japan', 'China', 'Australia', 'Brazil'\n ];\n\n const economicJokes = [\n \"Why did the economist bring a ladder to tea? Because he expected a steep inflation!\",\n \"What did the GDP say to the recession? 'Stop bringing me down!'\",\n \"Why don't economists look out the window in the morning? Because they'd have nothing to do in the afternoon!\",\n \"What's an economist's favorite holiday? Taxmas!\",\n \"Why did the economy cross the road? For supply and demand reasons!\"\n ];\n\n // Populate country dropdowns\n const populateDropdowns = () => {\n const dropdowns = [document.getElementById('country1'), document.getElementById('country2')];\n dropdowns.forEach(dropdown => {\n countries.forEach(country => {\n const option = document.createElement('option');\n option.value = country.toLowerCase();\n option.textContent = country;\n dropdown.appendChild(option);\n });\n });\n };\n\n // Generate random economic data\n const generateData = () => {\n return {\n gdp: (Math.random() * 20 + 1).toFixed(2),\n inflation: (Math.random() * 10).toFixed(1),\n unemployment: (Math.random() * 15).toFixed(1),\n debt: (Math.random() * 150).toFixed(1)\n };\n };\n\n // Compare countries\n const compareCountries = (e) => {\n e.preventDefault();\n const country1 = document.getElementById('country1').value;\n const country2 = document.getElementById('country2').value;\n const metric = document.getElementById('metric').value;\n\n if (!country1 || !country2) {\n alert('Please select both countries');\n return;\n }\n\n const data1 = generateData();\n const data2 = generateData();\n\n const country1Data = document.getElementById('country1Data');\n const country2Data = document.getElementById('country2Data');\n \n country1Data.innerHTML = `\n <h3>${country1.toUpperCase()}</h3>\n <p>${metric.toUpperCase()}: ${data1[metric]}%</p>\n `;\n \n country2Data.innerHTML = `\n <h3>${country2.toUpperCase()}</h3>\n <p>${metric.toUpperCase()}: ${data2[metric]}%</p>\n `;\n\n // Show random joke\n const jokeElement = document.getElementById('joke');\n jokeElement.textContent = economicJokes[Math.floor(Math.random() * economicJokes.length)];\n\n // Show results\n document.querySelector('.results').classList.remove('hidden');\n };\n\n // Initialize\n populateDropdowns();\n document.getElementById('compareBtn').addEventListener('click', compareCountries);\n});\n\n---end---\n\nThis implementation creates a sleek, modern website for comparing economic indicators between countries. Key features include:\n\n1. Clean, responsive design with a modern color scheme\n2. Interactive country comparison interface\n3. Random economic-themed dad jokes with each comparison\n4. Mobile-friendly layout\n5. Smooth animations and transitions\n6. Accessible form controls and semantic HTML\n7. Error handling for form submissions\n8. Mock data generation for demonstration purposes\n\nThe design follows modern web standards and best practices, with a focus on user experience and visual appeal. The domain name \"econojokes\" is memorable and accurately represents the site's combination of economic data and humor." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 321, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 2476 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..9358e53 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# econojokes.scroll.pub +Website generated by Claude from prompt: Stwórz stronę internetową do porównywania współczynników ekonomicznych krajów. Bądź kreatywny, za każdym wygenerowanym porównaniem dodaj "suchara" \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..5a6f373 --- /dev/null +++ b/script.js @@ -0,0 +1,77 @@ +document.addEventListener('DOMContentLoaded', () => { + const countries = [ + 'Poland', 'Germany', 'France', 'Spain', 'Italy', 'United Kingdom', + 'United States', 'Canada', 'Japan', 'China', 'Australia', 'Brazil' + ]; + + const economicJokes = [ + "Why did the economist bring a ladder to tea? Because he expected a steep inflation!", + "What did the GDP say to the recession? 'Stop bringing me down!'", + "Why don't economists look out the window in the morning? Because they'd have nothing to do in the afternoon!", + "What's an economist's favorite holiday? Taxmas!", + "Why did the economy cross the road? For supply and demand reasons!" + ]; + + // Populate country dropdowns + const populateDropdowns = () => { + const dropdowns = [document.getElementById('country1'), document.getElementById('country2')]; + dropdowns.forEach(dropdown => { + countries.forEach(country => { + const option = document.createElement('option'); + option.value = country.toLowerCase(); + option.textContent = country; + dropdown.appendChild(option); + }); + }); + }; + + // Generate random economic data + const generateData = () => { + return { + gdp: (Math.random() * 20 + 1).toFixed(2), + inflation: (Math.random() * 10).toFixed(1), + unemployment: (Math.random() * 15).toFixed(1), + debt: (Math.random() * 150).toFixed(1) + }; + }; + + // Compare countries + const compareCountries = (e) => { + e.preventDefault(); + const country1 = document.getElementById('country1').value; + const country2 = document.getElementById('country2').value; + const metric = document.getElementById('metric').value; + + if (!country1 || !country2) { + alert('Please select both countries'); + return; + } + + const data1 = generateData(); + const data2 = generateData(); + + const country1Data = document.getElementById('country1Data'); + const country2Data = document.getElementById('country2Data'); + + country1Data.innerHTML = ` + <h3>${country1.toUpperCase()}</h3> + <p>${metric.toUpperCase()}: ${data1[metric]}%</p> + `; + + country2Data.innerHTML = ` + <h3>${country2.toUpperCase()}</h3> + <p>${metric.toUpperCase()}: ${data2[metric]}%</p> + `; + + // Show random joke + const jokeElement = document.getElementById('joke'); + jokeElement.textContent = economicJokes[Math.floor(Math.random() * economicJokes.length)]; + + // Show results + document.querySelector('.results').classList.remove('hidden'); + }; + + // Initialize + populateDropdowns(); + document.getElementById('compareBtn').addEventListener('click', compareCountries); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..5972215 --- /dev/null +++ b/style.css @@ -0,0 +1,150 @@ +:root { + --primary-color: #2c3e50; + --accent-color: #3498db; + --background-color: #ecf0f1; + --text-color: #2c3e50; + --border-radius: 8px; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', system-ui, sans-serif; + background: var(--background-color); + color: var(--text-color); + line-height: 1.6; +} + +header { + background: var(--primary-color); + color: white; + padding: 2rem; + text-align: center; + box-shadow: 0 2px 10px rgba(0,0,0,0.1); +} + +h1 { + font-size: 2.5rem; + margin-bottom: 0.5rem; +} + +.tagline { + font-size: 1.1rem; + opacity: 0.9; +} + +main { + max-width: 1200px; + margin: 2rem auto; + padding: 0 1rem; +} + +.comparison-form { + background: white; + padding: 2rem; + border-radius: var(--border-radius); + box-shadow: 0 2px 15px rgba(0,0,0,0.1); +} + +.country-selectors { + display: flex; + justify-content: space-between; + align-items: center; + gap: 1rem; + margin-bottom: 2rem; +} + +.country-select { + flex: 1; +} + +.vs-circle { + width: 50px; + height: 50px; + background: var(--accent-color); + color: white; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-weight: bold; +} + +select, button { + width: 100%; + padding: 0.8rem; + border: 2px solid #ddd; + border-radius: var(--border-radius); + font-size: 1rem; + margin-top: 0.5rem; +} + +button { + background: var(--accent-color); + color: white; + border: none; + cursor: pointer; + transition: background-color 0.3s; +} + +button:hover { + background-color: #2980b9; +} + +.metrics-select { + max-width: 400px; + margin: 0 auto; +} + +.results { + margin-top: 2rem; + background: white; + padding: 2rem; + border-radius: var(--border-radius); + box-shadow: 0 2px 15px rgba(0,0,0,0.1); +} + +.comparison-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 2rem; + margin: 2rem 0; +} + +.joke-box { + text-align: center; + padding: 1rem; + background: #f7f9fc; + border-radius: var(--border-radius); + margin-top: 2rem; +} + +.hidden { + display: none; +} + +footer { + text-align: center; + padding: 2rem; + margin-top: 2rem; + background: var(--primary-color); + color: white; +} + +@media (max-width: 768px) { + .country-selectors { + flex-direction: column; + } + + .comparison-grid { + grid-template-columns: 1fr; + } + + .vs-circle { + margin: 1rem 0; + } +}