-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathindex.html
231 lines (216 loc) · 11 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="manifest" href="manifest.json" />
<!-- ios support -->
<link rel="apple-touch-icon" href="images/icons/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" href="images/icons/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon" href="images/icons/apple-touch-icon-152x152.png" />
<link rel="apple-touch-icon" href="images/icons/android-chrome-192x192.png" />
<link rel="apple-touch-icon" href="images/icons/android-chrome-384x384.png" />
<meta name="apple-mobile-web-app-status-bar" content="#ffffff" />
<meta name="theme-color" content="#ffffff" />
<meta name="description" content="Visualize the JavaScript Promise APIs and learn. It is a playground to learn about promises faster, ever!">
<meta name="robots" content="index, follow" />
<!-- Open Graph support -->
<meta property="og:type" content="website" />
<meta property="og:title" content="PromiViz - Visualize Promise APIs" />
<meta property="og:description" content="Visualize the JavaScript Promise APIs and learn. It is a playground to learn about promises faster, ever!"/>
<meta property="og:image" content="https://promiviz.vercel.app/social/landing.png" />
<meta property="og:url" content="https://promiviz.vercel.app/" />
<meta property="og:site_name" content="PromiViz" />
<!-- Twitter Card support -->
<meta name="twitter:title" content="PromiViz - Visualize Promise APIs">
<meta name="twitter:description" content="Visualize the JavaScript Promise APIs and learn. It is a playground to learn about promises faster, ever!">
<meta name="twitter:image" content="https://promiviz.vercel.app/social/landing.png">
<meta name="twitter:site" content="@tapasadhikary">
<meta name="twitter:creator" content="@tapasadhikary">
<!-- Fav Icon support -->
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🤝</text></svg>">
<!-- Font support -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@1,300&display=swap" rel="stylesheet">
<!-- Stylesheet -->
<link rel="stylesheet" href="main.css">
<title>PromiViz - Visualize Promise APIs</title>
</head>
<body class="purple">
<main>
<header>
<h1>🤝 PromiViz</h1>
<div>
<span style="font-size:30px;cursor:pointer" onclick="toggleNav()">☰</span>
</div>
</header>
<div id="sidenav-id" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a class="item" href="#" title="Clear Logs" onclick="clearLogs()">Clear Logs</a>
<a class="item" href="#" title="Persist Logs">
Persist Logs
<input type="checkbox" id="persist-logs" onclick="persistLogs()" />
</a>
<div class="log-settings">
<a class="item" href="#">Set a Theme</a>
<ui class="log-theme">
<li title="Set the blue theme" class="blue" onclick="setTheme('blue')"></li>
<li title="Set the red theme" class="red" onclick="setTheme('red')"></li>
<li title="Set the purple theme" class="purple" onclick="setTheme('purple')"></li>
<li title="Set the green theme" class="green" onclick="setTheme('green')"></li>
<li title="Set the black theme" class="black" onclick="setTheme('black')"></li>
</ui>
</div>
<hr />
<div class="social">
<a
href="https://github.com/atapas/promiviz"
target="_blank"
rel="noopener noreferrer"
title="See the source code">
<img
src='./images/github.png'
width="30px"
height="30px" />
</a>
<a
href="https://youtube.com/@tapasadhikary"
target="_blank"
rel="noopener noreferrer"
title="Subscribe to tapaScript" >
<img
src='./images/youtube.png'
width="32px"
height="32px" />
</a>
<a
href="https://twitter.com/intent/tweet?text=🤝%20PromiViz%20-%20Visualize%20Promise%20APIs&url=https://promiviz.vercel.app/&hashtags=promise,devcommunity,promisviz,100daysofcode,javascript%20by%20@tapasadhikary"
target="_blank"
rel="noopener noreferrer"
title="Tweet about it" >
<img
src='./images/twitter.png'
width="30px"
height="30px" />
</a>
<a
href="https://blog.greenroots.info/series/javascript-promises"
target="_blank"
rel="noopener noreferrer"
title="Read about Promises" >
<img
src='./images/blog.png'
width="30px"
height="30px" />
</a>
</div>
</div>
<div class="content">
<div class="config purple">
<section class="select-api">
<label for="apis-list-id">Select an API:</label>
<select name="apis" id="apis-list-id" onchange="selectValue()">
<option value="select">------SELECT------</option>
<option value="all">Promise.all</option>
<option value="allSettled">Promise.allSettled</option>
<option value="any">Promise.any</option>
<option value="race">Promise.race</option>
<option value="handleResolve">Promise.resolve</option>
</select>
</section>
</div>
<div id='explanation-id' class='explanation'>
</div>
<div class="colors">
<div>
<p class="actions">
<label for="red-delays-id">Delay</label>
<select name="red-delays" id="red-delays-id" onchange="selectDelay()">
<option value="1000" selected>1 sec</option>
<option value="2000">2 secs</option>
<option value="3000">3 secs</option>
<option value="4000">4 secs</option>
<option value="5000">5 secs</option>
<option value="6000">6 secs</option>
<option value="7000">7 secs</option>
<option value="8000">8 secs</option>
<option value="9000">9 secs</option>
<option value="10000">10 secs</option>
</select>
|
<label for="red-error-id">
Reject
<input type="checkbox" id="red-error-id" onclick="rejectColor('red-error-id')" />
</label>
</p>
<span id="red-id" class="color-text"></span>
</div>
<div>
<p class="actions">
<label for="green-delays-id">Delay</label>
<select name="green-delays" id="green-delays-id" onchange="selectDelay()">
<option value="1000">1 sec</option>
<option value="2000">2 secs</option>
<option value="3000" selected>3 secs</option>
<option value="4000">4 secs</option>
<option value="5000">5 secs</option>
<option value="6000">6 secs</option>
<option value="7000">7 secs</option>
<option value="8000">8 secs</option>
<option value="9000">9 secs</option>
<option value="10000">10 secs</option>
</select>
|
<label for="green-error-id">
Reject
<input type="checkbox" id="green-error-id" onclick="rejectColor('green-error-id')" />
</label>
</p>
<span id="green-id" class="color-text"></span>
</div>
<div>
<p class="actions">
<label for="blue-delays-id">Delay</label>
<select name="blue-delays" id="blue-delays-id" onchange="selectDelay()">
<option value="1000">1 sec</option>
<option value="2000">2 secs</option>
<option value="3000">3 secs</option>
<option value="4000">4 secs</option>
<option value="5000" selected>5 secs</option>
<option value="6000">6 secs</option>
<option value="7000">7 secs</option>
<option value="8000">8 secs</option>
<option value="9000">9 secs</option>
<option value="10000">10 secs</option>
</select>
|
<label for="blue-error-id">
Reject
<input type="checkbox" id="blue-error-id" onclick="rejectColor('blue-error-id')" />
</label>
</p>
<span id="blue-id" class="color-text"></span>
</div>
</div>
<div id="log-container" class="logs purple">
<div class="log-header">
<h2>Logs</h2>
</div>
<ul id='log-id'></ul>
</div>
<footer>
Made with ❤️ by
<a
target="_blank"
rel="noopener noreferrer"
href="https://twitter.com/tapasadhikary">
@tapasadhikary
</a>
</footer>
</div>
</main>
<script src="./app.js"></script>
</body>
</html>