commit a7e43b1af0d5fdadc83684b4c1ab21385f30aa5c
Author: root <root@hub.scroll.pub>
Date: 2024-12-27 17:51:51 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..b38ea1c
--- /dev/null
+++ b/body.html
@@ -0,0 +1,76 @@
+<header>
+ <nav>
+ <h1>EconoViz</h1>
+ <div class="theme-toggle" role="button" tabindex="0" aria-label="Toggle dark mode">🌓</div>
+ </nav>
+</header>
+
+<main>
+ <section class="hero">
+ <h2>Economic Comparison</h2>
+ <h3>United States vs Germany</h3>
+ </section>
+
+ <section class="comparison-grid">
+ <div class="metric-card gdp">
+ <h4>GDP (Trillion USD)</h4>
+ <div class="comparison-bars">
+ <div class="bar us" data-value="23.0">
+ <span class="label">USA</span>
+ <span class="value">$23.0T</span>
+ </div>
+ <div class="bar de" data-value="4.2">
+ <span class="label">DEU</span>
+ <span class="value">$4.2T</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="metric-card population">
+ <h4>Population (Millions)</h4>
+ <div class="comparison-bars">
+ <div class="bar us" data-value="332">
+ <span class="label">USA</span>
+ <span class="value">332M</span>
+ </div>
+ <div class="bar de" data-value="83">
+ <span class="label">DEU</span>
+ <span class="value">83M</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="metric-card exports">
+ <h4>Exports (% of GDP)</h4>
+ <div class="comparison-bars">
+ <div class="bar us" data-value="12">
+ <span class="label">USA</span>
+ <span class="value">12%</span>
+ </div>
+ <div class="bar de" data-value="47">
+ <span class="label">DEU</span>
+ <span class="value">47%</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="metric-card unemployment">
+ <h4>Unemployment Rate</h4>
+ <div class="comparison-bars">
+ <div class="bar us" data-value="3.7">
+ <span class="label">USA</span>
+ <span class="value">3.7%</span>
+ </div>
+ <div class="bar de" data-value="5.7">
+ <span class="label">DEU</span>
+ <span class="value">5.7%</span>
+ </div>
+ </div>
+ </div>
+ </section>
+</main>
+
+<footer>
+ <p>Data sources: World Bank, IMF, OECD</p>
+ <p>Updated: 2023</p>
+</footer>
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..ca62271
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://econoviz.scroll.pub
+metaTags
+editButton /edit.html
+title EconoViz - US vs Germany Economic Comparison
+style.css
+body.html
+script.js
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..20220ef
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,20 @@
+{
+ "id": "msg_01V4VmP22KVuVrTiC6uyDt3g",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a comparison website for the US and German economies with interactive elements and clean design.\n\n---domain---\neconoviz.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://econoviz.scroll.pub\nmetaTags\neditButton /edit.html\ntitle EconoViz - US vs Germany Economic Comparison\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header>\n <nav>\n <h1>EconoViz</h1>\n <div class=\"theme-toggle\" role=\"button\" tabindex=\"0\" aria-label=\"Toggle dark mode\">🌓</div>\n </nav>\n</header>\n\n<main>\n <section class=\"hero\">\n <h2>Economic Comparison</h2>\n <h3>United States vs Germany</h3>\n </section>\n\n <section class=\"comparison-grid\">\n <div class=\"metric-card gdp\">\n <h4>GDP (Trillion USD)</h4>\n <div class=\"comparison-bars\">\n <div class=\"bar us\" data-value=\"23.0\">\n <span class=\"label\">USA</span>\n <span class=\"value\">$23.0T</span>\n </div>\n <div class=\"bar de\" data-value=\"4.2\">\n <span class=\"label\">DEU</span>\n <span class=\"value\">$4.2T</span>\n </div>\n </div>\n </div>\n\n <div class=\"metric-card population\">\n <h4>Population (Millions)</h4>\n <div class=\"comparison-bars\">\n <div class=\"bar us\" data-value=\"332\">\n <span class=\"label\">USA</span>\n <span class=\"value\">332M</span>\n </div>\n <div class=\"bar de\" data-value=\"83\">\n <span class=\"label\">DEU</span>\n <span class=\"value\">83M</span>\n </div>\n </div>\n </div>\n\n <div class=\"metric-card exports\">\n <h4>Exports (% of GDP)</h4>\n <div class=\"comparison-bars\">\n <div class=\"bar us\" data-value=\"12\">\n <span class=\"label\">USA</span>\n <span class=\"value\">12%</span>\n </div>\n <div class=\"bar de\" data-value=\"47\">\n <span class=\"label\">DEU</span>\n <span class=\"value\">47%</span>\n </div>\n </div>\n </div>\n\n <div class=\"metric-card unemployment\">\n <h4>Unemployment Rate</h4>\n <div class=\"comparison-bars\">\n <div class=\"bar us\" data-value=\"3.7\">\n <span class=\"label\">USA</span>\n <span class=\"value\">3.7%</span>\n </div>\n <div class=\"bar de\" data-value=\"5.7\">\n <span class=\"label\">DEU</span>\n <span class=\"value\">5.7%</span>\n </div>\n </div>\n </div>\n </section>\n</main>\n\n<footer>\n <p>Data sources: World Bank, IMF, OECD</p>\n <p>Updated: 2023</p>\n</footer>\n\n---style.css---\n:root {\n --primary: #2d3436;\n --secondary: #636e72;\n --accent: #0984e3;\n --background: #ffffff;\n --card-bg: #f5f6fa;\n --text: #2d3436;\n --us-color: #3498db;\n --de-color: #e74c3c;\n}\n\n[data-theme=\"dark\"] {\n --primary: #dfe6e9;\n --secondary: #b2bec3;\n --accent: #74b9ff;\n --background: #2d3436;\n --card-bg: #2d3436;\n --text: #dfe6e9;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n background-color: var(--background);\n color: var(--text);\n transition: background-color 0.3s, color 0.3s;\n}\n\nheader {\n padding: 1rem;\n background-color: var(--card-bg);\n box-shadow: 0 2px 4px 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\nh1 {\n font-size: 2rem;\n color: var(--accent);\n}\n\n.theme-toggle {\n cursor: pointer;\n font-size: 1.5rem;\n padding: 0.5rem;\n border-radius: 50%;\n transition: background-color 0.3s;\n}\n\n.theme-toggle:hover {\n background-color: rgba(0,0,0,0.1);\n}\n\n.hero {\n text-align: center;\n padding: 4rem 1rem;\n}\n\n.hero h2 {\n font-size: 3rem;\n margin-bottom: 1rem;\n}\n\n.hero h3 {\n font-size: 1.5rem;\n color: var(--secondary);\n}\n\n.comparison-grid {\n max-width: 1200px;\n margin: 0 auto;\n padding: 2rem;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n}\n\n.metric-card {\n background-color: var(--card-bg);\n padding: 2rem;\n border-radius: 1rem;\n box-shadow: 0 4px 6px rgba(0,0,0,0.1);\n transition: transform 0.3s;\n}\n\n.metric-card:hover {\n transform: translateY(-5px);\n}\n\n.metric-card h4 {\n margin-bottom: 2rem;\n color: var(--secondary);\n}\n\n.comparison-bars {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.bar {\n height: 40px;\n background-color: #e0e0e0;\n border-radius: 20px;\n position: relative;\n overflow: hidden;\n transition: width 1s ease-in-out;\n}\n\n.bar::before {\n content: '';\n position: absolute;\n height: 100%;\n border-radius: 20px;\n transition: width 1s ease-in-out;\n}\n\n.bar.us::before {\n background-color: var(--us-color);\n}\n\n.bar.de::before {\n background-color: var(--de-color);\n}\n\n.bar .label {\n position: absolute;\n left: 1rem;\n top: 50%;\n transform: translateY(-50%);\n color: white;\n z-index: 1;\n font-weight: bold;\n}\n\n.bar .value {\n position: absolute;\n right: 1rem;\n top: 50%;\n transform: translateY(-50%);\n color: white;\n z-index: 1;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n color: var(--secondary);\n}\n\n@media (max-width: 768px) {\n .hero h2 {\n font-size: 2rem;\n }\n \n .hero h3 {\n font-size: 1.2rem;\n }\n \n .comparison-grid {\n padding: 1rem;\n gap: 1rem;\n }\n \n .metric-card {\n padding: 1.5rem;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n // Theme toggler\n const themeToggle = document.querySelector('.theme-toggle');\n const prefersDark = window.matchMedia('(prefers-color-scheme: dark)');\n \n function setTheme(isDark) {\n document.documentElement.setAttribute('data-theme', isDark ? 'dark' : 'light');\n themeToggle.textContent = isDark ? '🌞' : '🌓';\n }\n \n setTheme(prefersDark.matches);\n \n themeToggle.addEventListener('click', () => {\n const isDark = document.documentElement.getAttribute('data-theme') === 'dark';\n setTheme(!isDark);\n });\n\n // Animate bars\n const bars = document.querySelectorAll('.bar');\n \n function setBarWidths() {\n bars.forEach(bar => {\n const value = parseFloat(bar.dataset.value);\n const parent = bar.parentElement;\n const maxValue = Array.from(parent.children)\n .map(child => parseFloat(child.dataset.value))\n .reduce((a, b) => Math.max(a, b));\n \n const width = (value / maxValue * 100);\n bar.style.setProperty('width', width + '%');\n bar.querySelector('::before').style.setProperty('width', '100%');\n });\n }\n\n // Intersection Observer for animation\n const observer = new IntersectionObserver((entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n setBarWidths();\n observer.unobserve(entry.target);\n }\n });\n }, { threshold: 0.1 });\n\n document.querySelectorAll('.metric-card').forEach(card => {\n observer.observe(card);\n });\n});\n\n---end---\n\nThis creates a modern, interactive comparison website with:\n- Responsive design that works on all devices\n- Dark/light mode toggle with system preference detection\n- Animated comparison bars that fill when scrolled into view\n- Clean, accessible semantic HTML\n- Smooth hover effects and transitions\n- Beautiful color scheme and typography\n- No external dependencies\n- SEO-friendly structure\n\nThe domain name \"econoviz\" combines \"economic\" and \"visualization\" into a memorable, relevant name that represents the site's purpose."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 284,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2671
+ }
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..07abee7
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# econoviz.scroll.pub
+Website generated by Claude from prompt: Create simple page with comparison of economy between germany and US, be creative
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..b4f04f7
--- /dev/null
+++ b/script.js
@@ -0,0 +1,48 @@
+document.addEventListener('DOMContentLoaded', () => {
+ // Theme toggler
+ const themeToggle = document.querySelector('.theme-toggle');
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
+
+ function setTheme(isDark) {
+ document.documentElement.setAttribute('data-theme', isDark ? 'dark' : 'light');
+ themeToggle.textContent = isDark ? '🌞' : '🌓';
+ }
+
+ setTheme(prefersDark.matches);
+
+ themeToggle.addEventListener('click', () => {
+ const isDark = document.documentElement.getAttribute('data-theme') === 'dark';
+ setTheme(!isDark);
+ });
+
+ // Animate bars
+ const bars = document.querySelectorAll('.bar');
+
+ function setBarWidths() {
+ bars.forEach(bar => {
+ const value = parseFloat(bar.dataset.value);
+ const parent = bar.parentElement;
+ const maxValue = Array.from(parent.children)
+ .map(child => parseFloat(child.dataset.value))
+ .reduce((a, b) => Math.max(a, b));
+
+ const width = (value / maxValue * 100);
+ bar.style.setProperty('width', width + '%');
+ bar.querySelector('::before').style.setProperty('width', '100%');
+ });
+ }
+
+ // Intersection Observer for animation
+ const observer = new IntersectionObserver((entries) => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ setBarWidths();
+ observer.unobserve(entry.target);
+ }
+ });
+ }, { threshold: 0.1 });
+
+ document.querySelectorAll('.metric-card').forEach(card => {
+ observer.observe(card);
+ });
+});
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..2643474
--- /dev/null
+++ b/style.css
@@ -0,0 +1,179 @@
+:root {
+ --primary: #2d3436;
+ --secondary: #636e72;
+ --accent: #0984e3;
+ --background: #ffffff;
+ --card-bg: #f5f6fa;
+ --text: #2d3436;
+ --us-color: #3498db;
+ --de-color: #e74c3c;
+}
+
+[data-theme="dark"] {
+ --primary: #dfe6e9;
+ --secondary: #b2bec3;
+ --accent: #74b9ff;
+ --background: #2d3436;
+ --card-bg: #2d3436;
+ --text: #dfe6e9;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
+ background-color: var(--background);
+ color: var(--text);
+ transition: background-color 0.3s, color 0.3s;
+}
+
+header {
+ padding: 1rem;
+ background-color: var(--card-bg);
+ 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;
+}
+
+h1 {
+ font-size: 2rem;
+ color: var(--accent);
+}
+
+.theme-toggle {
+ cursor: pointer;
+ font-size: 1.5rem;
+ padding: 0.5rem;
+ border-radius: 50%;
+ transition: background-color 0.3s;
+}
+
+.theme-toggle:hover {
+ background-color: rgba(0,0,0,0.1);
+}
+
+.hero {
+ text-align: center;
+ padding: 4rem 1rem;
+}
+
+.hero h2 {
+ font-size: 3rem;
+ margin-bottom: 1rem;
+}
+
+.hero h3 {
+ font-size: 1.5rem;
+ color: var(--secondary);
+}
+
+.comparison-grid {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 2rem;
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2rem;
+}
+
+.metric-card {
+ background-color: var(--card-bg);
+ padding: 2rem;
+ border-radius: 1rem;
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
+ transition: transform 0.3s;
+}
+
+.metric-card:hover {
+ transform: translateY(-5px);
+}
+
+.metric-card h4 {
+ margin-bottom: 2rem;
+ color: var(--secondary);
+}
+
+.comparison-bars {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+}
+
+.bar {
+ height: 40px;
+ background-color: #e0e0e0;
+ border-radius: 20px;
+ position: relative;
+ overflow: hidden;
+ transition: width 1s ease-in-out;
+}
+
+.bar::before {
+ content: '';
+ position: absolute;
+ height: 100%;
+ border-radius: 20px;
+ transition: width 1s ease-in-out;
+}
+
+.bar.us::before {
+ background-color: var(--us-color);
+}
+
+.bar.de::before {
+ background-color: var(--de-color);
+}
+
+.bar .label {
+ position: absolute;
+ left: 1rem;
+ top: 50%;
+ transform: translateY(-50%);
+ color: white;
+ z-index: 1;
+ font-weight: bold;
+}
+
+.bar .value {
+ position: absolute;
+ right: 1rem;
+ top: 50%;
+ transform: translateY(-50%);
+ color: white;
+ z-index: 1;
+}
+
+footer {
+ text-align: center;
+ padding: 2rem;
+ color: var(--secondary);
+}
+
+@media (max-width: 768px) {
+ .hero h2 {
+ font-size: 2rem;
+ }
+
+ .hero h3 {
+ font-size: 1.2rem;
+ }
+
+ .comparison-grid {
+ padding: 1rem;
+ gap: 1rem;
+ }
+
+ .metric-card {
+ padding: 1.5rem;
+ }
+}