-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgallery.html
290 lines (258 loc) · 8.79 KB
/
gallery.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="apple-touch-icon" sizes="76x76" href="./assets/img/logo.svg">
<link rel="icon" type="image/png" href="./assets/img/logo.svg">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>I2ML-南京航空航天大学I2ML实验室</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport' />
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700|Source+Sans+Pro:400,600,700"
rel="stylesheet">
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<!-- Main CSS -->
<link href="./assets/css/main.css" rel="stylesheet" />
<link href="./assets/css/custom.css" rel="stylesheet" />
<!-- View Counter -->
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<style>
.lds-ellipsis {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-ellipsis div {
position: absolute;
top: 33px;
width: 13px;
height: 13px;
border-radius: 50%;
background: #347dff;
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
left: 8px;
animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
left: 8px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
left: 32px;
animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
left: 56px;
animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes lds-ellipsis3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes lds-ellipsis2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}
</style>
</head>
<body>
<!--------------------------------------
NAVBAR
--------------------------------------->
<nav class="topnav navbar navbar-expand-sm navbar-light bg-white fixed-top">
<div class="container">
<a class="navbar-brand" href="./index.html"><strong>I2ML</strong></a>
<button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarColor02"
aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbarColor02">
<ul class="navbar-nav mr-auto d-flex align-items-center">
<li class="nav-item">
<a class="nav-link" href="./members.html">Members</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./news.html">News</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./publications.html">Publications</a>
</li>
<li class="nav-item">
<a class="nav-link border-bottom border-primary" href="./gallery.html">Gallery</a>
</li>
</ul>
<ul class="navbar-nav ml-auto d-flex align-items-center">
<li class="nav-item highlight d-none d-md-block">
<div
style="background-image: url(./assets/img/NUAA.png); height: 36px; width:200px; background-position: right; background-size: contain; background-repeat: no-repeat;">
</div>
</li>
</ul>
</div>
</div>
</nav>
<!-- End Navbar -->
<!--------------------------------------
HEADER
--------------------------------------->
<!--------------------------------------
MAIN
--------------------------------------->
<div class="container">
<div style="min-height: 700px;">
<div class="row" id="waterfall_wrapper"></div>
<div class="text-center" id="waterfall_spinner">
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
</div>
</div>
</div>
<!--------------------------------------
FOOTER
--------------------------------------->
<div class="container pt-4 pb-4">
<div class="row">
<div class="col-sm-12 col-md-4 col-xl-3 text-sm-center">
<div class="card border-0 box-shadow">
<div
style="background-image: url(./assets/img/wechat.png); height: 100px; background-position: center; background-size: contain; background-repeat: no-repeat;">
</div>
</div>
</div>
<div class="col-sm-12 col-md-8 col-xl-9 text-md-left text-center">
<p class="mb-0"><small class="text-muted">Related Links:</small></p>
<p class="mb-0">
<a class="mr-2" href="https://github.com/I2-Multimedia-Lab" target="_blank"><small
class="text-muted">Our github: I2-Multimedia-Lab</small></a>
</p>
<p class="mb-0">
<a class="mr-2" href="http://nuaa.edu.cn" target="_blank"><small class="text-muted">Nanjing
University of Aeronautics and Astronautics</small></a>
</p>
<p class="mb-0">
<a class="mr-2" href="http://cs.nuaa.edu.cn" target="_blank"><small class="text-muted">College of
Computer Science and Technology/College of Artificial Intelligence</small></a>
</p>
</div>
</div>
</div>
<div class="container">
<footer class="bg-white border-top pt-3 pb-3 text-muted small">
<div class="row align-items-center justify-content-between">
<div class="col-12 col-lg-6 text-center text-lg-left">
Copyright ©
<script>document.write(new Date().getFullYear())</script>.
南京航空航天大学. All rights reserved.
</div>
<div class="col-12 col-lg-6 text-center text-lg-right">
Total Page Views: <b><span id="busuanzi_value_site_pv"></span></b>
<span class="mr-2"> </span>
Unique Visitors: <b><span id="busuanzi_value_site_uv"></span></b>
</div>
</div>
</footer>
</div>
<!-- End Footer -->
<!--------------------------------------
JAVASCRIPTS
--------------------------------------->
<script src="./assets/js/vendor/jquery.min.js" type="text/javascript"></script>
<script src="./assets/js/vendor/popper.min.js" type="text/javascript"></script>
<script src="./assets/js/vendor/bootstrap.min.js" type="text/javascript"></script>
<script src="./assets/js/function.js" type="text/javascript"></script>
<!--------------------------------------
Js写入 -- Members
--------------------------------------->
<script src="./contents/config.js" type="text/javascript"></script>
<script src="./contents/gallery.js" type="text/javascript"></script>
<script>
// 对于电脑和手机,使用两种不同的加载策略
vw = $(window).width()
mobile_mode = (vw < 960)
if(mobile_mode){
$('#waterfall_wrapper').html('<div class="col-6 waterfall"></div>\
<div class="col-6 waterfall"></div>')
}else{
// 如果是电脑,则四列加载
$('#waterfall_wrapper').html('<div class="col-3 waterfall"></div>\
<div class="col-3 waterfall"></div>\
<div class="col-3 waterfall"></div>\
<div class="col-3 waterfall"></div>')
}
function getHeightOfChilden(jqobj){
height = 0
jqobj.find('.frame').each(function(){
height += $(this).height()
})
return height
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function loadPhotos(){
$('#waterfall_spinner').show()
total_photo_len = gallery.length
for(i=0;i<total_photo_len;i++){
item = gallery.shift()
thumbnail = ''
badge_html = ''
if('thumbnail' in item){
thumbnail = item.thumbnail
}else{
thumbnail = item.photo
}
for(label in item.labels){
badge_html += '<span class="badge badge-pill bg-light mr-1" style="white-space: break-spaces;">'+item.labels[label]+'</span>'
}
frame = $('<div class="frame mb-3">\
<div class="photo_wrapper">\
<img class="photo" src="'+thumbnail+'" onclick="jumpToImage(this)" link="'+item.photo+'"/>\
</div>\
<div class="labels">'+badge_html+'</div>\
</div>')
target_waterfall = {}
min_height = 999999999
$("#waterfall_wrapper .waterfall").each(function(){
height = getHeightOfChilden($(this))
console.log(height)
if(height < min_height){
target_waterfall = $(this)
min_height = height
}
})
// frame.hide()
target_waterfall.append(frame)
// frame.fadeIn(10)
await sleep(10);
}
$('#waterfall_spinner').hide()
}
loadPhotos()
// 点击时跳转
function jumpToImage(imgObj){
window.open($(imgObj).attr('link'))
}
</script>
</body>
</html>