Changes to econoviz.scroll.pub

root
root
25 days ago
Initial commit
body.html
Changed around line 1
+
+
+

EconoViz

+
🌓
+
+
+
+
+
+

Economic Comparison

+

United States vs Germany

+
+
+
+
+

GDP (Trillion USD)

+
+
+ USA
+ $23.0T
+
+
+ DEU
+ $4.2T
+
+
+
+
+
+

Population (Millions)

+
+
+ USA
+ 332M
+
+
+ DEU
+ 83M
+
+
+
+
+
+

Exports (% of GDP)

+
+
+ USA
+ 12%
+
+
+ DEU
+ 47%
+
+
+
+
+
+

Unemployment Rate

+
+
+ USA
+ 3.7%
+
+
+ DEU
+ 5.7%
+
+
+
+
+
+
+
+

Data sources: World Bank, IMF, OECD

+

Updated: 2023

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://econoviz.scroll.pub
+ metaTags
+ editButton /edit.html
+ title EconoViz - US vs Germany Economic Comparison
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "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
\n \n
\n\n
\n
\n

Economic Comparison

\n

United States vs Germany

\n
\n\n
\n
\n

GDP (Trillion USD)

\n
\n
\n USA\n $23.0T\n
\n
\n DEU\n $4.2T\n
\n
\n
\n\n
\n

Population (Millions)

\n
\n
\n USA\n 332M\n
\n
\n DEU\n 83M\n
\n
\n
\n\n
\n

Exports (% of GDP)

\n
\n
\n USA\n 12%\n
\n
\n DEU\n 47%\n
\n
\n
\n\n
\n

Unemployment Rate

\n
\n
\n USA\n 3.7%\n
\n
\n DEU\n 5.7%\n
\n
\n
\n
\n
\n\n
\n

Data sources: World Bank, IMF, OECD

\n

Updated: 2023

\n
\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
+ }
+ }
readme.scroll
Changed around line 1
+ # econoviz.scroll.pub
+ Website generated by Claude from prompt: Create simple page with comparison of economy between germany and US, be creative
script.js
Changed around line 1
+ 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);
+ });
+ });
style.css
Changed around line 1
+ :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;
+ }
+ }