Model-config web apps: describe the app in configuration instead of writing code. Built on Polars and DuckDB.
templates.html · 7.6 KB · 106 lines
| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <title>Template Marketplace - DBBasic</title> |
| 7 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> |
| 8 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css"> |
| 9 | |
| 10 | <style> |
| 11 | .card { transition: transform 0.3s; } |
| 12 | .card:hover { transform: translateY(-5px); } |
| 13 | </style> |
| 14 | </head> |
| 15 | <body> |
| 16 | |
| 17 | <nav class="navbar navbar-expand-lg navbar-light bg-light"> |
| 18 | <div class="container-fluid"> |
| 19 | <a class="navbar-brand" href="#">DBBasic</a> |
| 20 | <div class="navbar-nav ms-auto"> |
| 21 | <a class="nav-link" href="http://localhost:8004">Monitor</a> <a class="nav-link" href="http://localhost:8005">Data</a> <a class="nav-link" href="http://localhost:8003">AI Services</a> <a class="nav-link" href="http://localhost:8006">Event Store</a> <a class="nav-link" href="http://localhost:8005/templates">Templates</a> |
| 22 | </div> |
| 23 | </div> |
| 24 | </nav><div class="container-fluid"><div class="container"> |
| 25 | <nav aria-label="breadcrumb"> |
| 26 | <ol class="breadcrumb"> |
| 27 | <li class="breadcrumb-item"><a href="/">DBBasic</a></li><li class="breadcrumb-item active">Data</li> |
| 28 | </ol> |
| 29 | </nav> |
| 30 | </div></div><div class="container-fluid"> |
| 31 | <div class="bg-primary text-white text-center py-5"> |
| 32 | <div class="container"> |
| 33 | <h1 class="display-4">🛍️ Template Marketplace</h1> |
| 34 | <p class="lead">Deploy production-ready applications in minutes</p> |
| 35 | </div> |
| 36 | </div> |
| 37 | <ul class="nav nav-tabs" role="tablist"> |
| 38 | |
| 39 | </ul> |
| 40 | <div class="tab-content mt-3"> |
| 41 | |
| 42 | </div> |
| 43 | |
| 44 | <div class="container my-5"> |
| 45 | <div class="row row-cols-1 row-cols-md-3 g-4"> |
| 46 | <div class="col"> |
| 47 | <div class="card h-100"> |
| 48 | <div class="card-body"> |
| 49 | <div class="d-flex justify-content-between align-items-start mb-2"> |
| 50 | <h5 class="card-title">Professional Blog</h5> |
| 51 | |
| 52 | </div> |
| 53 | <p class="card-text">Full-featured blog with SEO, categories, tags, and social sharing</p> |
| 54 | </div> |
| 55 | |
| 56 | </div></div> <div class="col"> |
| 57 | <div class="card h-100"> |
| 58 | <div class="card-body"> |
| 59 | <div class="d-flex justify-content-between align-items-start mb-2"> |
| 60 | <h5 class="card-title">Complete E-Commerce Platform</h5> |
| 61 | |
| 62 | </div> |
| 63 | <p class="card-text">Production-ready online store with inventory, orders, and payments</p> |
| 64 | </div> |
| 65 | |
| 66 | </div></div> <div class="col"> |
| 67 | <div class="card h-100"> |
| 68 | <div class="card-body"> |
| 69 | <div class="d-flex justify-content-between align-items-start mb-2"> |
| 70 | <h5 class="card-title">Customer Relationship Management</h5> |
| 71 | |
| 72 | </div> |
| 73 | <p class="card-text">Complete CRM with leads, contacts, and sales pipeline</p> |
| 74 | </div> |
| 75 | |
| 76 | </div></div> <div class="col"> |
| 77 | <div class="card h-100"> |
| 78 | <div class="card-body"> |
| 79 | <div class="d-flex justify-content-between align-items-start mb-2"> |
| 80 | <h5 class="card-title">Agile Project Management</h5> |
| 81 | |
| 82 | </div> |
| 83 | <p class="card-text">Kanban boards, sprints, and team collaboration</p> |
| 84 | </div> |
| 85 | |
| 86 | </div></div> <div class="col"> |
| 87 | <div class="card h-100"> |
| 88 | <div class="card-body"> |
| 89 | <div class="d-flex justify-content-between align-items-start mb-2"> |
| 90 | <h5 class="card-title">Social Media Platform</h5> |
| 91 | |
| 92 | </div> |
| 93 | <p class="card-text">User profiles, posts, and social interactions</p> |
| 94 | </div> |
| 95 | |
| 96 | </div></div> |
| 97 | </div> |
| 98 | </div></div><div class="container-fluid"><div class="container">{'type': 'row', 'children': [{'type': 'col', 'size': 4, 'children': ['<h5>DBBasic</h5>', '<p class="text-muted">Config-driven application platform</p>']}, {'type': 'col', 'size': 4, 'children': ['<h6>Services</h6>', {'type': 'list', 'class': 'list-unstyled', 'items': ['<a href="http://localhost:8004" class="text-muted">Monitor</a>', '<a href="http://localhost:8005" class="text-muted">Data</a>', '<a href="http://localhost:8003" class="text-muted">AI Services</a>', '<a href="http://localhost:8006" class="text-muted">Event Store</a>', '<a href="http://localhost:8005" class="text-muted">Templates</a>']}]}, {'type': 'col', 'size': 4, 'children': ['<h6>Performance</h6>', '<p class="text-muted">🚀 402M rows/sec with DuckDB</p>', '<p class="text-muted">⚡ Post-Code Era</p>', '<p class="text-muted">🤖 AI-Enhanced</p>']}]}<hr class="border-secondary"><p class="text-center text-muted mb-0">© 2024 DBBasic - Everything is Data</p></div></div>{'type': 'script', 'content': '\n function previewTemplate(templateName) {\n window.open(`/templates/${templateName}/preview`, \'_blank\');\n }\n\n async function deployTemplate(templateName) {\n if (!confirm(`Deploy ${templateName} template?`)) return;\n\n const response = await fetch(\'/api/templates/deploy\', {\n method: \'POST\',\n headers: {\'Content-Type\': \'application/json\'},\n body: JSON.stringify({template: templateName})\n });\n\n if (response.ok) {\n const result = await response.json();\n alert(`Template deployed successfully! Access at: ${result.url}`);\n location.href = result.url;\n } else {\n alert(\'Deployment failed. Please try again.\');\n }\n }\n\n // Tab filtering\n document.addEventListener(\'DOMContentLoaded\', () => {\n const tabs = document.querySelectorAll(\'[data-bs-toggle="tab"]\');\n tabs.forEach(tab => {\n tab.addEventListener(\'click\', (e) => {\n const category = e.target.getAttribute(\'aria-controls\');\n filterTemplates(category);\n });\n });\n });\n\n function filterTemplates(category) {\n const cards = document.querySelectorAll(\'.template-card\');\n cards.forEach(card => {\n if (category === \'all\' || card.dataset.category === category) {\n card.style.display = \'block\';\n } else {\n card.style.display = \'none\';\n }\n });\n }\n '} |
| 99 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> |
| 100 | |
| 101 | <script> |
| 102 | function deployTemplate(id) { alert('Deploying: ' + id); } |
| 103 | function previewTemplate(id) { alert('Preview: ' + id); } |
| 104 | </script> |
| 105 | </body> |
| 106 | </html> |