-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverview_frame.html
More file actions
117 lines (102 loc) · 2.63 KB
/
overview_frame.html
File metadata and controls
117 lines (102 loc) · 2.63 KB
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial;}
/* Style the tab */
.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
/* Style the buttons inside the tab */
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 14px;
}
/* Change background color of buttons on hover */
.tab button:hover {
background-color: #ddd;
}
/* Create an active/current tablink class */
.tab button.active {
background-color: #ccc;
}
/* Style the tab content */
.tabcontent {
display: none;
padding: 6px 12px;
border: none;
border-top: none;
width: 90%;
height: 100%;
}
.container {
position: relative;
width: 95vw;
height: 95vh;
}
/* Then style the iframe to fit in the container div with full height and width */
.responsive-iframe {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<div class="tab">
<button class="tablinks active" onclick="openCity(event, '1')">All assets (cumulatively)</button>
<button class="tablinks" onclick="openCity(event, '2')">Gains (in €)</button>
<button class="tablinks" onclick="openCity(event, '3')">Gains (in %)</button>
<button class="tablinks" onclick="openCity(event, '4')">Relative Composition History</button>
</div>
<div id="1" class="tabcontent" style="display: block">
<div class="container">
<iframe class="responsive-iframe" src="html/overview1.html"></iframe>
</div>
</div>
<div id="2" class="tabcontent">
<div class="container">
<iframe class="responsive-iframe" src="html/overview_abs_gains.html"></iframe>
</div>
</div>
<div id="3" class="tabcontent">
<div class="container">
<iframe class="responsive-iframe" src="html/overview_rel_gains.html"></iframe>
</div>
</div>
<div id="4" class="tabcontent">
<div class="container">
<iframe class="responsive-iframe" src="html/overview_comp_history.html"></iframe>
</div>
</div>
<script>
function openCity(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
</body>
</html>