File size: 2,410 Bytes
8162d1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!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>