Changes to teatra3.scroll.pub

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

Teatra

+

Dynamic Tea Inventory Management

+
+
+
+
+

Inventory Dashboard

+
+
+

Total Stock

+

Loading...

+
+
+

Expiring Soon

+

Loading...

+
+
+

Low Stock Items

+

Loading...

+
+
+
+
+
+

Inventory Details

+
+
+
+
+
+
+
+
+
+
+
+
+
ItemQuantityExpiry DateStatus
+
+
+
+

Expiry Forecast

+
+
+
+
+
+

Teatra - Frankfurt am Main

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://teatra.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Teatra - Dynamic Tea Inventory Management
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "ab7af9c7-d123-45aa-82ee-1a884744f7a7",
+ "object": "chat.completion",
+ "created": 1736784613,
+ "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
\n

Teatra

\n

Dynamic Tea Inventory Management

\n
\n\n
\n
\n

Inventory Dashboard

\n
\n
\n

Total Stock

\n

Loading...

\n
\n
\n

Expiring Soon

\n

Loading...

\n
\n
\n

Low Stock Items

\n

Loading...

\n
\n
\n
\n\n
\n

Inventory Details

\n \n \n \n \n \n \n \n \n \n \n \n \n
ItemQuantityExpiry DateStatus
\n
\n\n
\n

Expiry Forecast

\n \n
\n
\n\n
\n

Teatra - Frankfurt am Main

