-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
196 lines (161 loc) · 5.44 KB
/
index.html
File metadata and controls
196 lines (161 loc) · 5.44 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css">
<link rel="stylesheet" type="text/css" href="gfx/family=Lato:400,700,400italic,700italic.css">
<script src="gfx/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="semantic/dist/semantic.min.js"></script>
<style type="text/css">
body {
background-image: url(./gfx/basel[devs]background.jpg);
background-repeat: no-repeat;
background-attachment: scroll;
background-position: center center;
background-size: cover;
}
body > .grid {
height: 100%;
}
#basel_logo {
background-image: url(gfx/logo.png);
background-repeat: no-repeat;
background-attachment: scroll;
background-position: center center;
background-size: contain;
width: 14em;
height: 14em;
}
#cmd_launcher {
font-size: 4em;
}
@media screen and (max-width: 1280px) {
#cmd_launcher {
font-size: 1.5em;
}
}
#cmd_result {
font-size: 0.9em;
text-align:left;
}
/* Disabling scrollbar */
.hide-scroll {
height: 95vh;
overflow: hidden;
}
.viewport {
overflow-x:none;
overflow-y:auto;
/* Make sure the inner div is not larger than the container
* so that we have room to scroll.
*/
max-height: 100%;
/* Pick an arbitrary margin/padding that should be bigger
* than the max width of all the scroll bars across
* the devices you are targeting.
* padding = -margin
*/
margin-right: -100px;
padding-right: 100px;
}
</style>
<script type="text/javascript">
$( document ).ready(function() {
/* Command Launcher */
var running = false;
var launch = function(event) {
if (event != null) {
event.preventDefault();
}
if (running)
return;
running = true;
var cmd_to_launch = $("#cmd")[0].value;
window.location.hash = "#" + escape(cmd_to_launch)
var loading = true;
var fade_logo = function() {
if (loading) {
$( "#basel_logo" ).fadeToggle({
duration: 1300,
complete: fade_logo
});
} else {
$( "#basel_logo" ).fadeIn();
}
};
fade_logo();
$.ajax({
type: "GET",
url: "https://test.lecbna.org/command",
data: { cmd : cmd_to_launch},
complete: function(xhr) {
running = false;
loading = false;
var result = "";
if (xhr.status == 200) {
eval(xhr.responseText);
result = Module.run_user_cmd();
} else {
result = "<pre>" + xhr.responseText + "</pre>";
}
$('#cmd_result').html(result);
$('#cmd_result_container').dimmer('show');
$('#cmd_result_container').click(function(event) {
$('#cmd_result_container').dimmer('hide');
});
}
});
};
$( '#cmd_launcher' ).submit(launch);
$( '#basel_logo' ).click(launch);
// All loaded follow tag
var follow_hashtag = function() {
var cmd_to_launch = unescape(window.location.hash.substr(1,window.location.hash.length));
if (cmd_to_launch != "") {
$("#cmd")[0].value = cmd_to_launch;
launch();
}
};
window.onhashchange = follow_hashtag;
follow_hashtag();
});
</script>
<link rel="stylesheet" href="gfx/tomorrow-night-eighties.css">
<script src="gfx/highlight.pack.js"></script>
</head>
<body>
<div class="ui grid middle aligned center aligned">
<div class="row">
<div class="two wide column">
<div id="basel_logo"></div>
</div>
<div class="twelve wide column">
<form class="ui form fluid" id="cmd_launcher" autocomplete="off">
<div class="ui massive left icon input fluid " style="color:#ffffff;">
<input value="basel[devs].help()" type="text" style="color:#ffffff; background-color: transparent; border-color:transparent;" id="cmd">
<i class="terminal icon"></i>
</div>
</form>
</div>
</div>
</div>
<div class="ui page dimmer" id="cmd_result_container">
<div class="content">
<div class="ui grid middle aligned center aligned">
<div class="twelve wide column center" >
<div class="hide-scroll">
<div class="viewport" id="cmd_result"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Some JSONP requests to contact meetup without authentication --!>
<script> function the_members(members) { all_members = JSON.stringify(members); } </script>
<script src="https://api.meetup.com/basel-devs/members?photo-host=public&page=50&sig_id=91772662&sig=a595ad4e1e2646ee3d74d316bdda3d98015dc671&callback=the_members"></script>
<script> function the_events(events) { all_events = JSON.stringify(events); } </script>
<script src="https://api.meetup.com/basel-devs/events?photo-host=secure&page=20&sig_id=91772662&sig=68524aa6e592601e243db53b7b6b7930e693bd7b&callback=the_events"></script>
</body>
</html>