base_template.html 4.78 KB
Newer Older
Pierre Dittgen's avatar
Pierre Dittgen committed
1
{% from "_sentry.html" import init_sentry %}
2
3
4
5
6
7
8
9
10
11
<!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 -->
Christophe Benz's avatar
Christophe Benz committed
12
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
Christophe Benz's avatar
Christophe Benz committed
13
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
Pierre Dittgen's avatar
Pierre Dittgen committed
14
15
    <!-- Validata CSS-->
    <link rel="stylesheet" href="{{ url_for('static', filename='validata.css')}}">
Christophe Benz's avatar
Christophe Benz committed
16
    <title>Validata – {% block title %}{% endblock %}</title>
17
18
19
20
21
    {% endblock %}
</head>

<body>
    <!-- horizontal navigation bar -->
Christophe Benz's avatar
Christophe Benz committed
22
    <nav class="nav px-3 py-2 border-bottom">
23
        <a class="navbar-brand" href="{{ url_for('home') }}">
Christophe Benz's avatar
Christophe Benz committed
24
25
            <img src="{{ url_for('static', filename='img/logo-horizontal.png') }}" height="15" alt="Validata" />
        </a>
26
        {% for link in config.CONFIG.header.links %}
27
28
        <a class="nav-link" href="{{ link.url }}" target="_blank">{{ link.title }}</a>
        {% endfor %}
Christophe Benz's avatar
Christophe Benz committed
29
        <a class="btn btn-outline-danger ml-auto" rel="external" target="_blank" href="https://git.opendatafrance.net/validata/validata-ui/issues/new?issuable_template=Probl%C3%A8me">
Christophe Benz's avatar
Christophe Benz committed
30
            Signaler un problème
31
32
33
34
        </a>
    </nav>

    <!-- Breadcrumbs -->
Christophe Benz's avatar
Christophe Benz committed
35
    {% if breadcrumbs %}
36
37
38
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            {% for bc in breadcrumbs %}
Christophe Benz's avatar
Christophe Benz committed
39
40
41
42
43
44
45
            <li class="breadcrumb-item">
            {% if bc.url %}
                <a href="{{ bc.url }}">{{ bc.title|e }}</a>
            {% else %}
                <span>{{ bc.title|e }}</span>
            {% endif %}
            </li>
46
47
48
            {% endfor %}
        </ol>
    </nav>
Christophe Benz's avatar
Christophe Benz committed
49
    {% endif %}
50
51
52
53
54

    <!-- Flashing messages -->
    {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
    {% for category, message in messages %}
55
    <div class="alert alert-{{ category }}">
56
57
58
59
60
61
62
        {{ message }}
    </div>
    {% endfor %}
    {% endif %}
    {% endwith %}

    <!-- main content -->
63
    <div id="content">
Christophe Benz's avatar
Christophe Benz committed
64
    {% block content %}{% endblock %}
65
66
    </div>

Pierre Dittgen's avatar
Pierre Dittgen committed
67
    <footer class="footer hidden-print">
68
        <p>
69
            <a href="https://www.validata.fr/">Validata</a> est
Pierre Dittgen's avatar
Pierre Dittgen committed
70
71
            une initiative d'<a href="http://www.opendatafrance.net/">OpenDataFrance</a>
            développée par <a href="https://jailbreak.paris">Jailbreak</a>.
72
73
        </p>
        <p>
74
            {% for link in config.CONFIG.footer.links %}
75
76
77
            <a href="{{ link.url }}" target="_blank">{{ link.title }}</a>
            {{ " | " if not loop.last }}
            {% endfor %}
78
79
        </p>
        <p class="text-muted">
Pierre Dittgen's avatar
Pierre Dittgen committed
80
            version <a href="https://git.opendatafrance.net/validata/validata-ui/tree/v{{ validata_ui_version }}" target="_blank">{{ validata_ui_version }}</a>
81
        </p>
82
    </footer>
Christophe Benz's avatar
Christophe Benz committed
83

84
85
86
87
88
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
    {% block page_scripts %}{% endblock %}

89
90
91
92
93
94
95
96
97
    {% if config.MATOMO_BASE_URL and config.MATOMO_SITE_ID %}
        <script type="text/javascript">
        var _paq = window._paq || [];
        /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
        _paq.push(['trackPageView']);
        _paq.push(['enableLinkTracking']);
        (function() {
            var u="{{ config.MATOMO_BASE_URL }}/";
            _paq.push(['setTrackerUrl', u+'matomo.php']);
Christophe Benz's avatar
fixup!    
Christophe Benz committed
98
            _paq.push(['setSiteId', '{{ config.MATOMO_SITE_ID }}']);
99
100
101
102
103
104
            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+'matomo.js'; s.parentNode.insertBefore(g,s);
        })();
        </script>
    {% endif %}

Pierre Dittgen's avatar
Pierre Dittgen committed
105
106
107
108
    {% if config.SENTRY_DSN %}
    {{ init_sentry(config.SENTRY_DSN) }}
    {% endif %}

109
110
</body>

Johan Richer's avatar
Johan Richer committed
111
</html>