-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathbase.njk
73 lines (60 loc) · 2.81 KB
/
base.njk
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
<!doctype html>
<html lang="{{ page.lang }}" data-fr-scheme="system" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{{ description or metadata.description }}">
<meta name="theme-color" content="#000091">
<link rel="apple-touch-icon" href="/favicon/apple-touch-icon.png"><!-- 180×180 -->
<link rel="icon" href="/favicon/favicon.svg" type="image/svg+xml">
<link rel="shortcut icon" href="/favicon/favicon.ico" type="image/x-icon"><!-- 32×32 -->
<link rel="manifest" href="/favicon/manifest.webmanifest" crossorigin="use-credentials">
{#- Atom and JSON feeds included by default #}
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
<link rel="alternate" href="/feed/feed.json" type="application/json" title="{{ metadata.title }}">
<link rel="stylesheet" href="/css/dsfr.min.css">
<link rel="stylesheet" href="/css/utility/utility.min.css">
{%- css %}{% include "public/css/index.css" %}{% endcss %}
{%- css %}{% include "public/css/prism-diff.css" %}{% endcss %}
{%- css %}{% include "node_modules/prismjs/themes/prism-okaidia.css" %}{% endcss %}
<style>{% getBundle "css" %}</style>
<meta name="generator" content="{{ eleventy.generator }}">
<title>{{ title or metadata.title }}</title>
</head>
<body id="top">
{% getBundle "js", "top" %}
{% include "templates/header.njk" %}
<main id="content">
{{ content | safe }}
</main>
{% include "templates/newsletter_and_follow_us.njk" %}
{% include "templates/footer.njk" %}
{% include "templates/display.njk" %}
<!-- Current page: {{ page.url | htmlBaseUrl }} -->
{% js "top" %}
<script>
// Fix FOUC in dark mode
setDarkBeforeRender = () => {
const localScheme = localStorage.getItem('scheme')
if (localScheme === 'dark' || (localScheme === 'system' && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.setAttribute('data-fr-theme', 'dark');
}
}
setDarkBeforeRender();
</script>
{% endjs %}
{% js "body" %}
<script>
const SEARCH_RESULTS_URL = "{{ "/search-results/" | locale_url(page.lang) | htmlBaseUrl }}";
</script>
<script type="text/javascript" src="/js/search.js"></script>
{% endjs %}
{% getBundle "js", "body" %}
<!-- Script en version es6 module et nomodule pour les navigateurs le ne supportant pas -->
<script type="module" src="/js/dsfr.module.min.js"></script>
<script type="text/javascript" nomodule src="/js/dsfr.nomodule.min.js"></script>
<!-- Script Matomo pour le suivi des visites -->
<script type="text/javascript" src="/js/matomo.js"></script>
</body>
</html>