-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
113 lines (95 loc) · 2.2 KB
/
index.html
File metadata and controls
113 lines (95 loc) · 2.2 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#mySidenav a {
position: absolute;
left: -70px;
transition: 0.3s;
padding: 15px;
width: 120px;
text-decoration: none;
font-size: 20px;
color: white;
border-radius: 0 5px 5px 0;
}
#mySidenav a:hover {
left: 0;
}
#byCategory {
top: 97px;
background-color: #4CAF50;
}
#byAge {
top: 157px;
background-color: #2196F3;
}
#byGender {
top: 217px;
background-color: #f44336;
}
</style>
<style>
.accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 70%;
border: none;
text-align: middle;
outline: none;
font-size: 15px;
transition: 0.4s;
}
.active, .accordion:hover {
background-color: #ccc;
}
.panel {
padding: 0 18px;
display: none;
background-color: white;
overflow: hidden;
}
</style>
</head>
<body>
<div id="mySidenav" class="sidenav">
<a href="waffle_chart.html" id="byCategory">By Category</a>
<a href="age.html" id="byAge">By Age</a>
<a href="map.html" id="byGender">By Country</a>
</div>
<div style="margin-left:80px;">
<h2>Nobel Prize Laureates</h2>
<p>Analysis by: Angela Chen, Carson Chen, Sophie Du, Tian Fu, Yucheng Zhu</p>
</div>
<button class="accordion">By Category</button>
<div class="panel" style="margin-left:80px;">
<p>We explore the distribution of prize laureates in different categories.</p>
</div>
<button class="accordion">By Age</button>
<div class="panel" style="margin-left:80px;">
<p>We explore the distribution of age among prize laureates and across different price categories.</p>
</div>
<button class="accordion">By Country</button>
<div class="panel" style="margin-left:80px;">
<p>We explore the distribution of prize laureates in across their birth and death countries.</p>
</div>
<script>
var acc = document.getElementsByClassName("accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function() {
this.classList.toggle("active");
var panel = this.nextElementSibling;
if (panel.style.display === "block") {
panel.style.display = "none";
} else {
panel.style.display = "block";
}
});
}
</script>
</body>
</html>