forked from ramp4-pcar4/story-ramp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-ca-en.html
143 lines (126 loc) · 5.07 KB
/
index-ca-en.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="en" 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>RAMP Storylines</title>
<!-- 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-en.js"
></script>
<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: 'fr',
href: 'index-ca-fr.html#/fr/' + newURLRoute,
text: 'Français'
}
],
breadcrumbs: [
{
title: 'Environment and natural resources',
href: 'https://www.canada.ca/en/services/environment.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>
<!-- START OF SmartSource Data Collector TAG -->
<!-- Copyright (c) 1996-2021 Webtrends Inc. All rights reserved. -->
<!-- Version: 9.4.0 -->
<script src="scripts/webtrends.js" type="text/javascript"></script>
<!-- ----------------------------------------------------------------------------------- -->
<!-- Warning: The two script blocks below must remain inline. Moving them to an external -->
<!-- JavaScript include file can cause serious problems with cross-domain tracking. -->
<!-- ----------------------------------------------------------------------------------- -->
<script type="text/javascript">
//<![CDATA[
var _tag = new WebTrends();
_tag.dcsGetId();
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
_tag.dcsCustom = function () {
// Add custom parameters here.
//_tag.DCSext.param_name=param_value;
};
_tag.dcsCollect();
//]]>
</script>
<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 -->