-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.html
244 lines (204 loc) · 9.26 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdn.rawgit.com/LinZap/jquery.waterfall/master/waterfall-light.js"></script>
<meta property="og:title" content="공개SW개발센터 해카톤 2016"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="https://kosslab-kr.github.io/kosshack2016/"/>
<meta property="og:description" content="오픈소스 나도 해 볼 수 있다! 2016 공개SW 해카톤! (2016 KOSS Hackathon) 공개SW 고급개발자인 멘토와 함께 1주일간 공개SW 프로젝트 기여활동에 직접 참여하는 경험을 해보는 행사입니다. 말로만 듣던 오픈소스! 이제 직접 참여해보세요! https://www.kosshackathon.kr/"/>
<meta property="og:image" content="kosslab.png"/>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/ax5ui/ax5ui-toast/master/dist/ax5toast.css"/>
<script type="text/javascript" src="https://cdn.rawgit.com/ax5ui/ax5core/master/dist/ax5core.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/ax5ui/ax5ui-toast/master/dist/ax5toast.min.js"></script>
<title>kosshack2016 LOG</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 10px 0;
}
.card{
border: 1px solid #f3f3f3;
border-radius: 5px;
padding: 5px;
}
.card:nth-child(odd){
background: #f3f3f3;
}
.card *{
word-break: break-all;
}
@media (min-width: 1200px) {
.container {
width: 100%;
}
}
</style>
</head>
<body>
<div class="container">
<div class="jumbotron">
<div class="row">
<div class="col-md-2">
<img src="kosslab.png">
</div>
<div class="col-md-10" style="padding-left: 20px;">
<h1>kosshack2016 Logs</h1>
<p>2016 공개SW 해카톤 실시간 진행상황</p>
<p>
<span style="font-size:0.8em" class="text-primary" id="updateTime">업데이트 시간</span>
</p>
</div>
</div>
</div>
<div id="result"></div>
<div style="margin-top: 50px;text-align: center;">
<button class="btn" onclick="location.href='https://github.com/kosslab-kr';">
https://github.com/kosslab-kr
</button>
<p class="text-success" style="text-align: center;margin-top: 10px;">ax5ui - <a href="http://ax5.io">http://ax5.io</a></p>
</div>
</div>
<script type="text/html" data-tmpl="list">
{{#events}}
<div class="card">
<div class="media" style="margin-bottom: 20px;">
<div class="media-left">
{{#actor}}
<img class="media-object" src="{{avatar_url}}" width="60" style="border-radius: 5px;"/>
{{/actor}}
</div>
<div class="media-body">
<span class="text-info">{{created_at}} <b>{{actor.display_login}}</b></span>
<p class="media-heading text-danger">
{{#@getType}}{{type}}{{/@getType}}
:
{{payload.ref}} {{repo.name}}
</p>
<p>
{{#payload}}
{{#commits}}
<a href="{{#@htmlURL}}{{url}}{{/@htmlURL}}" target="_blank">{{#@message}}{{{message}}}{{/@message}}</a>
{{/commits}}
{{#pull_request}}
<a href="{{#@htmlURL}}{{url}}{{/@htmlURL}}" target="_blank">{{{title}}}</a>
{{/pull_request}}
{{#issue}}
{{^comment}}
<a href="{{html_url}}" target="_blank">
{{{title}}}</a>
<div style="color: #888;">
{{{body}}}
</div>
{{/comment}}
{{#comment}}
<a href="{{html_url}}" target="_blank">{{{title}}}</a>
<div style="color: #888;">
{{#@body}}{{{body}}}{{/@body}}
</div>
{{/comment}}
{{/issue}}
{{/payload}}
</p>
</div>
</div>
</div>
{{#@isThird}}
<!--div style="clear:both;"></div-->
{{/@isThird}}
{{/events}}
</script>
<script language="javascript">
$(function () {
var myToast = new ax5.ui.toast({
theme: "danger",
containerPosition: "top-right"
});
var $updateTime = $("#updateTime");
var tmpl = $('[data-tmpl="list"]').html();
var $result = $("#result");
var getContent = function () {
$updateTime.html((new Date()).toString());
var list = [];
$.ajax({
url: "https://api.github.com/users/ax5ui/events",
crossDomain: true, type: 'GET', data: {},
success: function (res) {
if (res.message) {
myToast.push(res.message);
}
list = [].concat(res);
$.ajax({
url: "https://api.github.com/users/kosslab-kr/events",
crossDomain: true, type: 'GET', data: {},
success: function (res) {
list = list.concat(res);
if (res.message) {
myToast.push(res.message);
} else {
myToast.push("최신 데이터를 받아 목록을 갱신하였습니다.");
}
list.sort(function(a, b){
return a.created_at > b.created_at;
});
var data = {
events: list,
'@getType': function () {
this.type = this.type.replace("Event", "");
return this;
},
'@isThird': function () {
return ((this['@i'] + 1) % 3 == 0);
},
'@htmlURL': function () {
//console.log(this);
this.url = this.url.replace("https://api.", "https://").replace("repos/", "");
return this;
},
'@message': function () {
//console.log(this);
this.message = this.message.substring(0, 200);
return this;
},
'@body': function () {
//console.log(this);
this.body = this.body.substring(0, 300);
return this;
}
};
$result.html(ax5.mustache.render(tmpl, data));
$result.waterfall({
gap: 10,
gridWidth: [0, 400, 600, 800, 1200, 1400, 1900],
refresh: 500,
scrollbottom: {
ele: $('body'),
endtxt: 'No More~~',
gap: 300
}
});
}
});
},
error: function (jqXHR, textStatus, errorThrown) {
myToast.push("API응답오류 발생. gitHub에 너무 많은 요청을 하여 API가 작동하지 않습니다. 잠시후 다시 시도해 보세요. ");
}
});
};
getContent();
setInterval(function () {
getContent();
}, 1000 * 60 * 3);
});
</script>
</body>
</html>