commit 3496daa5d64be2f82481432c5d5fd560251b3af7
Author: root <root@hub.scroll.pub>
Date: 2025-01-13 16:13:20 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..1057a6e
--- /dev/null
+++ b/body.html
@@ -0,0 +1,63 @@
+<header>
+ <h1>Teatra</h1>
+ <p>Dynamic Tea Inventory Management for Frankfurt am Main</p>
+</header>
+
+<nav>
+ <ul>
+ <li><a href="#dashboard">Dashboard</a></li>
+ <li><a href="#inventory">Inventory Details</a></li>
+ <li><a href="#expiry">Expiry Forecast</a></li>
+ </ul>
+</nav>
+
+<main>
+ <section id="dashboard">
+ <h2>Dashboard</h2>
+ <div class="stats-grid">
+ <div class="stat-card">
+ <h3>Total Stock</h3>
+ <p id="total-stock">Loading...</p>
+ </div>
+ <div class="stat-card">
+ <h3>Low Stock Items</h3>
+ <p id="low-stock">Loading...</p>
+ </div>
+ <div class="stat-card">
+ <h3>Expiring Soon</h3>
+ <p id="expiring-soon">Loading...</p>
+ </div>
+ </div>
+ </section>
+
+ <section id="inventory">
+ <h2>Inventory Details</h2>
+ <div class="search-bar">
+ <input type="text" id="search" placeholder="Search tea items...">
+ </div>
+ <table id="inventory-table">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Quantity</th>
+ <th>Expiry Date</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- Dynamic content will be inserted here -->
+ </tbody>
+ </table>
+ </section>
+
+ <section id="expiry">
+ <h2>Expiry Forecast</h2>
+ <div class="expiry-chart">
+ <canvas id="expiryChart"></canvas>
+ </div>
+ </section>
+</main>
+
+<footer>
+ <p>Teatra - Frankfurt am Main</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..080c732
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://teatra.scroll.pub
+metaTags
+editButton /edit.html
+title Teatra - Dynamic Tea Inventory Management
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..2d50d2e
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "6bc38f74-4315-46cf-9e4e-936afde32ed7",
+ "object": "chat.completion",
+ "created": 1736784762,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nteatra.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://teatra.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Teatra - Dynamic Tea Inventory Management\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Teatra</h1>\n <p>Dynamic Tea Inventory Management for Frankfurt am Main</p>\n</header>\n\n<nav>\n <ul>\n <li><a href=\"#dashboard\">Dashboard</a></li>\n <li><a href=\"#inventory\">Inventory Details</a></li>\n <li><a href=\"#expiry\">Expiry Forecast</a></li>\n </ul>\n</nav>\n\n<main>\n <section id=\"dashboard\">\n <h2>Dashboard</h2>\n <div class=\"stats-grid\">\n <div class=\"stat-card\">\n <h3>Total Stock</h3>\n <p id=\"total-stock\">Loading...</p>\n </div>\n <div class=\"stat-card\">\n <h3>Low Stock Items</h3>\n <p id=\"low-stock\">Loading...</p>\n </div>\n <div class=\"stat-card\">\n <h3>Expiring Soon</h3>\n <p id=\"expiring-soon\">Loading...</p>\n </div>\n </div>\n </section>\n\n <section id=\"inventory\">\n <h2>Inventory Details</h2>\n <div class=\"search-bar\">\n <input type=\"text\" id=\"search\" placeholder=\"Search tea items...\">\n </div>\n <table id=\"inventory-table\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Quantity</th>\n <th>Expiry Date</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n <!-- Dynamic content will be inserted here -->\n </tbody>\n </table>\n </section>\n\n <section id=\"expiry\">\n <h2>Expiry Forecast</h2>\n <div class=\"expiry-chart\">\n <canvas id=\"expiryChart\"></canvas>\n </div>\n </section>\n</main>\n\n<footer>\n <p>Teatra - Frankfurt am Main</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #388E3C;\n --background-color: #F1F8E9;\n --text-color: #2E7D32;\n --card-bg: #FFFFFF;\n --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n margin: 0;\n padding: 0;\n background-color: 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}\n\nnav {\n background: var(--secondary-color);\n padding: 1rem;\n}\n\nnav ul {\n list-style: none;\n padding: 0;\n display: flex;\n justify-content: center;\n gap: 2rem;\n}\n\nnav a {\n color: white;\n text-decoration: none;\n font-weight: bold;\n}\n\nmain {\n padding: 2rem;\n}\n\n.stats-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\n.stat-card {\n background: var(--card-bg);\n padding: 1.5rem;\n border-radius: 8px;\n box-shadow: var(--shadow);\n text-align: center;\n}\n\n.search-bar {\n margin-bottom: 1rem;\n}\n\n.search-bar input {\n width: 100%;\n padding: 0.5rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n}\n\ntable {\n width: 100%;\n border-collapse: collapse;\n margin-top: 1rem;\n}\n\nth, td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid #ddd;\n}\n\nth {\n background-color: var(--primary-color);\n color: white;\n}\n\n.expiry-chart {\n margin-top: 2rem;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background: var(--secondary-color);\n color: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 768px) {\n nav ul {\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .stats-grid {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n // Mock data for demonstration\n const inventoryData = [\n { name: 'Green Tea', quantity: 50, expiry: '2023-12-01' },\n { name: 'Black Tea', quantity: 30, expiry: '2023-11-15' },\n { name: 'Herbal Tea', quantity: 20, expiry: '2023-10-20' },\n { name: 'Oolong Tea', quantity: 10, expiry: '2023-09-25' }\n ];\n\n // Dashboard Stats\n const totalStock = inventoryData.reduce((sum, item) => sum + item.quantity, 0);\n const lowStockItems = inventoryData.filter(item => item.quantity < 25).length;\n const expiringSoon = inventoryData.filter(item => new Date(item.expiry) < new Date('2023-12-01')).length;\n\n document.getElementById('total-stock').textContent = totalStock;\n document.getElementById('low-stock').textContent = lowStockItems;\n document.getElementById('expiring-soon').textContent = expiringSoon;\n\n // Populate Inventory Table\n const tableBody = document.querySelector('#inventory-table tbody');\n inventoryData.forEach(item => {\n const row = document.createElement('tr');\n row.innerHTML = `\n <td>${item.name}</td>\n <td>${item.quantity}</td>\n <td>${item.expiry}</td>\n <td><button>Edit</button></td>\n `;\n tableBody.appendChild(row);\n });\n\n // Expiry Chart\n const ctx = document.getElementById('expiryChart').getContext('2d');\n new Chart(ctx, {\n type: 'line',\n data: {\n labels: inventoryData.map(item => item.name),\n datasets: [{\n label: 'Days Until Expiry',\n data: inventoryData.map(item => Math.floor((new Date(item.expiry) - new Date()) / (1000 * 60 * 60 * 24))),\n backgroundColor: 'rgba(76, 175, 80, 0.2)',\n borderColor: 'rgba(76, 175, 80, 1)',\n borderWidth: 2\n }]\n },\n options: {\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n });\n\n // Search Functionality\n document.getElementById('search').addEventListener('input', function() {\n const searchTerm = this.value.toLowerCase();\n const rows = tableBody.querySelectorAll('tr');\n rows.forEach(row => {\n const name = row.querySelector('td').textContent.toLowerCase();\n row.style.display = name.includes(searchTerm) ? '' : 'none';\n });\n });\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 291,
+ "completion_tokens": 1684,
+ "total_tokens": 1975,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 291
+ },
+ "system_fingerprint": "fp_3a5770e1b4"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..d7fae67
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,3 @@
+# teatra4.scroll.pub
+
+website generated by DeepSeek from prompt: I want to create a website to manage the dynamic inventory of a store that selling tea drinks in Frankfurt am Main. I want to have a dashboard and detailed information when I want to see details and change inputs, plus a section for expiry forecast, do show content for this section as well
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..a4dff69
--- /dev/null
+++ b/script.js
@@ -0,0 +1,64 @@
+document.addEventListener('DOMContentLoaded', function() {
+ // Mock data for demonstration
+ const inventoryData = [
+ { name: 'Green Tea', quantity: 50, expiry: '2023-12-01' },
+ { name: 'Black Tea', quantity: 30, expiry: '2023-11-15' },
+ { name: 'Herbal Tea', quantity: 20, expiry: '2023-10-20' },
+ { name: 'Oolong Tea', quantity: 10, expiry: '2023-09-25' }
+ ];
+
+ // Dashboard Stats
+ const totalStock = inventoryData.reduce((sum, item) => sum + item.quantity, 0);
+ const lowStockItems = inventoryData.filter(item => item.quantity < 25).length;
+ const expiringSoon = inventoryData.filter(item => new Date(item.expiry) < new Date('2023-12-01')).length;
+
+ document.getElementById('total-stock').textContent = totalStock;
+ document.getElementById('low-stock').textContent = lowStockItems;
+ document.getElementById('expiring-soon').textContent = expiringSoon;
+
+ // Populate Inventory Table
+ const tableBody = document.querySelector('#inventory-table tbody');
+ inventoryData.forEach(item => {
+ const row = document.createElement('tr');
+ row.innerHTML = `
+ <td>${item.name}</td>
+ <td>${item.quantity}</td>
+ <td>${item.expiry}</td>
+ <td><button>Edit</button></td>
+ `;
+ tableBody.appendChild(row);
+ });
+
+ // Expiry Chart
+ const ctx = document.getElementById('expiryChart').getContext('2d');
+ new Chart(ctx, {
+ type: 'line',
+ data: {
+ labels: inventoryData.map(item => item.name),
+ datasets: [{
+ label: 'Days Until Expiry',
+ data: inventoryData.map(item => Math.floor((new Date(item.expiry) - new Date()) / (1000 * 60 * 60 * 24))),
+ backgroundColor: 'rgba(76, 175, 80, 0.2)',
+ borderColor: 'rgba(76, 175, 80, 1)',
+ borderWidth: 2
+ }]
+ },
+ options: {
+ scales: {
+ y: {
+ beginAtZero: true
+ }
+ }
+ }
+ });
+
+ // Search Functionality
+ document.getElementById('search').addEventListener('input', function() {
+ const searchTerm = this.value.toLowerCase();
+ const rows = tableBody.querySelectorAll('tr');
+ rows.forEach(row => {
+ const name = row.querySelector('td').textContent.toLowerCase();
+ row.style.display = name.includes(searchTerm) ? '' : 'none';
+ });
+ });
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..25b5ab5
--- /dev/null
+++ b/style.css
@@ -0,0 +1,113 @@
+:root {
+ --primary-color: #4CAF50;
+ --secondary-color: #388E3C;
+ --background-color: #F1F8E9;
+ --text-color: #2E7D32;
+ --card-bg: #FFFFFF;
+ --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+}
+
+body {
+ font-family: 'Segoe UI', sans-serif;
+ margin: 0;
+ padding: 0;
+ background-color: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+}
+
+header {
+ background: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+}
+
+nav {
+ background: var(--secondary-color);
+ padding: 1rem;
+}
+
+nav ul {
+ list-style: none;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+ gap: 2rem;
+}
+
+nav a {
+ color: white;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+main {
+ padding: 2rem;
+}
+
+.stats-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 1rem;
+ margin-bottom: 2rem;
+}
+
+.stat-card {
+ background: var(--card-bg);
+ padding: 1.5rem;
+ border-radius: 8px;
+ box-shadow: var(--shadow);
+ text-align: center;
+}
+
+.search-bar {
+ margin-bottom: 1rem;
+}
+
+.search-bar input {
+ width: 100%;
+ padding: 0.5rem;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-top: 1rem;
+}
+
+th, td {
+ padding: 0.75rem;
+ text-align: left;
+ border-bottom: 1px solid #ddd;
+}
+
+th {
+ background-color: var(--primary-color);
+ color: white;
+}
+
+.expiry-chart {
+ margin-top: 2rem;
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ background: var(--secondary-color);
+ color: white;
+ margin-top: 2rem;
+}
+
+@media (max-width: 768px) {
+ nav ul {
+ flex-direction: column;
+ gap: 0.5rem;
+ }
+
+ .stats-grid {
+ grid-template-columns: 1fr;
+ }
+}
\ No newline at end of file