This repository was archived by the owner on May 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
136 lines (112 loc) · 3.08 KB
/
index.html
File metadata and controls
136 lines (112 loc) · 3.08 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
<html>
<head>
<title>Le Serf</title>
<style type="text/css">
/* Fix up the messenger box to look nicer. */
.messenger-message {
width: 50%;
margin: 0 auto;
text-align: center;
}
/* Styles for the loading screen */
#loading-container {
width: 100%;
height: 100%;
position: absolute;
background-color: #2d2d2d;
z-index: 1000;
}
#loading-header {
/* These are the default fonts from Bootstrap. */
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 70px;
font-weight: bold;
color: #202020;
letter-spacing: .1em;
text-shadow:
-1px -1px 1px #111,
2px 2px 1px #363636;
text-align: center;
position: relative;
top: 50%;
transform: translateY(-50%);
}
</style>
<script>
// Le Serf checks for this variable to determine if it's running in web or CLI.
window.LE_SERF_WEB = true
</script>
</head>
<body>
<div id="loading-container">
<div id="loading-header">
LOADING
</div>
</div>
<!-- This is the main container of the app. React puts all its stuff in here. -->
<div id="main"></div>
<script type="text/javascript" id="loader">
var HEAD = document.getElementsByTagName('head')[0]
var ORIGIN = window.location.origin
function loadCSS (url, cb) {
var link = document.createElement('link')
link.rel = 'stylesheet'
link.type = 'text/css'
link.href = ORIGIN + url
link.onload = function () {
cb()
}
HEAD.appendChild(link)
}
function loadJS (url, cb) {
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = ORIGIN + url
script.onload = function () {
cb()
}
HEAD.appendChild(script)
}
function loadFile(url, cb) {
var pieces = url.split('.')
var extension = pieces[pieces.length - 1]
if (extension === 'css') {
loadCSS(url, cb)
} else if (extension === 'js') {
loadJS(url, cb)
} else {
console.error('Unrecognised type of file ' + url)
cb()
}
}
function loadFiles (files, cb) {
function load () {
var url = files.shift()
if (url) {
loadFile(url, load)
} else {
// We've made it to the end of the array
cb()
}
}
load()
}
loadFiles([
'/bower_components/css-spinners/css/spinner/pong.css',
'/bower_components/bootstrap/dist/css/bootstrap.min.css',
'/bower_components/jquery/dist/jquery.min.js',
'/bower_components/bootstrap/dist/js/bootstrap.min.js',
'/bower_components/messenger/build/js/messenger.min.js',
'/bower_components/messenger/build/css/messenger.css',
'/bower_components/messenger/build/css/messenger-theme-block.css',
'/build/bundle.js'
], function () {
// Load everything up
window.LeSerfLoad()
setTimeout(function () {
$('#loading-container').fadeOut(500)
}, 2000)
})
</script>
</body>
</html>