base_template.html 4.01 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<html lang="fr">

<head>
    {% block head %}
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="icon" href="{{ url_for('static', filename='img/favicon.ico')}}" type="image/x-icon">
    <link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.ico')}}" type="image/x-icon">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="{{url_for('static', filename='css/bootstrap.min.css')}}" crossorigin="anonymous">

    <title>Validata - {% block title %}{% endblock %}</title>
14
15
16
17
18
19
20
21
22
23
24
25

    <style>
        body {
            font-family: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
        }

        .footer {
            background-color: #f5f5f5;
            padding: 3em;
            margin-top: 5em;
        }
    </style>
26
27
28
29
30
    {% endblock %}
</head>

<body>
    <!-- horizontal navigation bar -->
Christophe Benz's avatar
Christophe Benz committed
31
    <nav class="navbar navbar-light">
32
        <a class="navbar-brand" href="{{ url_for('home') }}">
Christophe Benz's avatar
Christophe Benz committed
33
34
35
36
37
            <img src="{{ url_for('static', filename='img/logo-horizontal.png') }}" height="15" alt="Validata" />
            <span class="badge badge-info mx-1" title="Ce service est encore en cours de développement">beta</span>
        </a>
        <a class="btn btn-outline-danger" rel="external" target="_blank" href="https://git.opendatafrance.net/validata/validata-ui/issues/new?issuable_template=Probl%C3%A8me">
            Signaler un problème
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
        </a>
    </nav>

    <!-- Breadcrumbs -->
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            {% for bc in breadcrumbs %}
            <li class="breadcrumb-item"><a href="{{ bc.url }}">{{ bc.title|e }}</a></li>
            {% endfor %}
            <li class="breadcrumb-item active" aria-current="page">{{ title|e }}</li>
        </ol>
    </nav>

    <!-- Flashing messages -->
    {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
    {% for category, message in messages %}
    <div class="alert alert-{{ category }} alert-dismissible fade show">
        {{ message }}
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    {% endfor %}
    {% endif %}
    {% endwith %}

    <!-- main content -->
    <div id="content" class="container-fluid">
        {% block content %}{% endblock %}
    </div>

    <script src="{{url_for('static', filename='js/jquery-3.3.1.min.js')}}"></script>
    <script src="{{url_for('static', filename='js/popper.min.js')}}"></script>
    <script src="{{url_for('static', filename='js/bootstrap.min.js')}}"></script>
    {% block footer %}{% endblock %}
74
    <footer class="footer">
Christophe Benz's avatar
Christophe Benz committed
75
76
77
78
        <div>
            Un service de validation mis à disposition par
            <a href="http://www.opendatafrance.net/">OpenDataFrance</a> avec
            l'aide de <a href="https://jailbreak.paris">Jailbreak</a>
79
        </div>
Christophe Benz's avatar
Christophe Benz committed
80
81
82
83
        <ul class="list-unstyled mt-4">
            <li><a href="/docs" target="_blank">Documentation</a></li>
            <li><a href="/api/v1/apidocs" target="_blank">API</a></li>
        </ul>
84
    </footer>
Christophe Benz's avatar
Christophe Benz committed
85

Christophe Benz's avatar
fixup!    
Christophe Benz committed
86
    {% if not config['DEBUG'] %}
Christophe Benz's avatar
Christophe Benz committed
87
88
    <!-- Matomo -->
    <script type="text/javascript">
89
90
91
92
93
94
95
96
97
98
99
        var _paq = _paq || [];
        /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function () {
            var u = "https://analytics.validata.fr/";
            _paq.push(['setTrackerUrl', u + 'piwik.php']);
            _paq.push(['setSiteId', '1']);
            var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
            g.type = 'text/javascript'; g.async = true; g.defer = true; g.src = u + 'piwik.js'; s.parentNode.insertBefore(g, s);
        })();
Christophe Benz's avatar
Christophe Benz committed
100
101
102
103
    </script>
    <!-- End Matomo Code -->
    {% endif %}

104
105
</body>

106
</html>