-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
173 lines (150 loc) · 5.78 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<title>Simmons Officers</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic" rel="stylesheet" type="text/css">
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/styles.css">
<!-- DATA -->
<script src="js/offices.js" type="text/javascript"></script>
<script src="js/people.js" type="text/javascript"></script>
<script src="js/incumbents.js" type="text/javascript"></script>
<script>
jQuery(document).ready(function($) {
$(".tile").each(function() {
var tile = Tile(this.id);
$(this).append(tile);
});
$(".dark").click(function() {
Hide();
});
$(".tile").click(function() {
Show(this.id);
});
});
function Show(role) {
var html = Overlay(role);
$(".overlay").html(html);
$(".overlay").show();
$(".dark").show();
$("body").addClass("noscroll");
}
function Hide() {
$(".overlay").hide();
$(".dark").hide();
$("body").removeClass("noscroll");
}
function Overlay(role) {
var persons = incumbents[role];
var office = offices[role];
var html = '<div id="' + role + '">\
<div class="box ' + role + '">\
<div class="color">\
<img class="x" src="img/icons/x.png" onclick="Hide();">\
<a href="img/photos/' + people[persons[0]].photo + '" target="_blank"><img class="photo" src="img/photos/' + people[persons[0]].photo + '"></a>\
<div class="persons-info">';
// Info for each person
for (i = 0; i < persons.length; i++) {
person = people[persons[i]]
html += '<div class="person-info">\
<div class="name">' + person.full_name + ((person.year) ? " '" + person.year[2] + person.year[3] : '') + '</div>'
+ ((person.room) ? '<div class="room">Room ' + person.room + '</div>' : '')
+ ((person.phone) ? '<div class="phone">' + person.phone + '</div>' : '')
+ ((person.email) ? '<div class="email"><a href="mailto:' + person.email + '">' + person.email + '</a></div>' : '')
+ ((person.facebook) ? '<a href="' + person.facebook + '" target="_blank"><img class="facebook-icon" src="img/icons/fcbk.jpg"></a>' : '') + '\
</div>';
}
html += '</div>\
<div class="role">' + office.full_title + '</div>\
<div class="description"><div class="scrollable">' + office.description + '</div></div>\
</div>\
</div>\
</div>';
return html;
}
function Tile(role) {
var persons = incumbents[role];
var office = offices[role];
var name = people[persons[0]].name;
// Add additional names
if (persons.length > 1) {
for (i = 1; i < persons.length; i++) {
person = people[persons[i]];
name += "/" + person.name;
}
}
var html = '<div class="person ' + role + '">\
<div class="color"></div>\
<img class="photo" src="img/photos/' + people[persons[0]].photo + '">\
<div class="name">' + name + '</div>\
<div class="role">' + office.title + '</div>\
</div>';
return html;
}
</script>
</head>
<body>
<div class="horz header">
<div class="content">
<img class="masthead" src="img/masthead.png">
</div>
</div>
<div class="horz middle">
<div class="content bg">
<!-- FIRST ROW -->
<div class="tile" id="housemaster"></div>
<div class="tile" id="associate_housemaster"></div>
<div class="blank"></div>
<div class="tile" id="president"></div>
<div class="tile" id="treasurer"></div>
<div class="tile" id="house_chair"></div>
<div class="tile" id="secretary"></div>
<div class="blank"></div>
<div class="tile" id="house_manager"></div>
<div class="blank"></div>
<!-- SECOND ROW -->
<div class="tile" id="rlad"></div>
<div class="blank"></div>
<div class="blank"></div>
<div class="tile" id="rooming_chair_1"></div>
<div class="tile" id="rooming_chair_2"></div>
<div class="tile" id="history_chair"></div>
<div class="tile" id="social_chair"></div>
<div class="tile" id="technology_chair"></div>
<div class="blank"></div>
<div class="tile" id="desk_captain"></div>
<!-- THIRD ROW -->
<div class="blank"></div>
<div class="blank"></div>
<div class="tile" id="athletics_chair"></div>
<div class="tile" id="frosh_1"></div>
<div class="tile" id="frosh_2"></div>
<div class="tile" id="publicity_chair"></div>
<div class="blank"></div>
<div class="blank"></div>
<div class="tile" id="facilities_chair"></div>
<div class="blank"></div>
<!-- FOURTH ROW -->
<div class="blank"></div>
<div class="blank"></div>
<div class="blank"></div>
<div class="blank"></div>
<div class="tile" id="ee_lab_chair"></div>
<div class="tile" id="workshop_chair"></div>
<div class="tile" id="library_chair"></div>
<div class="tile" id="entertainment_chair"></div>
<div class="tile" id="reservations_chair"></div>
<div class="tile" id="kitchen_chair"></div>
</div>
<div class="horz footer">
<div class="content">
<div class="feedback">
Something seem wrong? Send feedback to <a href="mailto:simmons-tech@mit.edu">simmons-tech@mit.edu</a>.
</div>
</div>
</div>
<!-- OVERLAY -->
<div class="overlay" style="display: none;"></div>
<div class="dark" style="display:none;"></div>
</body>
</html>