-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
153 lines (133 loc) · 3.98 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
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>rety: Live coding without the stress</title>
<link rel="icon" href='logo.svg'>
<link rel="stylesheet" href="assets/prism.css">
<link rel="stylesheet" href="https://live.prismjs.com/prism-live.css">
<link rel="stylesheet" href="style.css">
<script src="https://md-block.verou.me/md-block.js" type="module" async></script>
</head>
<body>
<header>
<h1>re<span>ty</span></h1>
<h2>Live coding without the stress</h2>
</header>
<nav>
<a href="#basic-usage">Usage</a>
<a href="#api">API</a>
<a href="#faq">FAQ</a>
<a href="#actions">Actions</a>
<!-- <a href="tests.html">Tests</a> -->
<a href="https://github.com/leaverou/rety">GitHub</a>
</nav>
<main>
<md-block src="README.md" hlinks="§"></md-block>
<section id="demo">
<h2>Demo</h2>
<rety-demo id="button-demo" class="with-preview">
<textarea class="language-css">button {
border: .1em solid black;
background: transparent;
color: black;
}
button:hover {
background: black;
color: white;
}
button.pink {
border-color: #f06;
color: #f06;
}
button.pink:hover {
background: #f06;
color: white;
}</textarea>
<textarea class="language-html"><button>Click me</button>
<button class="pink">Click me</button></textarea>
<textarea class="language-actions-json" id="foobar">[
{"type":"caret","start":63,"end":63,"editor":"css"},
{"type":"insertText","text":"--","split":true},
{"type":"caret","start":78,"end":78},
{"type":"insertText","text":"\n\tcolor: var()","split":true},
{"type":"caret","start":91,"end":91},
{"type":"insertText","text":"--color","split":true},
{"type":"caret","start":99,"end":99},
";",
{"type":"pause","delay":2680},
{"type":"caret","start":29,"end":34},
{"type":"insertText","text":"var","split":true},
"()",
{"type":"caret","start":33,"end":33},
{"type":"insertText","text":"--color","split":true},
{"type":"caret","start":139,"end":144},
{"type":"insertText","text":"var","split":true},
"()",
{"type":"caret","start":143,"end":143},
{"type":"insertText","text":"--color","split":true},
{"type":"pause","delay":2461},
{"type":"caret","start":207,"end":207},
{"type":"insertText","text":"--","split":true},
{"type":"caret","start":186,"end":207},
{"type":"deleteContentBackward"},
{"type":"pause","delay":2174},
{"type":"caret","start":203,"end":259},
{"type":"pause","delay":2998},
{"type":"deleteContentBackward"},
{"type":"deleteContentBackward"},
{"type":"pause","delay":5000},
{"type":"caret","start":64,"end":64,"editor":"html"},
"\n",
"<button>Click me</button>",
{"type":"caret","start":72,"end":72},
{"type":"insertText","text":" style=","split":true},
"\"\"",
{"type":"caret","start":80,"end":80},
{"type":"insertText","text":"--color: blue","split":true}
]
</textarea>
<style class="demo" media="not all">
button {
border-radius: .3em;
padding: .1em .5em .15em;
font-weight: bold;
font-size: 180%;
margin: .2em;
cursor: pointer;
}
</style>
</rety-demo>
</section>
<section id="mirror">
<h2>Real-time recording demo</h2>
<rety-demo class="with-source">
<div class="demo-textareas">
<label class="source-label">
Make some edits here:
<textarea class="language-css">* {
color: red;
}</textarea>
<textarea class="language-html" style="--max-height: 3em;"><button>Click me</button>
<button class="pink">Click me</button></textarea>
</label>
<label class="dest-label">
Observe them being replayed here:
</label>
</div>
</rety-demo>
</section>
<md-block id="actions" src="actions.md" hmin="2" hlinks="§"></md-block>
</main>
<footer>
<md-span>
Made in haste, by [Lea Verou](https://lea.verou.me).
[Pull requests welcome](https://github.com/leaverou/rety)
</md-span>
</footer>
<script src="assets/prism.js"></script>
<script src="https://live.prismjs.com/src/prism-live.mjs?load=css,markup,javascript" type="module"></script>
<script src="demo.js" type="module"></script>
</body>
</html>