commit 7c726544b85408ddb77394832234922e67cdf9c8
Author: root <root@hub.scroll.pub>
Date: 2024-12-28 06:15:25 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..f3c74a5
--- /dev/null
+++ b/body.html
@@ -0,0 +1,80 @@
+<header class="header">
+ <nav>
+ <div class="logo">DataBoard</div>
+ <div class="nav-links">
+ <a href="#dashboard" class="active">Dashboard</a>
+ <a href="#analytics">Analytics</a>
+ <a href="#settings">Settings</a>
+ </div>
+ <button class="theme-toggle" aria-label="Toggle theme">
+ <svg viewBox="0 0 24 24" class="sun-icon">
+ <path d="M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10z"></path>
+ <path d="M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.72 12.72 1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"></path>
+ </svg>
+ </button>
+ </nav>
+</header>
+
+<main class="main">
+ <div class="sidebar">
+ <div class="user-profile">
+ <div class="avatar"></div>
+ <div class="user-info">
+ <h3>Admin User</h3>
+ <p>Administrator</p>
+ </div>
+ </div>
+ <nav class="sidebar-nav">
+ <a href="#overview" class="active">Overview</a>
+ <a href="#users">Users</a>
+ <a href="#reports">Reports</a>
+ <a href="#metrics">Metrics</a>
+ </nav>
+ </div>
+
+ <div class="content">
+ <div class="stats-grid">
+ <div class="stat-card">
+ <h3>Total Users</h3>
+ <p class="stat-number">24,521</p>
+ <div class="trend up">+12.5%</div>
+ </div>
+ <div class="stat-card">
+ <h3>Revenue</h3>
+ <p class="stat-number">$142,503</p>
+ <div class="trend up">+8.2%</div>
+ </div>
+ <div class="stat-card">
+ <h3>Active Sessions</h3>
+ <p class="stat-number">1,234</p>
+ <div class="trend down">-3.1%</div>
+ </div>
+ <div class="stat-card">
+ <h3>Conversion Rate</h3>
+ <p class="stat-number">4.2%</p>
+ <div class="trend up">+1.3%</div>
+ </div>
+ </div>
+
+ <div class="chart-container">
+ <canvas id="mainChart"></canvas>
+ </div>
+
+ <div class="data-table">
+ <h2>Recent Activity</h2>
+ <table>
+ <thead>
+ <tr>
+ <th>User</th>
+ <th>Action</th>
+ <th>Date</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ <tbody id="activity-table">
+ <!-- Populated by JavaScript -->
+ </tbody>
+ </table>
+ </div>
+ </div>
+</main>
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..a900e9d
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://databoard.scroll.pub
+metaTags
+editButton /edit.html
+title DataBoard - Admin Analytics Dashboard
+style.css
+body.html
+script.js
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..0e3bef0
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,20 @@
+{
+ "id": "msg_01Naj7XnMwjZPmi65Nv8uFkX",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll help create an admin dashboard website with data analysis features using shadcn-inspired styling.\n\n---domain---\ndataboard.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://databoard.scroll.pub\nmetaTags\neditButton /edit.html\ntitle DataBoard - Admin Analytics Dashboard\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n<header class=\"header\">\n <nav>\n <div class=\"logo\">DataBoard</div>\n <div class=\"nav-links\">\n <a href=\"#dashboard\" class=\"active\">Dashboard</a>\n <a href=\"#analytics\">Analytics</a>\n <a href=\"#settings\">Settings</a>\n </div>\n <button class=\"theme-toggle\" aria-label=\"Toggle theme\">\n <svg viewBox=\"0 0 24 24\" class=\"sun-icon\">\n <path d=\"M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10z\"></path>\n <path d=\"M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.72 12.72 1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42\"></path>\n </svg>\n </button>\n </nav>\n</header>\n\n<main class=\"main\">\n <div class=\"sidebar\">\n <div class=\"user-profile\">\n <div class=\"avatar\"></div>\n <div class=\"user-info\">\n <h3>Admin User</h3>\n <p>Administrator</p>\n </div>\n </div>\n <nav class=\"sidebar-nav\">\n <a href=\"#overview\" class=\"active\">Overview</a>\n <a href=\"#users\">Users</a>\n <a href=\"#reports\">Reports</a>\n <a href=\"#metrics\">Metrics</a>\n </nav>\n </div>\n\n <div class=\"content\">\n <div class=\"stats-grid\">\n <div class=\"stat-card\">\n <h3>Total Users</h3>\n <p class=\"stat-number\">24,521</p>\n <div class=\"trend up\">+12.5%</div>\n </div>\n <div class=\"stat-card\">\n <h3>Revenue</h3>\n <p class=\"stat-number\">$142,503</p>\n <div class=\"trend up\">+8.2%</div>\n </div>\n <div class=\"stat-card\">\n <h3>Active Sessions</h3>\n <p class=\"stat-number\">1,234</p>\n <div class=\"trend down\">-3.1%</div>\n </div>\n <div class=\"stat-card\">\n <h3>Conversion Rate</h3>\n <p class=\"stat-number\">4.2%</p>\n <div class=\"trend up\">+1.3%</div>\n </div>\n </div>\n\n <div class=\"chart-container\">\n <canvas id=\"mainChart\"></canvas>\n </div>\n\n <div class=\"data-table\">\n <h2>Recent Activity</h2>\n <table>\n <thead>\n <tr>\n <th>User</th>\n <th>Action</th>\n <th>Date</th>\n <th>Status</th>\n </tr>\n </thead>\n <tbody id=\"activity-table\">\n <!-- Populated by JavaScript -->\n </tbody>\n </table>\n </div>\n </div>\n</main>\n\n---style.css---\n:root {\n --primary: #6366f1;\n --primary-hover: #4f46e5;\n --background: #ffffff;\n --foreground: #0f172a;\n --muted: #f1f5f9;\n --muted-foreground: #64748b;\n --card: #ffffff;\n --card-foreground: #0f172a;\n --border: #e2e8f0;\n --radius: 0.5rem;\n}\n\n.dark {\n --background: #0f172a;\n --foreground: #f8fafc;\n --muted: #1e293b;\n --muted-foreground: #94a3b8;\n --card: #1e293b;\n --card-foreground: #f8fafc;\n --border: #334155;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n background: var(--background);\n color: var(--foreground);\n line-height: 1.5;\n}\n\n.header {\n border-bottom: 1px solid var(--border);\n padding: 1rem;\n}\n\n.header nav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n color: var(--primary);\n}\n\n.nav-links a {\n color: var(--foreground);\n text-decoration: none;\n padding: 0.5rem 1rem;\n border-radius: var(--radius);\n transition: background-color 0.2s;\n}\n\n.nav-links a:hover {\n background: var(--muted);\n}\n\n.nav-links a.active {\n background: var(--primary);\n color: white;\n}\n\n.main {\n display: grid;\n grid-template-columns: 250px 1fr;\n gap: 2rem;\n max-width: 1200px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n.sidebar {\n background: var(--card);\n border-radius: var(--radius);\n padding: 1.5rem;\n border: 1px solid var(--border);\n}\n\n.user-profile {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background: var(--primary);\n}\n\n.stats-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\n.stat-card {\n background: var(--card);\n padding: 1.5rem;\n border-radius: var(--radius);\n border: 1px solid var(--border);\n}\n\n.stat-number {\n font-size: 2rem;\n font-weight: bold;\n margin: 0.5rem 0;\n}\n\n.trend {\n display: inline-block;\n padding: 0.25rem 0.5rem;\n border-radius: var(--radius);\n font-size: 0.875rem;\n}\n\n.trend.up {\n background: #dcfce7;\n color: #166534;\n}\n\n.trend.down {\n background: #fee2e2;\n color: #991b1b;\n}\n\n.chart-container {\n background: var(--card);\n padding: 1.5rem;\n border-radius: var(--radius);\n border: 1px solid var(--border);\n margin-bottom: 2rem;\n}\n\n.data-table {\n background: var(--card);\n padding: 1.5rem;\n border-radius: var(--radius);\n border: 1px solid var(--border);\n}\n\ntable {\n width: 100%;\n border-collapse: collapse;\n}\n\nth, td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid var(--border);\n}\n\n@media (max-width: 768px) {\n .main {\n grid-template-columns: 1fr;\n }\n \n .sidebar {\n display: none;\n }\n \n .stats-grid {\n grid-template-columns: 1fr;\n }\n}\n\n---script.js---\n// Theme toggling\nconst themeToggle = document.querySelector('.theme-toggle');\nthemeToggle.addEventListener('click', () => {\n document.body.classList.toggle('dark');\n});\n\n// Chart initialization\nconst ctx = document.getElementById('mainChart').getContext('2d');\nconst labels = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'];\nconst data = [65, 59, 80, 81, 56, 55];\n\nfunction drawChart() {\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n \n const gradient = ctx.createLinearGradient(0, 0, 0, 400);\n gradient.addColorStop(0, 'rgba(99, 102, 241, 0.5)');\n gradient.addColorStop(1, 'rgba(99, 102, 241, 0)');\n\n ctx.beginPath();\n ctx.moveTo(0, 400);\n \n const step = ctx.canvas.width / (labels.length - 1);\n const scale = ctx.canvas.height / Math.max(...data);\n \n data.forEach((value, index) => {\n const x = index * step;\n const y = ctx.canvas.height - (value * scale);\n \n if (index === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n });\n \n ctx.lineTo(ctx.canvas.width, ctx.canvas.height);\n ctx.lineTo(0, ctx.canvas.height);\n ctx.fillStyle = gradient;\n ctx.fill();\n \n ctx.beginPath();\n data.forEach((value, index) => {\n const x = index * step;\n const y = ctx.canvas.height - (value * scale);\n \n if (index === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n });\n \n ctx.strokeStyle = '#6366f1';\n ctx.lineWidth = 2;\n ctx.stroke();\n}\n\n// Populate activity table\nconst activities = [\n { user: 'John Doe', action: 'Login', date: '2024-01-20', status: 'Success' },\n { user: 'Jane Smith', action: 'Purchase', date: '2024-01-20', status: 'Completed' },\n { user: 'Mike Johnson', action: 'Update', date: '2024-01-19', status: 'Pending' }\n];\n\nconst activityTable = document.getElementById('activity-table');\nactivities.forEach(activity => {\n const row = document.createElement('tr');\n row.innerHTML = `\n <td>${activity.user}</td>\n <td>${activity.action}</td>\n <td>${activity.date}</td>\n <td>${activity.status}</td>\n `;\n activityTable.appendChild(row);\n});\n\n// Responsive chart\nwindow.addEventListener('resize', drawChart);\ndrawChart();\n\n---end---\n\nThis creates a modern admin dashboard with:\n1. Dark/light theme toggle\n2. Responsive layout\n3. Stats cards with trends\n4. Interactive chart\n5. Activity table\n6. Shadcn-inspired styling\n7. Mobile-responsive design\n8. Clean, semantic HTML\n9. Accessible navigation\n10. Modern CSS variables for theming\n\nThe design uses a clean, professional color scheme with smooth transitions and interactions. The shadcn-inspired components provide a modern, professional look while maintaining simplicity and usability."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 289,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 3060
+ }
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..402f90b
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# databoard.scroll.pub
+Website generated by Claude from prompt: create a website that is a admin panel, show some data analysis, use shadcn css
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..47eea22
--- /dev/null
+++ b/script.js
@@ -0,0 +1,79 @@
+// Theme toggling
+const themeToggle = document.querySelector('.theme-toggle');
+themeToggle.addEventListener('click', () => {
+ document.body.classList.toggle('dark');
+});
+
+// Chart initialization
+const ctx = document.getElementById('mainChart').getContext('2d');
+const labels = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'];
+const data = [65, 59, 80, 81, 56, 55];
+
+function drawChart() {
+ ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
+
+ const gradient = ctx.createLinearGradient(0, 0, 0, 400);
+ gradient.addColorStop(0, 'rgba(99, 102, 241, 0.5)');
+ gradient.addColorStop(1, 'rgba(99, 102, 241, 0)');
+
+ ctx.beginPath();
+ ctx.moveTo(0, 400);
+
+ const step = ctx.canvas.width / (labels.length - 1);
+ const scale = ctx.canvas.height / Math.max(...data);
+
+ data.forEach((value, index) => {
+ const x = index * step;
+ const y = ctx.canvas.height - (value * scale);
+
+ if (index === 0) {
+ ctx.moveTo(x, y);
+ } else {
+ ctx.lineTo(x, y);
+ }
+ });
+
+ ctx.lineTo(ctx.canvas.width, ctx.canvas.height);
+ ctx.lineTo(0, ctx.canvas.height);
+ ctx.fillStyle = gradient;
+ ctx.fill();
+
+ ctx.beginPath();
+ data.forEach((value, index) => {
+ const x = index * step;
+ const y = ctx.canvas.height - (value * scale);
+
+ if (index === 0) {
+ ctx.moveTo(x, y);
+ } else {
+ ctx.lineTo(x, y);
+ }
+ });
+
+ ctx.strokeStyle = '#6366f1';
+ ctx.lineWidth = 2;
+ ctx.stroke();
+}
+
+// Populate activity table
+const activities = [
+ { user: 'John Doe', action: 'Login', date: '2024-01-20', status: 'Success' },
+ { user: 'Jane Smith', action: 'Purchase', date: '2024-01-20', status: 'Completed' },
+ { user: 'Mike Johnson', action: 'Update', date: '2024-01-19', status: 'Pending' }
+];
+
+const activityTable = document.getElementById('activity-table');
+activities.forEach(activity => {
+ const row = document.createElement('tr');
+ row.innerHTML = `
+ <td>${activity.user}</td>
+ <td>${activity.action}</td>
+ <td>${activity.date}</td>
+ <td>${activity.status}</td>
+ `;
+ activityTable.appendChild(row);
+});
+
+// Responsive chart
+window.addEventListener('resize', drawChart);
+drawChart();
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..2ff706b
--- /dev/null
+++ b/style.css
@@ -0,0 +1,178 @@
+:root {
+ --primary: #6366f1;
+ --primary-hover: #4f46e5;
+ --background: #ffffff;
+ --foreground: #0f172a;
+ --muted: #f1f5f9;
+ --muted-foreground: #64748b;
+ --card: #ffffff;
+ --card-foreground: #0f172a;
+ --border: #e2e8f0;
+ --radius: 0.5rem;
+}
+
+.dark {
+ --background: #0f172a;
+ --foreground: #f8fafc;
+ --muted: #1e293b;
+ --muted-foreground: #94a3b8;
+ --card: #1e293b;
+ --card-foreground: #f8fafc;
+ --border: #334155;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: system-ui, -apple-system, sans-serif;
+ background: var(--background);
+ color: var(--foreground);
+ line-height: 1.5;
+}
+
+.header {
+ border-bottom: 1px solid var(--border);
+ padding: 1rem;
+}
+
+.header nav {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+.logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: var(--primary);
+}
+
+.nav-links a {
+ color: var(--foreground);
+ text-decoration: none;
+ padding: 0.5rem 1rem;
+ border-radius: var(--radius);
+ transition: background-color 0.2s;
+}
+
+.nav-links a:hover {
+ background: var(--muted);
+}
+
+.nav-links a.active {
+ background: var(--primary);
+ color: white;
+}
+
+.main {
+ display: grid;
+ grid-template-columns: 250px 1fr;
+ gap: 2rem;
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+}
+
+.sidebar {
+ background: var(--card);
+ border-radius: var(--radius);
+ padding: 1.5rem;
+ border: 1px solid var(--border);
+}
+
+.user-profile {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ margin-bottom: 2rem;
+}
+
+.avatar {
+ width: 48px;
+ height: 48px;
+ border-radius: 50%;
+ background: var(--primary);
+}
+
+.stats-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
+ gap: 1rem;
+ margin-bottom: 2rem;
+}
+
+.stat-card {
+ background: var(--card);
+ padding: 1.5rem;
+ border-radius: var(--radius);
+ border: 1px solid var(--border);
+}
+
+.stat-number {
+ font-size: 2rem;
+ font-weight: bold;
+ margin: 0.5rem 0;
+}
+
+.trend {
+ display: inline-block;
+ padding: 0.25rem 0.5rem;
+ border-radius: var(--radius);
+ font-size: 0.875rem;
+}
+
+.trend.up {
+ background: #dcfce7;
+ color: #166534;
+}
+
+.trend.down {
+ background: #fee2e2;
+ color: #991b1b;
+}
+
+.chart-container {
+ background: var(--card);
+ padding: 1.5rem;
+ border-radius: var(--radius);
+ border: 1px solid var(--border);
+ margin-bottom: 2rem;
+}
+
+.data-table {
+ background: var(--card);
+ padding: 1.5rem;
+ border-radius: var(--radius);
+ border: 1px solid var(--border);
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+th, td {
+ padding: 0.75rem;
+ text-align: left;
+ border-bottom: 1px solid var(--border);
+}
+
+@media (max-width: 768px) {
+ .main {
+ grid-template-columns: 1fr;
+ }
+
+ .sidebar {
+ display: none;
+ }
+
+ .stats-grid {
+ grid-template-columns: 1fr;
+ }
+}