-
Notifications
You must be signed in to change notification settings - Fork 42
/
page.template
105 lines (102 loc) · 3.2 KB
/
page.template
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>UCSC Xena</title>
<script type="text/javascript">
// Keep near the top of the page so it executes immediately.
(function (cssCode) {
var styleElement = document.createElement("style");
styleElement.type = "text/css";
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = cssCode;
} else {
styleElement.appendChild(document.createTextNode(cssCode));
}
document.getElementsByTagName("head")[0].appendChild(styleElement);
})("#noJScript { display: none }");
</script>
<script type="text/javascript">
window.config = {
ga_id: null,
jslogging: false,
baseurl: '/'
};
</script>
<!--#include file="config.js" -->
<script type="text/javascript">
var noga;
try {
noga = JSON.parse(window.localStorage.hidden).noga;
} catch (err) {}
var ga_id = noga ? undefined : config.ga_id;
if (ga_id) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', ga_id, 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body id="body">
<div class="minWidthWrapper">
<div id="navMenuMain">
</div>
<div id="main">
<div id='noJScript' style="text-align:center; background: yellow; color: black; font-size: small; width: 500px; margin: auto;">
<em>Warning</em>: It appears as though you do not have javascript enabled. The UCSC Xena browser relies heavily on JavaScript and will not function without it enabled. Thank you for your understanding.
</div>
</div>
<div id="footer">
</div>
</div>
<script type="text/javascript">
(function () {
var pages = {
<% if (process.env.NODE_ENV !== 'production') { %>
docs: <%=JSON.stringify(templateParams.compilation.namedChunks.get('docs').files)%>,
bookmarks: <%=JSON.stringify(templateParams.compilation.namedChunks.get('bookmarks').files)%>,
<% } %>
heatmap: <%=JSON.stringify(templateParams.compilation.namedChunks.get('heatmap').files)%>
},
path = document.location.pathname,
page = (function () {
var p;
for (p in pages) {
if ('/' + p + '/' === path) {
return pages[p];
}
}
return pages.heatmap;
})();
function addScript(path) {
var st = document.createElement('script');
st.type = 'text/javascript';
st.async = true;
st.src = path;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(st, s);
}
function addStyle(path) {
var css = document.createElement('link');
css.type = 'text/css';
css.rel = 'stylesheet';
css.href = path;
document.getElementsByTagName("body")[0].appendChild(css);
}
page.forEach(function (file) {
if (file.match(/\.js$/)) {
addScript('/' + file);
}
if (file.match(/\.css$/)) {
addStyle('/' + file);
}
});
}());
</script>
</body>
</html>