summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/base.html
blob: dca62053864d82866aae60cb34507d1664d86fe2 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
    {% block head %}
    <title>{% block title %}{% endblock %} - OpenGnsys</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Font Awesome Icons -->
    <link rel="stylesheet" href="{{ url_for('static', filename='AdminLTE/plugins/fontawesome-free/css/all.min.css') }}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{{ url_for('static', filename='AdminLTE/dist/css/adminlte.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/soleta.css') }}" />
    {% endblock %}
</head>
<body>
    <div class="main d-flex flex-column align-items-stretch h-100">
        {% include 'nav.html' %}
        {% block nav %}{% endblock %}
        <div class="container-fluid flex-grow-1">
            {% block container %}
            <div class="row h-100">
                    {# The sidebar is not visible on index #}
                    {% if request.endpoint != "index" %}
                        <div id="sidebar" class="bg-light col-md-3 col-lg-2">
                            {% block sidebar %}{% endblock %}
                        </div>
                    {% else %}
                    {% endif %}
                    <div id="content" class="col">
                        <div id="commands" class="py-2">{% block commands %}{% endblock %}</div>
                        <div class="container">
                            {% block content %}{% endblock %}
                        </div>
                    </div>
            </div>
            {% endblock %}
        </div>

        {% block footer %}
        <footer class="footer navbar-inverse bg-dark flex-shrink-0" role="contentinfo">
            <div class="text-center text-secondary mt-1 p-3">
                Powered by
                <a class="text-light" href="https://opengnsys.soleta.eu/">Soleta Networks</a>
            </div>
        </footer>
        {% endblock %}
    </div>

    <!-- jQuery -->
    <script src="{{ url_for('static', filename='AdminLTE/plugins/jquery/jquery.min.js') }}"></script>
    <!-- Bootstrap 4 -->
    <script src="{{ url_for('static', filename='AdminLTE/plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    <!-- AdminLTE App -->
    <script src="{{ url_for('static', filename='AdminLTE/dist/js/adminlte.min.js') }}"></script>

    <script>
        // error messages
        {% for category, message in get_flashed_messages(with_categories=True) %}
            let bgclass = 'bg-success';
            {% if category == 'info' %}
                bgclass = 'bg-info';
            {% elif category == 'error' %}
                bgclass = 'bg-danger';
            {% else %}
                bgclass = 'bg-warning';
            {% endif %}
            $(document).Toasts('create', {
                class: bgclass,
                position: 'topLeft',
                autohide: true,
                delay: 5000,
                title: '{{ message }}',
            })
        {% endfor %}
    </script>
</body>
</html>