-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
executable file
·142 lines (132 loc) · 3.44 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
<!DOCTYPE html>
<html>
<head>
<title>nw-meteor</title>
<style>
body {
background: rgb(238, 238, 238);
background-repeat: no-repeat;
background-attachment: fixed;
overflow: hidden;
}
.circle {
position: absolute;
width: 20px;
height: 20px;
left: 0;
right: 0;
top: 0;
bottom: 0px;
margin: auto;
border: 4px solid rgb(191, 191, 191);
border-radius: 50%;
}
#vertical {
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-animation: spin 3s linear infinite,pulse 1s linear infinite alternate;
animation: spin 3s linear infinite,pulse 1s linear infinite alternate;
}
.circle:not(#vertical) {
-webkit-animation: spin2 3s linear infinite,pulse 1s linear infinite alternate;
animation: spin2 3s linear infinite,pulse 1s linear infinite alternate;
}
@-webkit-keyframes spin {
100% {
-webkit-transform: rotate(450deg);
transform: rotate(450deg);
}
}
@-webkit-keyframes spin2 {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
100% {
-webkit-transform: rotate(450deg);
transform: rotate(450deg);
}
}
@keyframes spin2 {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes pulse {
0% {
width: 5px;
height: 75px;
}
100% {
width: 40px;
height: 5px;
}
0% {
width: 5px;
height: 75px;
}
}
@keyframes pulse {
0% {
width: 5px;
height: 75px;
}
100% {
width: 40px;
height: 5px;
}
0% {
width: 5px;
height: 75px;
}
}
.disclaimer {
position: absolute;
bottom: 10%;
padding-bottom: 20px;
width: 100%;
text-align: center;
color: rgb(191, 191, 191);
}
</style>
<script src="menu.js"></script>
<script>
var exec = require('child_process').exec;
var gui = require('nw.gui');
var Window = gui.Window.get();
Window.show();
createMenu();
// Start the meteor application
if (process.env.ENV !== 'development') {
function onStartMeteor (error, stdout, stderr) {
if (stderr) throw new Error(stderr);
};
if (process.env.SETTINGS) {
exec("cd ./meteor-project && ../meteor/meteor run --settings " + process.env.SETTINGS, onStartMeteor);
} else {
exec("cd ./meteor-project && ../meteor/meteor run", onStartMeteor);
}
}
Window.on('close', function () {
exec("kill `ps ax | grep '[m]eteor' | awk '{print $1}'`");
});
// Point window to meteor server
function bodyOnLoad(){
window.setTimeout(function () {
window.location.assign('http://localhost:3000/');
}, 1000);
};
</script>
</head>
<body onload="bodyOnLoad()">
<div class='circle'></div>
<div class='circle' id='vertical'></div>
<div class="disclaimer">
<p>Starting meteor...</p>
<p>This could take up to 30 seconds on first load.</p>
</div>
</body>
</html>