-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
74 lines (72 loc) · 1.81 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
<!DOCTYPE html><meta charset="utf-8"/><title
>ckup demo</title><link rel="icon" href="ckup.png"/><style
>html {
height: 100%;
}
body {
margin: 0;
padding: 0;
height: 99%;
text-align: center;
}
#kup, #htm {
display: block;
width: 99%;
height: 45%;
margin: 0;
border: 0;
}
#run, #url {
display: inline-block;
width: 40%;
height: 4%;
}
#run, #url, #doc {
font-weight: bold;
}
#ribbon {
position: fixed;
bottom: 0;
right: 0;
z-index: 9;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
border: 0;
}
</style><textarea id="kup"
>
doctype \html
<- html
head ->
meta charset: \utf-8
style css 'ol, ul': 'ol, ul': li: fontStyle: \italic
body ->
code $ 'coco> '
strong -> text '"Hello, world!"'
ol ->
do li3 = !-> li i-~it for i til 3
ul -> li3 3
</textarea><button id="run" title="render"
> ↓ </button><a id="doc" href="docs.htm"
> ? </a><button id="url" title="open"
> ↗ </button><textarea id="htm"
></textarea><script src="https://github.com/satyr/coco/raw/master/extras/coco.js"
></script><script src="ckup.js"
></script><script
>new function (){
var id, __i, __ref, __len, __this = this;
for (__i = 0, __len = (__ref = ['kup', 'run', 'url', 'htm']).length; __i < __len; ++__i) {
id = __ref[__i];
this[id] = document.getElementById(id);
}
this.run.onclick = function(){
return __this.htm.value = Ckup.render(__this.kup.value);
};
return this.url.onclick = function(){
return open('data:text/html,' + encodeURIComponent(__this.htm.value));
};
}</script><a href="https://github.com/satyr/ckup"
><img id="ribbon" alt="fork-me-on-github" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"/></a>