This repository has been archived by the owner on Aug 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
165 lines (144 loc) · 5.97 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
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html>
<head>
<title>Deps demo</title>
<meta keywords="deps.js demo online playground repl">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#00ffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#00ffff">
<!-- Yandex.Metrika counter --> <script type="text/javascript"> (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter41467794 = new Ya.Metrika({ id:41467794, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, trackHash:true }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks"); </script> <noscript><div><img src="https://mc.yandex.ru/watch/41467794" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter -->
<style>
* { box-sizing: border-box; }
body {
margin: 0;
font-family: 'Helvetica neue';
}
header {
position: relative;
}
.layout {
display: flex;
flex-direction: column;
height: 100vh;
justify-content: center;
padding: calc(10px + 1vh) calc(10px + 1vw);
}
.layout > * + * {
margin-top: calc(10px + 1vh);
}
main {
display: flex;
flex-grow: 1;
}
textarea {
flex-basis: 50%;
padding: 1em;
margin: 0; /* reset */
letter-spacing: .05em;
font-family: Consolas, Monaco, 'Source Code Pro', 'Roboto Mono', 'Droid Sans Mono', 'Courier New', Courier, monospace;
font-size: 18px;
resize: none;
}
textarea + textarea {
border-left: 0;
}
textarea:focus {
outline: none;
box-shadow: 0 0 30px rgba(255, 165, 0, 0.2);
}
h1 {
margin-bottom: 0;
}
.status {
font-weight: bold;
}
.status._ok {
box-shadow: inset 0 0 2px green;
padding: 0.5em;
color: green;
background: rgba(173, 255, 47, 0.01);
}
.status._error {
box-shadow: inset 0 0 2px orangered;
padding: 0.5em;
color: orangered;
background: rgba(255, 173, 47, 0.01);
}
.over-links {
position: absolute;
display: flex;
justify-content: space-between;
width: 100%;
}
._hidden { display: none; }
.examples {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(255, 255, 255, 0.9);
padding: calc(10px + 1vw);
}
._inactive {
-webkit-filter: blur(3px);
filter: blur(3px);
}
.link_pseudo {
text-decoration: none;
}
label input {
margin-right: .5em;
}
code {
font-size: larger;
font-family: monospace;
}
.stringify-selector {
}
</style>
</head>
<body>
<div class="layout">
<header>
<section class="over-links">
<a href="/examples" class="examples-link">Примеры</a>
<span class="stringify-selector">
<span>Сериализация: </span>
<label><input id="stringify-inspect" checked type="radio" name="stringify" value="inspect"><code>util.inspect</code> (без кавычек)</label>
<label><input id="stringify-json" type="radio" name="stringify" value="json"><code>JSON.stringify</code> (с отступами)</label>
</span>
</section>
<h1>Deps.js playground</h1>
</header>
<main>
<textarea id="input" autofocus spellcheck="false"></textarea>
<textarea id="output" readonly></textarea>
</main>
<footer class="status main">ready</footer>
</div>
<section class="examples _hidden">
<h1><a href="/" class="link_pseudo close-examples-link">❌</a> Примеры</h1>
<ul>
<li><a href="/example" data-content="{block: 'block'}">block</a></li>
<li><a href="/example" data-content="{block: 'block', elem: ['el1', 'el2']}">elem (without block)</a></li>
<li><a href="/example" data-content="{block: 'block', elems: ['el1', 'el2']}">elems (with block)</a></li>
<li><a href="/example" data-content="{block: 'block', mods: {mod1: 'val1', mod2: 'val2'}}">mods (with syntax sygar)</a></li>
<li><a href="/example" data-content="{block: 'block', mod: 'mod1', val: 'val1'}">single mod (without syntax sugar)</a></li>
<li><a href="/example" data-content="{block: 'block', tech: 'js'}">tech</a></li>
</ul>
</section>
</body>
</html>
<script src="bundle.js"></script>