GIGAParviz's picture
Update templates/layout.html
8162d1c verified
<!doctype html>
<html lang="fa" dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>داشبورد بهینه‌سازی پروژه PVC</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<nav class="navbar navbar-dark bg-dark border-bottom border-secondary shadow-sm">
<div class="container-fluid d-flex align-items-center">
<img src="{{ url_for('static', filename='images/logo.png') }}" alt="Logo" height="120" class="me-2 rounded">
<span class="navbar-brand fw-bold text-accent">🏭 Petro Optima</span>
</div>
</nav>
<main class="px-4 py-3">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, msg in messages %}
<div class="alert alert-{{ 'info' if category=='info' else ('danger' if category=='danger' else ('success' if category=='success' else 'warning')) }} alert-dismissible fade show custom-alert" role="alert">
{{ msg }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</main>
<footer class="text-center text-muted py-3 border-top border-secondary">
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="{{ url_for('static', filename='js/charts.js') }}"></script>
<div id="loading-overlay" class="d-none">
<div class="loading-spinner"></div>
<div class="loading-text">در حال انجام محاسبات، لطفاً صبر کنید...</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
const forms = document.querySelectorAll("form");
forms.forEach(form => {
form.addEventListener("submit", function() {
const overlay = document.getElementById("loading-overlay");
overlay.classList.remove("d-none");
});
});
});
</script>
</body>
</html>