|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <html lang="{{ .Site.LanguageCode }}">
|
3 | 3 |
|
4 |
| -<head> |
5 |
| - <style> |
6 |
| - body { |
7 |
| - /* Hide entire body for first paint. This suppresses flicker when theme is loading. */ |
8 |
| - visibility: hidden; |
9 |
| - height: 100vh; |
10 |
| - display: flex; |
11 |
| - flex-direction: column; |
12 |
| - } |
13 |
| - </style> |
14 |
| - |
15 |
| - <noscript> |
16 |
| - <style> |
17 |
| - /* Styles when JavaScript is disabled. Fallsback to old theme. */ |
18 |
| - body { |
19 |
| - visibility: visible; |
20 |
| - } |
21 |
| - </style> |
22 |
| - </noscript> |
23 |
| - |
24 |
| - |
25 |
| - |
26 |
| - <script> |
27 |
| - |
28 |
| - const setTheme = (isNewTheme) => { |
29 |
| - localStorage.setItem("useNewTheme", `${isNewTheme}`); |
30 |
| - // swap out v1 and v2 css style |
31 |
| - const v1cssIds = [ |
32 |
| - "cssFA1", |
33 |
| - "cssFA2", |
34 |
| - "cssFA3", |
35 |
| - "cssBootstrap", |
36 |
| - "css1", |
37 |
| - "css2", |
38 |
| - "css3", |
39 |
| - "css4", |
40 |
| - "css5", |
41 |
| - "css6", |
42 |
| - ]; |
43 |
| - |
44 |
| - v1cssIds.forEach((cssId) => { |
45 |
| - const element = document.getElementById(cssId); |
46 |
| - if (element !== null) { |
47 |
| - element.disabled = isNewTheme; |
48 |
| - } |
49 |
| - }); |
50 |
| - |
51 |
| - const v2cssIds = ["css7", "css9"]; |
52 |
| - v2cssIds.forEach((cssId) => { |
53 |
| - const element = document.getElementById(cssId); |
54 |
| - if (element !== null) { |
55 |
| - element.disabled = !isNewTheme; |
56 |
| - } |
57 |
| - }); |
58 |
| - |
59 |
| - // swap out v1 and v2 elements |
60 |
| - const v1ElementIds = ["sidebar", "footer", "toc", "api", "search-v1", "breadcrumb-v1", "list-v1"] |
61 |
| - |
62 |
| - v1ElementIds.forEach((elementId) => { |
63 |
| - const element = document.getElementById(elementId); |
64 |
| - if (element !== null) { |
65 |
| - element.style.display = isNewTheme ? "none" : ""; |
66 |
| - } |
67 |
| - |
68 |
| - const trustarc = document.getElementById("teconsent-v1"); |
69 |
| - if (trustarc) { |
70 |
| - trustarc.id = isNewTheme ? "teconsent-v1" : "teconsent"; |
71 |
| - } |
72 |
| - }); |
73 |
| - |
74 |
| - document.querySelectorAll(".table-v1").forEach((table) => { |
75 |
| - table.style.display = isNewTheme ? "none" : ""; |
76 |
| - }); |
77 |
| - |
78 |
| - const notMfElements = ['[data-mf="false"]']; |
79 |
| - notMfElements.forEach((elementId) => { |
80 |
| - document.querySelectorAll(elementId).forEach((element) => { |
81 |
| - element.style.display = isNewTheme ? "none" : ""; |
82 |
| - }); |
83 |
| - }) |
84 |
| - |
85 |
| - const mfElements = ['[data-mf="true"]']; |
86 |
| - mfElements.forEach((elementId) => { |
87 |
| - document.querySelectorAll(elementId).forEach((element) => { |
88 |
| - element.style.display = isNewTheme ? "" : "none"; |
89 |
| - |
90 |
| - const trustarc = document.getElementById("teconsent-v2"); |
91 |
| - if (trustarc) { |
92 |
| - trustarc.id = isNewTheme ? "teconsent" : "teconsent-v2"; |
93 |
| - } |
94 |
| - }); |
95 |
| - }); |
96 |
| - |
97 |
| - document.getElementById("body").style.visibility = "visible"; |
98 |
| - }; |
99 |
| - |
100 |
| - const toggleTheme = () => { |
101 |
| - setTheme(!(localStorage.getItem("useNewTheme") === "true")); |
102 |
| - }; |
103 |
| - |
104 |
| - // toggle theme aliases |
105 |
| - const mf = toggleTheme; |
106 |
| - const useNewTheme = toggleTheme; |
107 |
| - |
108 |
| - document.addEventListener("DOMContentLoaded", () => { |
109 |
| - setTheme(localStorage.getItem("useNewTheme") === "true"); |
110 |
| - }); |
111 |
| - |
112 |
| - function gameCode(callback) { |
113 |
| - let kkeys = []; |
114 |
| - // up,up,down,down,left,right,left,right,B,A |
115 |
| - const code = "38,38,40,40,37,39,37,39,66,65"; |
116 |
| - return (event) => { |
117 |
| - kkeys.push(event.keyCode); |
118 |
| - if (kkeys.toString().indexOf(code) >= 0) { |
119 |
| - callback(event); |
120 |
| - kkeys = []; |
121 |
| - } |
122 |
| - }; |
123 |
| - } |
124 |
| - const handler = gameCode(() => { |
125 |
| - mf(); |
126 |
| - }); |
127 |
| - window.addEventListener("keydown", handler); |
128 |
| - |
129 |
| - </script> |
| 4 | +<head> |
130 | 5 |
|
131 | 6 | {{ block "head" . }}
|
132 | 7 |
|
133 | 8 | {{ partial "meta.html" . }}
|
134 |
| - |
| 9 | + |
135 | 10 | {{ partial "favicon.html" . }}
|
136 |
| - |
| 11 | + |
137 | 12 | {{ partial "styles.html" . }}
|
138 |
| - |
| 13 | + |
139 | 14 | {{ if in .Params.doctypes "devportal" }}
|
140 | 15 | {{ partial "devportal/style.html" . }}
|
141 | 16 | {{ end }}
|
142 |
| - |
| 17 | + |
143 | 18 | {{ if fileExists "/layouts/partials/head_custom.html" }}
|
144 | 19 | {{ partial "head_custom.html" . }}
|
145 | 20 | {{ end }}
|
146 |
| - |
| 21 | + |
147 | 22 | {{ if or ( not hugo.IsServer ) ( not ( in .Site.Params.buildtype "package" ) ) }}
|
148 |
| - |
| 23 | + |
149 | 24 | {{ partial "trustarc.html" . }}
|
150 |
| - |
| 25 | + |
151 | 26 | {{ partial "tealium-profile.html" . }}
|
152 |
| - |
| 27 | + |
153 | 28 | {{ end }}
|
154 |
| - |
| 29 | + |
155 | 30 | {{ end }}
|
156 |
| - |
| 31 | + |
157 | 32 | <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
158 | 33 | new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
159 | 34 | j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
160 | 35 | 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
161 | 36 | })(window,document,'script','dataLayer','GTM-K5HG9JT');</script>
|
162 |
| - |
| 37 | + |
163 | 38 | </head>
|
164 |
| - |
| 39 | + |
165 | 40 | <body id="body">
|
166 | 41 | {{ if or ( not hugo.IsServer ) ( not ( in .Site.Params.buildtype "package" ) ) }}
|
167 | 42 | {{ partial "universal-tag.html" . }}
|
168 | 43 | {{ end }}
|
169 |
| - |
| 44 | + |
170 | 45 | <header>
|
171 | 46 | {{ block "header" . }}{{end}}
|
172 | 47 | </header>
|
173 |
| - |
| 48 | + |
174 | 49 | <section class="base-layout" data-testid="base-layout">
|
175 | 50 | <section id="breadcrumb-v1">
|
176 | 51 | {{ if not .IsHome }}
|
177 | 52 | {{ if not (in .Params.display_breadcrumb "false" ) }}
|
178 |
| - {{ partial "breadcrumb" .}} |
| 53 | + {{ partial "breadcrumb" .}} |
179 | 54 | {{ end }}
|
180 | 55 | {{ end }}
|
181 | 56 | </section>
|
182 |
| - |
| 57 | + |
183 | 58 | <div class="main container-fluid min-page-height" data-menu-id="{{.RelPermalink}}">
|
184 | 59 | {{ block "main" . }}{{ end }}
|
185 | 60 | </div>
|
|
196 | 71 | {{ partial "footer-v2.html" . }}
|
197 | 72 | {{ end }}
|
198 | 73 | </footer>
|
199 |
| - {{ partial "scripts.html" . }} |
| 74 | + {{ partial "scripts.html" . }} |
200 | 75 | <div id="consent_blackbar"></div>
|
201 | 76 | </body>
|
202 | 77 | </html>
|
0 commit comments