-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.ejs
executable file
·222 lines (209 loc) · 6.87 KB
/
index.ejs
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>UniProt</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- theming, generated and adapted from https://realfavicongenerator.net/ -->
<meta name="theme-color" content="#00639a" />
<!-- Loading optimisations -->
<link rel="preconnect" href="https://rest.uniprot.org/" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<!-- font loading -->
<link
href="https://fonts.googleapis.com/css?family=Lato:400,700|Source+Sans+Pro:600,700&display=optional"
rel="stylesheet"
/>
<% if (!isLiveReload) { %>
<!-- OpenSearch -->
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="UniProt">
<!-- icons -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link
rel="shortcut icon"
type="image/png"
sizes="144x144"
href="/mstile-144x144.png"
/>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<!-- PWA manifest -->
<link rel="manifest" href="/manifest.json" />
<% } if (isDev) { %>
<!-- Prevent indexing when the website is not public -->
<meta name="robots" content="noindex" />
<% if (isUx) { %>
<!-- Google tag (gtag.js) -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-HBH9SSXCEP">
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-HBH9SSXCEP');
</script>
<!-- Hotjar Tracking Code for UniProt dev - UX -->
<script>
(function (h, o, t, j, a, r) {
h.hj =
h.hj ||
function () {
(h.hj.q = h.hj.q || []).push(arguments);
};
h._hjSettings = { hjid: 3503411, hjsv: 6 };
a = o.getElementsByTagName('head')[0];
r = o.createElement('script');
r.async = 1;
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
a.appendChild(r);
})(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
</script>
<% } %>
<% } else { %>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-V6TXEC4BDF"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
// GA4
gtag('config', 'G-V6TXEC4BDF', {
anonymize_ip: true,
allow_google_signals: false,
allow_ad_personalization_signals: false,
restricted_data_processing: true,
custom_map: {
dimension1: 'result_view',
metric1: 'result_view_set',
},
send_page_view: false,
});
// UA
gtag('config', 'UA-6228219-1', {
anonymize_ip: true,
allow_google_signals: false,
allow_ad_personalization_signals: false,
restricted_data_processing: true,
custom_map: {
dimension1: 'result_view',
metric1: 'result_view_set',
},
send_page_view: false,
});
</script>
<!-- Hotjar Tracking Code -->
<script>
(function (h, o, t, j, a, r) {
h.hj =
h.hj ||
function () {
(h.hj.q = h.hj.q || []).push(arguments);
};
h._hjSettings = { hjid: 2638207, hjsv: 6 };
a = o.getElementsByTagName('head')[0];
r = o.createElement('script');
r.async = 1;
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
a.appendChild(r);
})(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
</script>
<% } %>
<style>
#root > .fallback {
height: 90vh;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
animation: fallback-appear 1s 1 10s both;
}
#root > .fallback > div {
max-width: 60ch;
}
#root > .fallback li {
margin-bottom: 1em;
}
@keyframes fallback-appear {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
<% if (!options.inject) { %> <% for (const css of assets.styles) { %>
<link rel="stylesheet" href="<%= css %>" />
<% } %> <% } %>
</head>
<body>
<div id="root">
<div class="fallback" data-nosnippet>
<div>
<h1>UniProt website fallback message</h1>
If you are not seeing anything on this page, it might be for multiple
reasons:
<ul>
<li>
<strong>You might have JavaScript disabled</strong>: make sure to
enable JavaScript on your browser, or use a browser that supports
JavaScript.
</li>
<li>
<strong>You might have an outdated browser</strong>: make sure
that your browser is up to date as older versions might not work
with the website.
</li>
<li>
<strong>There might have been a network issue</strong>: ensure
that your connectivity is stable and try to reload the page to see
if it solves the issue.
<button onClick="location.reload();">Reload this page</button>
</li>
</ul>
</div>
</div>
</div>
<% if (!options.inject) { %>
<script nomodule type="text/javascript">
// workaround for Safari 10.1 supporting module but ignoring nomodule
// From https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc
(function () {
var d = document;
var c = d.createElement('script');
if (!('noModule' in c) && 'onbeforeload' in c) {
var s = false;
d.addEventListener(
'beforeload',
function (e) {
if (e.target === c) {
s = true;
} else if (!e.target.hasAttribute('nomodule') || !s) {
return;
}
e.preventDefault();
},
true
);
c.type = 'module';
c.src = '.';
d.head.appendChild(c);
c.remove();
}
})();
</script>
<% for (const file of assets.modernScripts || []) { %>
<script type="module" src="<%= file %>"></script>
<% } for (const file of assets.legacyScripts || []) { %>
<script nomodule defer src="<%= file %>"></script>
<% } %> <% } %>
</body>
</html>