/
index.php
executable file
·506 lines (470 loc) · 17.4 KB
/
index.php
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<?php $homepage = "";
require_once("template/$OJ_TEMPLATE/profile.php");
?>
<!DOCTYPE html>
<?php
$homepage="";
?>
<html>
<head>
<!-- Standard Meta -->
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=1200">
<?php include("template/semantic-ui/css.php"); ?>
<script>
var homepage = true;
var finished = false;
</script>
<!-- Site Properties -->
<title><?= $OJ_NAME ?> -- HomePage</title>
<?php include("template/semantic-ui/js.php"); ?>
<script src="template/semantic-ui/js/countdown.js"></script>
<style>
a{
cursor: pointer;
}
.white{
color:white;
}
.unvisible{
display: none;
}
.masthead>h3.ui.header {
margin-top: 50%;
margin-bottom: 0em;
font-weight: normal;
}
.ml14 {
font-weight: 200;
font-size: 3.2em;
}
.ml14 .text-wrapper {
position: relative;
display: inline-block;
padding-top: 0.1em;
padding-right: 0.05em;
padding-bottom: 0.15em;
}
.ml14 .line {
opacity: 0;
position: absolute;
left: 0;
height: 2px;
width: 100%;
background-color: #fff;
transform-origin: 100% 100%;
bottom: 0;
}
#myVideo {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
height: 100%;
width:100%;
background: white;
margin:auto;
min-height: 100%;
-ms-transition:
opacity 1s cubic-bezier(0.680, -0.550, 0.265, 1.4) 0s
;
-moz-transition:
opacity 1s cubic-bezier(0.680, -0.550, 0.265, 1.4) 0s
;
-webkit-transition:
opacity 1s cubic-bezier(0.680, -0.550, 0.265, 1.4) 0s
;
transition:
opacity 1.5s cubic-bezier(0.680, -0.550, 0.265, 1.4) 0s
;
}
.ml14 .letter {
display: inline-block;
line-height: 1em;
}
</style>
</head>
<body>
<!-- Following Menu -->
<?php include("template/semantic-ui/nav.php"); ?>
<!-- Sidebar Menu -->
<!-- Page Contents -->
<div>
<div class="ui inverted vertical masthead center aligned segment gr5" id="background">
<video autoplay muted id="myVideo" style="display:none">
<source src="/video/icpc.mp4" type="video/mp4">
</video>
<div class="unvisible" id="main_container">
<div class="ui container">
<div class="ui large secondary inverted pointing menu">
</div>
</div>
<div class="ui grid" id="main_masthead" style="transform: translateX(25%)">
<div id="left" class="ui text container transition main title eight wide column">
<h1 class="ui inverted header ml14">
<span class="text-wrapper">
<span class="letters" data-content="CUP Online Judge"></span>
</span>
</h1>
<div class="column buttonset">
<a href="icpc.php" target="_blank" class="ui inverted large button download basic">
<i class="newspaper outline icon"></i>
关于ICPC
</a>
<a href="fame.php" target="_blank" class="ui inverted large button download basic">
<i class="chess queen icon"></i>
Hall of Fame
</a>
</div>
<br>
<div class="column">
<a class="ui white basic label maintain" target="_blank" href='update_log.php'></a><!-- Place this tag where you want the button to render. -->
<a class="github_button" href="https://travis-ci.com/CUP-ACM-Programming-Club/CUP-Online-Judge-Express" target="_blank"><img src="https://travis-ci.com/CUP-ACM-Programming-Club/CUP-Online-Judge-Express.svg?branch=master" style="vertical-align: middle;"></a>
<a class="github_button" href="https://codebeat.co/projects/github-com-cup-acm-programming-club-cup-online-judge-express-master-7e8760db-7670-4c22-9862-1262dddcb4ec"><img alt="codebeat badge" style="vertical-align: middle;" src="https://codebeat.co/badges/bf69c0eb-2bdf-4fbe-a6f0-2bf2a98a597a" /></a>
<a class="github_button" href="https://codecov.io/gh/CUP-ACM-Programming-Club/CUP-Online-Judge-Express">
<img style="vertical-align: middle;" src="https://codecov.io/gh/CUP-ACM-Programming-Club/CUP-Online-Judge-Express/branch/master/graph/badge.svg" />
</a>
</div>
<br><a href="https://www.cubecloud.net/aff.php?aff=1461" style="opacity: 0" target="_blank" class="ui inverted large button download basic vultr">
Hosted by CubeCloud
</a>
<!--<a class="vultr" href="https://www.vultr.com/?ref=7250019" target="_blank"><img src="./image/vultr.png" class="ui small image main title" style="display:inline-block"></a>-->
<!--<h4></h4>-->
<!--<a class="ui huge inverted download button" href="cprogrammingcontest.php">查看复赛情况</a>-->
</div>
<div id="right" class="ui text container transition main title eight wide column" style="opacity: 0">
<div class="ui grid">
<div class="two wide column"></div>
<div class="twelve wide column">
<div class="ui warning message" style="margin-top:15em">
<!--<i class="close icon"></i>-->
<div class="header">提示</div>
<p style="font-size:1em">系统将于2019年3月21日12:00-18:00期间停止一般用户的访问提交。</p>
<!--
<ul class="list">
<li>考试/测验请访问http://acm.cup.edu.cn</li>
<li>普通用户/IPv6用户请访问https://www.cupacm.com</li>
<li>外网用户请访问https://oj.cupacm.com</li>
</ul>
-->
</div>
<div class="row">
</div>
</div>
<div class="two wide column">
</div>
</div>
</div>
</div>
<div class="ui vertical divider inverted" id="divider" style="opacity: 0">
</div>
<br>
<!--
<div class="ui text shape">
<div class="sides">
<div class="ui header side text inverted active typed-element"></div>
</div>
</div>
<br><br>-->
</div>
<!--<div class="ui huge primary button" onclick="location.href='<?php /* if (isset($_SESSION['user_id'])) echo "problemset.php"; else echo "newloginpage.php"; ?>'"><?php if (!isset($_SESSION['user_id'])) echo "Login"; else echo "Get Started";*/ ?><i class="right arrow icon"></i></div>-->
</div>
</div>
<div class="ui vertical stripe segment">
<div class="ui middle aligned stackable grid container">
<div class="row">
<div class="eight wide column">
<h3 class="ui header">推荐使用<a href="https://www.jetbrains.com" target="_blank">JetBrains系列IDE套件</a>完成编程
</h3>
<p>ICPC World Final 指定IDE:<b>CLion,PyCharm,Intellij IDEA</b><br><br>基于CMake与GNU Compile
Collection的CLion,业界推荐的Intellij Idea,简单容易上手的PyCharm,这些跨平台IDE将会减少许多做题过程中不必要的麻烦,更加集中精力打出AK</p>
<h3 class="ui header">推荐使用高效的<a class="chrome" target="_blank"
href="software/63.0.3239.84_chrome_installer.exe">Chrome浏览器</a>使用评测系统
</h3>
<p>一个优秀的浏览器可以更加完美高效的绘制页面,提升使用的舒适度。基于V8引擎的Chrome浏览器能够让每一个题目的启动和提交都能行云流水。</p>
</div>
<div class="six wide right floated column">
<img src="/template/semantic-ui/picture/jetbrains.png"
class="ui large borderless rounded image">
</div>
</div>
</div>
</div>
<!--
<div class="ui vertical stripe quote segment">
<div class="ui equal width stackable internally celled grid">
<div class="center aligned row">
<div class="column">
<h3>"What a Company"</h3>
<p>That is what they all say about us</p>
</div>
<div class="column">
<h3>"I shouldn't have gone with their competitor."</h3>
<p>
<img src="assets/images/avatar/nan.jpg" class="ui avatar image"> <b>Nan</b> Chief Fun Officer Acme Toys
</p>
</div>
</div>
</div>
</div>-->
<div class="ui vertical stripe segment">
<div class="ui text container">
<h3 class="ui header">ICPC</h3>
<p>
国际大学生程序设计竞赛(英语:International Collegiate Programming Contest, ICPC)是一项旨在展示大学生创新能力、团队精神和在压力下编写程序、分析和解决问题能力的年度竞赛。经过40多年的发展,国际大学生程序设计竞赛已经发展成为最具影响力的大学生计算机竞赛。赛事之前仅由IBM公司赞助,2017年新增JetBrains公司赞助, 2018年起,美国计算机协会(ACM)不再赞助ICPC。(Wikipedia)</p>
<a class="ui large button" href="icpc.php" target="_blank">More Information</a>
<h4 class="ui horizontal header divider">
<a href="#">Developer</a>
</h4>
<h3 class="ui header">平台开发</h3>
<h4>由 <a class="club" href="https://github.com/CUP-ACM-Programming-Club" target="_blank">ACM程序设计俱乐部</a> <span class="maintainer">维护开发</span> <a class="support">点此支持</a><div class='ui flowing popup hidden'><div class='ui image' style="width:220px"><img src='/img/wechat.png'></div><div class="ui image" style="width:220px"><img src="/img/alipay_2.jpg"></div><div class="ui image" style="width:220px"><img src="/img/alipay.jpg"></div></div></h4>
<h4 class="ui content">技术栈:Linux + C/C++ + MySQL + PHP + Node.js + ExpressJS + Apache</h4>
<h4 class="ui content">由Vue.js强力驱动</h4>
<a class="ui large button" href="https://github.com/CUP-ACM-Programming-Club" target="_blank"><i class="github icon"></i>GitHub</a>
</div>
</div>
<?php include("template/semantic-ui/bottom.php"); ?>
</div>
</body>
<script>
function getRandomIntInclusive(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive
}
$(document).ready(function () {
/*
window.picid = 'bg' + getRandomIntInclusive(14, 18);
$("#background")
.addClass(window.picid)
// .addClass(picid)
.removeClass('zoomed')
;
/*
$(".masthead.segment").ready(
function () {
$(".pointing.menu").transition({
animation:'fade up',
duration:'1s',
});
$(".text.container").transition({
animation:'fade up',
duration:'1s'
});
}
);
*/
// setInterval(function(){
//$('.shape').shape('vertical flip right');
// },5000);
$('.image').visibility({
type: 'image',
transition: 'vertical flip in',
duration: 500
});
/*
window.backpic = setInterval(function () {
$("#background").addClass('zoomed');
setTimeout(function () {
$("#background")
.removeClass(window.picid)
.addClass((window.picid = 'bg' + getRandomIntInclusive(14, 18)))
.removeClass('zoomed')
;
}, 1900);
}
, 15000)*/
});
$('.club').attr("data-title", "点击访问GitHub")
.popup({
position: 'top center',
on: 'hover'
})
;
$('.maintainer').attr("data-html","<div class='header'>Ryan Lee</div><div class='content'>Maintainer & Developer</div>")
.popup({
position:'top center',
on:'hover'
});
$.get("/api/update_log/latest", function(d){
var data = d.data[0];
var version = data.version;
var vj_version = data.vj_version;
var content = data.msg;
var time = dayjs(data.mtime).format("YYYY-MM-DD");
$('.maintain').html("Version:" + time).attr("data-html", "<div class='ui header'>"+"升级维护内容"+"<div class='sub header'>引擎版本:"+ version +"</div><div class='sub header'>VJ版本:" + vj_version +"</div></div><div class='content'>" + content + "</div>")
.popup({
position: 'top center',
on: 'hover'
})
});
$('.support')
.popup({
position:'bottom center',
inline:true,
on:'hover',
hoverable:true
});
$('.chrome').popup({
title:"点击下载" ,
position:'top center',
on:'hover'
});
$(".generator").on("click",function(){
$(".packer").transition("fade down");
$(".vultr").transition("fade up");
});
$('.ml14 .letters').each(function(){
$(this).html($(this).attr("data-content").replace(/([^\x00-\x80]|\w)/g, "<span class='letter'>$&</span>"));
});
//document.getElementById('myVideo').addEventListener('ended',false);
(function(){
finished = true;
window.picid = 5;
$(".ui.borderless.network.secondary.menu").addClass("inverted");
document.getElementById('myVideo').style.opacity = "0.4";
$.get("../api/login/",function(data){
var logined = data.logined;
if(false && !logined) {
window.backpic = setInterval(function(){
var index = getRandomIntInclusive(1,5);
// while(index === window.picid) {
// index = getRandomIntInclusive(1,5);
// }
if(index > 0) {
$("#myVideo").css({
opacity:"0"
});
$("#background").addClass('zoomed');
if(window.picid > 0) {
setTimeout(function(){
$("#background")
.removeClass("gr" + window.picid)
.addClass("gr"+(window.picid = index))
.removeClass("zoomed");
},4000)
}
else {
setTimeout(function(){
$("#background")
.removeClass("gr" + window.picid)
.addClass("gr"+(window.picid = index))
.removeClass("zoomed");
},4000)
}
}
else {
$("#background")
.addClass("zoomed")
setTimeout(function(){
$("#background")
.removeClass("gr" + window.picid)
$("#myVideo").css({
opacity:"0.4",
display:"inline-block"
});
},4000);
window.picid = index;
}
},15000);
}
setTimeout(function(){
$("#main_container").removeClass("unvisible");
var main_timeline = anime.timeline({loop: false})
.add({
targets: '.ml14 .line',
scaleX: [0,1],
opacity: [0.5,1],
easing: "easeInOutExpo",
duration: 900
}).add({
targets: '.ml14 .letter',
opacity: [0,1],
translateX: [40,0],
translateZ: 0,
scaleX: [0.3, 1],
textShadow:"3px 3px 3px #555555",
easing: "easeOutExpo",
duration: 800,
offset: '-=600',
delay: function(el, i) {
return 0 + 25 * i;
}
}).add({
targets: '.maintain',
opacity:[0,1],
easing: [.91,-0.54,.29,1.56],
duration:500,
offset: '-=600'
}).add({
targets: '.buttonset',
opacity:[0,1],
easing: [.91,-0.54,.29,1.56],
duration:500,
offset: '-=600'
}).
add({
targets: '.vultr',
opacity:[0,1],
easing: "easeOutExpo",
duration: 500,
offset: '-=300'
}).
add({
targets: '.github_button',
opacity:[0,1],
translateY:17,
paddingLeft:10,
scale:1.25,
duration: 500,
offset: '-=600',
});
if(logined && false) {
main_timeline.
add({
targets: '#main_masthead',
translateX:["25%", 0],
easing: 'easeInOutQuart',
duration: 1000,
offset: '-=300',
complete: function(){
}
}).
add({
targets: "#right",
opacity:[0,1],
easing: 'easeInOutQuart',
duration: 1000,
offset: '-=300'
}).
add({
targets: "#divider",
opacity:[0,1],
easing: 'easeInOutQuart',
duration:500,
offset: '-=300',
complete: function() {
var $style = $("style");
var $html = $style.eq($style.length - 1).html();
$html += "\n.gr5::after{\nopacity:0.5;\n}\n";
$style.eq($style.length - 1).html($html);
}
});
}
},0);
})
})();
/*.
add({
targets: '.main.title',
translateX:[0,-200],
duration:500,
easing: "easeOutExpo"
})*/;
</script>
<!--
<script src="template/semantic-ui/js/typed.min.js"></script>
<script src="template/semantic-ui/js/typed.js?v=1.0"></script>
-->
</html>