\n
\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #FFC107;\n --background-color: #F5F5F5;\n --text-color: #333;\n --card-shadow: 0 2px 5px 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-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nh1 {\n margin: 0;\n font-size: 2.5rem;\n}\n\n.grid-container {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1.5rem;\n padding: 1.5rem;\n}\n\n.card {\n background: white;\n padding: 1.5rem;\n border-radius: 8px;\n box-shadow: var(--card-shadow);\n transition: transform 0.3s ease;\n}\n\n.card:hover {\n transform: translateY(-5px);\n}\n\n.card h3 {\n color: var(--primary-color);\n margin-top: 0;\n}\n\ntable {\n width: 100%;\n border-collapse: collapse;\n margin: 2rem 0;\n background: white;\n box-shadow: var(--card-shadow);\n}\n\nth, td {\n padding: 12px;\n text-align: left;\n border-bottom: 1px solid #ddd;\n}\n\nth {\n background-color: var(--primary-color);\n color: white;\n}\n\ncanvas {\n max-width: 100%;\n height: 300px;\n margin: 2rem 0;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: var(--primary-color);\n color: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n \n .grid-container {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\n// Sample inventory data\nconst inventory = [\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-30\" },\n { name: \"Oolong Tea\", quantity: 10, expiry: \"2023-11-20\" }\n];\n\n// Calculate inventory metrics\nfunction calculateMetrics() {\n const totalStock = inventory.reduce((sum, item) => sum + item.quantity, 0);\n const expiringSoon = inventory.filter(item => {\n const expiryDate = new Date(item.expiry);\n const today = new Date();\n const diffTime = expiryDate - today;\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n return diffDays <= 30;\n }).length;\n \n const lowStock = inventory.filter(item => item.quantity <= 15).length;\n\n document.getElementById('total-stock').textContent = totalStock;\n document.getElementById('expiring-soon').textContent = expiringSoon;\n document.getElementById('low-stock').textContent = lowStock;\n}\n\n// Populate inventory table\nfunction populateTable() {\n const tbody = document.getElementById('inventory-table');\n tbody.innerHTML = inventory.map(item => `\n \n ${item.name}\n ${item.quantity}\n ${item.expiry}\n ${getStatus(item)}\n \n `).join('');\n}\n\n// Get item status\nfunction getStatus(item) {\n const expiryDate = new Date(item.expiry);\n const today = new Date();\n const diffTime = expiryDate - today;\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n \n if (diffDays <= 0) return 'Expired';\n if (diffDays <= 30) return 'Expiring Soon';\n if (item.quantity <= 15) return 'Low Stock';\n return 'Good';\n}\n\n// Initialize expiry forecast chart\nfunction initChart() {\n const ctx = document.getElementById('expiryChart').getContext('2d');\n const expiryData = inventory.map(item => {\n const expiryDate = new Date(item.expiry);\n const today = new Date();\n return Math.ceil((expiryDate - today) / (1000 * 60 * 60 * 24));\n });\n\n new Chart(ctx, {\n type: 'line',\n data: {\n labels: inventory.map(item => item.name),\n datasets: [{\n label: 'Days Until Expiry',\n data: expiryData,\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 title: {\n display: true,\n text: 'Days Remaining'\n }\n }\n }\n }\n });\n}\n\n// Initialize everything\nfunction init() {\n calculateMetrics();\n populateTable();\n initChart();\n}\n\n// Run initialization when DOM is loaded\ndocument.addEventListener('DOMContentLoaded', init);\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 285,
+ "completion_tokens": 1655,
+ "total_tokens": 1940,
+ "prompt_cache_hit_tokens": 64,
+ "prompt_cache_miss_tokens": 221
+ },
+ "system_fingerprint": "fp_3a5770e1b4"
+ }
readme.scroll
Changed around line 1
+ # teatra3.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, I also want to see the dynamic expiry forecast
script.js
Changed around line 1
+ // Sample inventory data
+ const inventory = [
+ { 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-30" },
+ { name: "Oolong Tea", quantity: 10, expiry: "2023-11-20" }
+ ];
+
+ // Calculate inventory metrics
+ function calculateMetrics() {
+ const totalStock = inventory.reduce((sum, item) => sum + item.quantity, 0);
+ const expiringSoon = inventory.filter(item => {
+ const expiryDate = new Date(item.expiry);
+ const today = new Date();
+ const diffTime = expiryDate - today;
+ const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
+ return diffDays <= 30;
+ }).length;
+
+ const lowStock = inventory.filter(item => item.quantity <= 15).length;
+
+ document.getElementById('total-stock').textContent = totalStock;
+ document.getElementById('expiring-soon').textContent = expiringSoon;
+ document.getElementById('low-stock').textContent = lowStock;
+ }
+
+ // Populate inventory table
+ function populateTable() {
+ const tbody = document.getElementById('inventory-table');
+ tbody.innerHTML = inventory.map(item => `
+
+ ${item.name}
+ ${item.quantity}
+ ${item.expiry}
+ ${getStatus(item)}
+
+ `).join('');
+ }
+
+ // Get item status
+ function getStatus(item) {
+ const expiryDate = new Date(item.expiry);
+ const today = new Date();
+ const diffTime = expiryDate - today;
+ const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
+
+ if (diffDays <= 0) return 'Expired';
+ if (diffDays <= 30) return 'Expiring Soon';
+ if (item.quantity <= 15) return 'Low Stock';
+ return 'Good';
+ }
+
+ // Initialize expiry forecast chart
+ function initChart() {
+ const ctx = document.getElementById('expiryChart').getContext('2d');
+ const expiryData = inventory.map(item => {
+ const expiryDate = new Date(item.expiry);
+ const today = new Date();
+ return Math.ceil((expiryDate - today) / (1000 * 60 * 60 * 24));
+ });
+
+ new Chart(ctx, {
+ type: 'line',
+ data: {
+ labels: inventory.map(item => item.name),
+ datasets: [{
+ label: 'Days Until Expiry',
+ data: expiryData,
+ backgroundColor: 'rgba(76, 175, 80, 0.2)',
+ borderColor: 'rgba(76, 175, 80, 1)',
+ borderWidth: 2
+ }]
+ },
+ options: {
+ scales: {
+ y: {
+ beginAtZero: true,
+ title: {
+ display: true,
+ text: 'Days Remaining'
+ }
+ }
+ }
+ }
+ });
+ }
+
+ // Initialize everything
+ function init() {
+ calculateMetrics();
+ populateTable();
+ initChart();
+ }
+
+ // Run initialization when DOM is loaded
+ document.addEventListener('DOMContentLoaded', init);
style.css
Changed around line 1
+ :root {
+ --primary-color: #4CAF50;
+ --secondary-color: #FFC107;
+ --background-color: #F5F5F5;
+ --text-color: #333;
+ --card-shadow: 0 2px 5px 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-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+ }
+
+ h1 {
+ margin: 0;
+ font-size: 2.5rem;
+ }
+
+ .grid-container {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 1.5rem;
+ padding: 1.5rem;
+ }
+
+ .card {
+ background: white;
+ padding: 1.5rem;
+ border-radius: 8px;
+ box-shadow: var(--card-shadow);
+ transition: transform 0.3s ease;
+ }
+
+ .card:hover {
+ transform: translateY(-5px);
+ }
+
+ .card h3 {
+ color: var(--primary-color);
+ margin-top: 0;
+ }
+
+ table {
+ width: 100%;
+ border-collapse: collapse;
+ margin: 2rem 0;
+ background: white;
+ box-shadow: var(--card-shadow);
+ }
+
+ th, td {
+ padding: 12px;
+ text-align: left;
+ border-bottom: 1px solid #ddd;
+ }
+
+ th {
+ background-color: var(--primary-color);
+ color: white;
+ }
+
+ canvas {
+ max-width: 100%;
+ height: 300px;
+ margin: 2rem 0;
+ }
+
+ footer {
+ text-align: center;
+ padding: 1rem;
+ background-color: var(--primary-color);
+ color: white;
+ margin-top: 2rem;
+ }
+
+ @media (max-width: 768px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ .grid-container {
+ grid-template-columns: 1fr;
+ }
+ }