Files
MagoRevisited/templates/base.html
T
Alby96andClaude Sonnet 4.6 8a9fb5085a Add Mago4 demo ERP with Python FastAPI
Implements a working in-memory ERP demo inspired by Mago4, covering
the core modules: dashboard with KPI widgets, customers, suppliers,
products, sales orders, purchase orders, and warehouse inventory.

- FastAPI backend with Pydantic models and REST API (auto-docs at /docs)
- Jinja2 HTML templates with Mago4-style UI (dark sidebar, blue/orange/
  green/red palette, Material Design icons)
- In-memory fake database seeded with sample customers, suppliers,
  products, and orders — ready to swap for SQLAlchemy + SQL Server
- Workarounds for Python 3.14 + Starlette 1.3 / Jinja2 compatibility
  (cache_size=0, new TemplateResponse(request, name, ctx) signature)
- launch.json for one-click preview; run.bat for manual startup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 10:17:57 +02:00

88 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Mago4 Demo - ERP{% endblock %}</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap">
<link rel="stylesheet" href="{{ url_for('static', path='/css/style.css') }}">
{% block extra_css %}{% endblock %}
</head>
<body>
<div class="app-container">
<!-- Sidebar Navigation -->
<aside class="sidebar">
<div class="sidebar-header">
<div class="logo">
<span class="logo-text">Mago4</span>
<span class="logo-version">Demo</span>
</div>
</div>
<nav class="sidebar-nav">
<a href="/" class="nav-item {% if request.url.path == '/' %}active{% endif %}">
<i class="material-icons">dashboard</i>
<span>Dashboard</span>
</a>
<a href="/customers" class="nav-item {% if 'customers' in request.url.path %}active{% endif %}">
<i class="material-icons">people</i>
<span>Clienti</span>
</a>
<a href="/suppliers" class="nav-item {% if 'suppliers' in request.url.path %}active{% endif %}">
<i class="material-icons">local_shipping</i>
<span>Fornitori</span>
</a>
<a href="/products" class="nav-item {% if 'products' in request.url.path %}active{% endif %}">
<i class="material-icons">inventory_2</i>
<span>Articoli</span>
</a>
<a href="/sales-orders" class="nav-item {% if 'sales' in request.url.path %}active{% endif %}">
<i class="material-icons">receipt</i>
<span>Ordini Vendita</span>
</a>
<a href="/purchase-orders" class="nav-item {% if 'purchase' in request.url.path %}active{% endif %}">
<i class="material-icons">shopping_cart</i>
<span>Ordini Acquisto</span>
</a>
<a href="/warehouse" class="nav-item {% if 'warehouse' in request.url.path %}active{% endif %}">
<i class="material-icons">warehouse</i>
<span>Magazzino</span>
</a>
</nav>
<div class="sidebar-footer">
<div class="version-info">
<span>v1.0.0</span>
<span>In-Memory DB</span>
</div>
</div>
</aside>
<!-- Main Content -->
<main class="main-content">
<header class="top-bar">
<div class="top-bar-content">
<h1 class="page-title">{% block page_title %}{% endblock %}</h1>
<div class="top-bar-actions">
<button class="btn-icon" title="Notifiche">
<i class="material-icons">notifications</i>
</button>
<button class="btn-icon" title="Profilo">
<i class="material-icons">account_circle</i>
</button>
</div>
</div>
</header>
<section class="content-area">
{% block content %}{% endblock %}
</section>
</main>
</div>
<script src="{{ url_for('static', path='/js/app.js') }}"></script>
{% block extra_js %}{% endblock %}
</body>
</html>