-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex-ca-fr.html
125 lines (107 loc) · 4.63 KB
/
index-ca-fr.html
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta content="width=device-width,initial-scale=1" name="viewport" />
<title>Éditeur de scénarios de la PCAR</title>
<script src="https://code.highcharts.com/highcharts.js" type="text/javascript" charset="utf-8"></script>
<script src="https://code.highcharts.com/modules/data.js" type="text/javascript" charset="utf-8"></script>
<script src="scripts/highcharts-editor/highcharts-editor.complete.js" type="text/javascript"></script>
<!-- replace `rn` in the url with a version number ("v4_0_30" for example) if desired -->
<script
type="text/javascript"
src="https://www.canada.ca/etc/designs/canada/cdts/gcweb/rn/cdts/compiled/soyutils.js"
></script>
<script
type="text/javascript"
src="https://www.canada.ca/etc/designs/canada/cdts/gcweb/rn/cdts/compiled/wet-fr.js"
></script>
<link rel="stylesheet" href="scripts/highcharts-editor/highcharts-editor.min.css" />
<script type="text/javascript">
document.write(wet.builder.refTop({}));
</script>
</head>
<body>
<!-- template top and no-script fallback -->
<div id="def-top"></div>
<div id="wb-cont">
<div id="app"></div>
</div>
<!-- template footer and no-script fallback -->
<div id="def-footer"></div>
<script type="text/javascript">
// URL Parsing for Language Switch
var url = new URL(window.location.href);
var hashParams = url.hash.split('/');
// If there's an empty item at the end of the paramater list (occurs if there's a trailing slash in the URL), clear it.
if (hashParams.at(-1).length === 0) {
hashParams.pop();
}
// If content after the last slash in the URL is an anchor, clear it.
if (hashParams.at(-1).startsWith('#')) {
hashParams.pop();
}
// Finally, extract the StoryRAMP ID from the URL. If it has an anchor tag in it, remove it since it's not useful on the new page.
var productID = hashParams.pop();
if (productID.includes('#')) {
productID = productID.split('#')[0];
}
// Check to see if the 'editor' route is included in the URL. If so, keep it.
var hasEditor = hashParams.pop() === 'editor';
// Build new URL route.
var newURLRoute = hasEditor ? 'editor/' + productID : productID;
var defTop = document.getElementById('def-top');
defTop.outerHTML = wet.builder.top({
lngLinks: [
{
lang: 'en',
href: 'index-ca-en.html#/en/' + newURLRoute,
text: 'English'
}
],
breadcrumbs: [
{
title: 'Environnement et ressources naturelles',
href: 'https://www.canada.ca/fr/services/environnement/meteo.html'
}
]
});
document.querySelectorAll('.wb-sl').forEach(function (skipLink) {
skipLink.setAttribute('href', url.href.split(/#[^\/]/)[0] + '#' + skipLink.href.split('#')[1]);
});
var interval = setInterval(function () {
var links = document.querySelectorAll('.wb-sl');
if (links.length === 3) {
clearInterval(interval);
links[2].setAttribute('href', url.href.split(/#[^\/]/)[0] + '?' + links[2].href.split('?')[1]);
}
}, 200);
</script>
<script>
var defFooter = document.getElementById('def-footer');
defFooter.outerHTML = wet.builder.footer({});
</script>
<script>
document.write(wet.builder.refFooter({}));
</script>
<script type="module" src="/src/main.ts"></script>
<style>
html {
font-size: 16px;
}
</style>
</body>
</html>
<noscript>
<div>
<img
alt="DCSIMG"
id="DCSIMG"
width="1"
height="1"
src="https://sdc.ncr.ec.gc.ca/dcs2kf7dq10000kzg8kpqz5gp_3q4i/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=9.4.0&dcssip=www.environmental-maps.canada.ca"
/>
</div>
</noscript>
<!-- END OF SmartSource Data Collector TAG -->