2013-04-18 07:09:53 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2013-05-30 07:40:44 +00:00
|
|
|
<title>Atom Shell</title>
|
2014-05-05 08:02:52 +00:00
|
|
|
<style>
|
2014-05-05 08:48:58 +00:00
|
|
|
html {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2014-05-05 08:02:52 +00:00
|
|
|
body {
|
|
|
|
color: #555;
|
|
|
|
font-family: 'Open Sans',Helvetica,Arial,sans-serif;
|
|
|
|
padding: 30px;
|
|
|
|
}
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
color: #2b6cc2;
|
|
|
|
font-family: "Crimson Text",Georgia,serif;
|
|
|
|
font-weight: 400;
|
|
|
|
line-height: 1.1;
|
|
|
|
letter-spacing: -0.015em;
|
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
color: #2b6cc2;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
a:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
|
|
|
|
pre, code {
|
|
|
|
font-family: "Menlo","Lucida Console",monospace;
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
pre {
|
|
|
|
white-space: pre-wrap;
|
|
|
|
font-size: 13px;
|
|
|
|
line-height: 19px;
|
|
|
|
overflow: auto;
|
|
|
|
padding: 6px 10px;
|
|
|
|
}
|
2014-05-05 08:30:37 +00:00
|
|
|
|
|
|
|
#holder {
|
|
|
|
border: 4px dashed #ccc;
|
|
|
|
margin: 0 auto;
|
|
|
|
height: 300px;
|
|
|
|
color: #ccc;
|
|
|
|
font-size: 40px;
|
|
|
|
line-height: 300px;
|
|
|
|
text-align: center;
|
2014-05-05 08:46:25 +00:00
|
|
|
-webkit-user-select: none;
|
2014-05-05 08:30:37 +00:00
|
|
|
}
|
|
|
|
#holder.hover {
|
|
|
|
border: 4px dashed #999;
|
|
|
|
color: #eee;
|
|
|
|
}
|
2014-05-05 08:02:52 +00:00
|
|
|
</style>
|
2013-04-18 07:09:53 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2014-05-05 07:45:50 +00:00
|
|
|
<script>
|
|
|
|
var execPath = require('remote').process.execPath;
|
|
|
|
var command = execPath + ' path-to-your-app';
|
2013-05-14 13:39:00 +00:00
|
|
|
|
2014-05-05 08:46:25 +00:00
|
|
|
document.onclick = function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
if (e.target.tagName == 'A')
|
|
|
|
require('shell').openExternal(e.target.href);
|
|
|
|
return false;
|
|
|
|
};
|
2014-05-05 08:30:37 +00:00
|
|
|
document.ondragover = document.ondrop = function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
return false;
|
2014-05-05 08:46:25 +00:00
|
|
|
};
|
2013-05-14 13:39:00 +00:00
|
|
|
</script>
|
2014-05-05 07:45:50 +00:00
|
|
|
|
2014-05-05 08:02:52 +00:00
|
|
|
<h2>Welcome to Atom Shell</h2>
|
2014-05-05 07:45:50 +00:00
|
|
|
|
|
|
|
<p>
|
|
|
|
To run your app with atom-shell, execute the following command under your
|
|
|
|
Console (or Terminal):
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<script>document.write('<pre>' + command + '</pre>')</script>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The <code>path-to-your-app</code> should be the path to your own atom-shell
|
2014-05-05 08:46:25 +00:00
|
|
|
app, you can read the <a href='https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md'>quick start</a>
|
|
|
|
guide in atom-shell's <a href='https://github.com/atom/atom-shell/blob/master/docs'>docs</a>
|
|
|
|
on how to write one.
|
2014-05-05 07:45:50 +00:00
|
|
|
</p>
|
2014-05-05 08:30:37 +00:00
|
|
|
|
|
|
|
<p>
|
|
|
|
Or you can just drag your app here to run it:
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div id="holder">
|
|
|
|
Drag your app here to run it
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var holder = document.getElementById('holder');
|
|
|
|
holder.ondragover = function () {
|
|
|
|
this.className = 'hover';
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
holder.ondragleave = holder.ondragend = function () {
|
|
|
|
this.className = '';
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
holder.ondrop = function (e) {
|
|
|
|
this.className = '';
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
var file = e.dataTransfer.files[0];
|
|
|
|
require('child_process').execFile(execPath, [file.path], {
|
|
|
|
detached: true, stdio: 'ignore'
|
|
|
|
}).unref();
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
</script>
|
2013-04-18 07:09:53 +00:00
|
|
|
</body>
|
|
|
|
</html>
|