forked from visnup/Minimal-Status-Bar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.coffee
41 lines (38 loc) · 1.48 KB
/
test.coffee
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
spawn = require('child_process').spawn
http = require 'http'
http.createServer (req, res) ->
res.writeHead 200, 'Content-Type': 'text/html'
res.end '''
<style>
.bottom a {
position: absolute;
bottom: 5px;
outline: 1px dotted;
}
[href=left] { left: 10px; }
[href^=center] { left: 50%; text-align: center; margin-left: -64px; }
[href=right] { right: 10px; text-align: right; }
</style>
<ul>
<li><a href="/relative">a relative link</a></li>
<li><a href="http://google.com">google.com</a></li>
<li><a href="http://is.gd/w">shortened link</a></li>
<li><a href="mailto:[email protected]">mailto link</a></li>
<li><a href="mailto:[email protected]?subject=feedback">mailto link + subject</a></li>
<li><a href="mailto:[email protected]?subject=feedback&body=yo">mailto link + subject + body</a></li>
<li><a href="/elsewhere" target="_blank">target=_blank</a></li>
</ul>
<ul>
<li><a href="/relative">hold down cmd</a></li>
<li><a href="/relative">hold down cmd+option</a></li>
<li><a href="/relative">hold down alt</a></li>
<li><a href="/relative">hold down control</a></li>
</ul>
<p class="bottom">
<a href="left">bottom left</a>
<a href="center?something+very+long+that+just+will+not+work+with+anything+really">bottom center (long)</a>
<a href="right">bottom right</a>
</p>
'''
.listen 8001, '127.0.0.1'
spawn 'open', ['http://127.0.0.1:8001']