-
Notifications
You must be signed in to change notification settings - Fork 2
/
info.html
93 lines (78 loc) · 3.38 KB
/
info.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
<!DOCTYPE html>
<html>
<head>
<title>Thwaites Explorer WebApp Info Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<link href='https://fonts.googleapis.com/css?family=Londrina Outline' rel='stylesheet'>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<link rel="stylesheet" href="css/info.css" type="text/css">
<link rel="shortcut icon" href="img/favicon.ico" />
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
</head>
<body>
<div class="w3-main" style="margin-left:0;">
<header class="w3-container banner-header">
<button type="button" onclick="window.open('', '_self', ''); window.close();" class="back-btn">Back</button>
<table>
<tr>
<td>
<a target="_blank" href="index.html" style="text-decoration: none;">
<img src="img/itgc-logo-color-white-background-295.png" class="banner-logo" alt="logo">
</a>
</td>
<td>
<a target="_blank" href="index.html" style="text-decoration: none;">
<h1 class="banner-text">Thwaites Explorer Web Application</h1>
</a>
</td>
</tr>
</table>
</header>
<div id="frameContainer" class="w3-container" style="padding:5px">
<iframe id="iframe" frameborder="0" border="0" cellspacing="0"></iframe>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
var webpages_url = "/data/info_pages/html/";
var basemap_url = "https://d1ubeg96lo3skd.cloudfront.net/data/basemaps/gmrt/";
var topic = window.location.search.split("topic=")[1];
if (topic) topic = topic.split("&")[0];
var type = window.location.search.split("type=")[1];
if (type) type = type.split("&")[0];
var url;
if (type == "basemap") {
url = basemap_url + topic + ".html";
} else if (topic) {
url = webpages_url + topic + ".html";
}
console.log(url)
$("#iframe").attr("src", url);
});
$('#iframe').load(function () {
$(this).height($(this).contents().height());
$(this).width($(this).contents().width());
//add our own css styling to the iframe contents
var cssLink = document.createElement("link");
cssLink.href = "/css/info.css";
cssLink.rel = "stylesheet";
cssLink.type = "text/css";
$(this).contents().find("head").append(cssLink);
// open links in new tabs
var base = document.createElement("base");
base.target = "_blank";
$(this).contents().find("head").append(base);
});
$(window).resize(function() {
//resize the iframe when the window is resized
$('#iframe').height($(this).height());
$('#iframe').width($(this).width());
});
</script>
</body>
</html>