-
Notifications
You must be signed in to change notification settings - Fork 0
/
color-alchemy-instruction.html
executable file
·638 lines (423 loc) · 28.6 KB
/
color-alchemy-instruction.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
<!DOCTYPE html>
<html lang="en-US">
<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, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<meta name="csrf-token" content="npfSiRuJ-ukAwgYPw_X7FrEMM6p43-fCggK4">
<meta name="description" content="# Frontend Developer Interview Code Challenge ## Requirements - Please use React to build this web">
<title>Frontend Developer Interview Code Challenge - HackMD</title>
<link rel="icon" type="image/png" href="https://hackmd.io/favicon.png">
<link rel="apple-touch-icon" href="https://hackmd.io/apple-touch-icon.png">
<script nonce="b2d6bc15-cd66-4053-b4fd-b24096aec77d">
window.domain = 'hackmd.io'
window.urlpath = ''
window.debug = false
window.version = '1.3.0'
window.brand = 'HackMD'
window.NOTE_ID = 'SLUIAQa9TlWkY3Mf_0fJnA'
window.GOOGLE_API_KEY = 'AIzaSyCjSrqWHhmWJnoI7JlD88XDSaBgiKbaenA'
window.GOOGLE_CLIENT_ID = '911617723593-drikdibvvn63slfd6kbqigo8ql1no55s.apps.googleusercontent.com'
window.DROPBOX_APP_KEY = 'rdoizrlnkuha23r'
window.PLANTUML_SERVER = 'https://ptuml.hackmd.io'
window.ASSET_URL = 'https://assets.hackmd.io'
window.USER_CAN_CREATE_TEAM = true
window.USER_CAN_DELETE_ACCOUNT = true
window.USER_DELETE_ACCOUNT_VIA_EMAIL = true
window.PAYMENT_ENABLED = true
window.PAYMENT_PROMOTION_BANNER_ENABLED =
window.GITHUB_SYNC_ENABLED = true
window.GITLAB_SYNC_ENABLED = false
window.GITLAB_SYNC_BASE_URL = ''
window.VCS_SYNC_MODE = 'github'
window.VCS_PROVIDER_NAME = 'GitHub'
window.FREE_TEAM_NUM = 20
window.FREE_TEAM_MEMBER_NUM = 3
window.FREE_PUBLIC_TEAM_NUM = 10
window.EE_SITE_ENABLE = false
window.EE_SITE_NAME = 'false'
window.EE_SITE_LINK = 'false'
window.EESITE_INFO = false
window.ENTERPRISE_DISCOVERY_ENABLE = false
window.ENTERPRISE_DISCOVERY_TEAM = true
window.ENTERPRISE_DISCOVERY_NOTE = true
window.ENTERPRISE_DISCOVERY_VIEW_PERMISSION = 'guest'
window.ALLOW_ANONYMOUS = true
window.ALLOW_ANONYMOUS_EDIT = false
window.PUBLIC_OVERVIEW = false
window.INTERNAL_PUBLIC_OVERVIEW = false
window.FULL_TEXT_SEARCH_ENABLE = false
window.MARKETING_EMAIL_ENABLE = true
window.API_MANAGEMENT_UI_ENABLE = true
window.FEEDBACK_UI_ENABLE = true
window.SHOW_HOT_NOTES = false
window.HOT_NOTES_TIME_TYPE = 'week'
window.SHOW_OVERVIEW = true
window.MENTIONS = {}
window.MENTION_ANCHORS = []
window.COMMENT_ANCHORS = []
window.IS_OWNER = true
window.IS_TEAM_ADMIN = false
window.USER_PROFILE = {"name":"mirefly","userpath":"gd_dVYF0STqPqMLWkxnd6A","photo":"https://avatars.githubusercontent.com/u/4984681?s=96","userid":"81dfdd55-8174-493a-8fa8-c2d69319dde8"}
window.VERSION_TIME = '1651013056289'
window.canEdit = true
window.canWriteComment = true
</script>
<!-- Google Tag Manager -->
<script nonce="b2d6bc15-cd66-4053-b4fd-b24096aec77d">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KLW9Z3');</script>
<!-- End Google Tag Manager -->
<meta property="fb:app_id" content="1436904003272070">
<meta name="twitter:image:src" content="https://avatars.githubusercontent.com/u/4984681?s=400" />
<meta name="twitter:site" content="@hackmdio" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Frontend Developer Interview Code Challenge - HackMD" />
<meta name="twitter:description" content="# Frontend Developer Interview Code Challenge ## Requirements - Please use React to build this web" />
<meta property="og:image" content="https://avatars.githubusercontent.com/u/4984681?s=400" />
<meta property="og:site_name" content="HackMD" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Frontend Developer Interview Code Challenge - HackMD" />
<meta property="og:description" content="# Frontend Developer Interview Code Challenge ## Requirements - Please use React to build this web" />
<link rel="stylesheet" href='https://assets.hackmd.io/build/emojify.js/dist/css/basic/emojify.min.css'>
<link href="https://assets.hackmd.io/build/font-vendor.f71b2dd20d2cd4c87735.css" rel="stylesheet"><link href="https://assets.hackmd.io/build/common-vendor.1233bc7a27f833ea4984.css" rel="stylesheet"><link href="https://assets.hackmd.io/build/pretty-vendor.125d4ded35ba0a2fa5e9.css" rel="stylesheet"><link href="https://assets.hackmd.io/build/pretty.bdb69e73c208d59d044c.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js" integrity="sha256-g6iAfvZp+nDQ2TdTR/VVKJf3bGro4ub5fvWSWVRi2NE=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.9/es5-shim.min.js" integrity="sha256-8E4Is26QH0bD52WoQpcB+R/tcWQtpzlCojrybUd7Mxo=" crossorigin="anonymous"></script>
<![endif]-->
</head>
<body style="display:none;">
<div class="ui-infobar container-fluid unselectable hidden-print">
<div class="row">
<div class="col-xs-12 ui-infobar-inner">
<div class="ui-infobar__user-info">
<ul class="list-inline">
<li>
<span class="ui-lastchangeuser" data-profile="gd_dVYF0STqPqMLWkxnd6A"> <a class="ui-user-icon small" style="background-image: url(https://avatars.githubusercontent.com/u/4984681?s=96);" target="_blank"></a></span>
<span class="text-uppercase ui-status-lastchange"></span>
<span class="ui-lastchange text-uppercase" data-createtime="Fri Apr 22 2022 14:14:22 GMT+0000 (Coordinated Universal Time)" data-updatetime="Tue Apr 26 2022 22:44:16 GMT+0000 (Coordinated Universal Time)"></span>
</li>
<li>
<span class="ui-more-info hmd-dn" data-toggle="popover">
 <i class="fa fa-info-circle" aria-hidden="true"></i>
<div class="more-info-raw hmd-dn">
<span class="ui-published-note note-status-row hmd-dn">
<i class="fa fa-globe" aria-hidden="true" style="margin-top: 1px;"></i>
Published
</span>
<span class="ui-connectedGithub note-status-row hmd-dn">
<i class="fa fa-20 ui-connectedGithubIcon fa-github"></i>
<span>Linked with GitHub</span>
<br>
<a class="file-path" target="_blank"></a>
</span>
</div>
</span>
</li>
</ul>
</div>
<div class="hmd-text-right ui-infobar__actions">
<ul class="list-inline">
<li>
<span class="community-button ui-like hidden-xs " data-toggle="tooltip" data-placement="bottom" title="Like"><i class="fa fa-fw"></i><span class="text">Like</span><span class="count"></span></span>
<span class="community-button ui-bookmark hidden-xs" data-toggle="tooltip" data-placement="bottom" title="Bookmark"><i class="fa fa-fw"></i><span class="text"><span class="bookmark-label">Bookmark</span><span class="bookmarked-label">Bookmarked</span></span></span>
<div class="ui-notification dropdown is-watch">
<span id="notificationLabel" class="ui--subscribed hidden-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<div data-no-email class="ui-notification-status community-button" data-toggle="tooltip" data-placement="bottom" title="Subscribe">
<i class="fa fa-fw fa-bell"></i><span class="text">Subscribed<i class="fa fa-fw fa-angle-down"></i><i class="fa fa-fw fa-angle-up"></i></span>
</div>
</span>
<ul class="dropdown-menu" aria-labelledby="notificationLabel">
<li class="ui-notification-watch notification-menu-item is-checked"><i class="fa fa-check fa-fw"></i><i class="fa fa-bell fa-fw"></i><div class="info"><div class="title">Any changes</div><div class="description">Be notified of any changes</div></div></li>
<li class="ui-notification-mention notification-menu-item "><i class="fa fa-check fa-fw"></i><i class="fa fa-at fa-fw"></i><div class="info"><div class="title">Mention me</div><div class="description">Be notified of mention me</div></div></li>
<li class="divider"></li>
<!--
<li class="ui-notification-list notification-menu-item"><span><a href="#"><i class="fa fa-list-ul fa-fw"></i>My subscribed list</a></span></li>
-->
<li class="ui-notification-unsubscribe notification-menu-item"><i class="fa fa-bell-slash-o fa-fw"></i>Unsubscribe</li>
</ul>
<span class="ui-notification-subscribe community-button hidden-xs"><i class="fa fa-fw fa-bell-o"></i><span class="text">Subscribe</span></span>
</div>
</li>
<li>
<a href="#" class="ui-edit btn btn-default btn-md"><i class="fa fa-pencil"></i> <span class="hidden-xs" style="margin-left: 3px">Edit</span></a>
</li>
</ul>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="ui-comment-app" id="hackmd-app">
<div id="comment-app"></div>
</div>
</div>
<!-- Markdown rendered container -->
<div id="doc" class="container-fluid markdown-body" data-hard-breaks="false"># Frontend Developer Interview Code Challenge
## Requirements
- Please use React to build this web application.
- TypeScript is preferred.
## Project overview
<figure>
<center>
<img src='https://i.imgur.com/3P7uUD5.png' width=400 />
</center>
<figcaption>
<center> Figure 1: Basic UI </center>
</figcaption>
</figure>
RGB Alchemy is a small game application in which the player can try to mix colors to create new colors.
The game goal is to get a color which "matches" the target color in limited moves.
### Preliminary concepts
- We use CSS syntax `rgb(red, green, blue)` to describe the color.
`red`, `green` and `blue` are numbers between 0 and 255.
- The difference of target color ($\text{rgb}(r_1,g_1,b_1)$) and obtained color ($\text{rgb}(r_2,g_2,b_2)$) is defined as
$$\Delta = \frac{1}{255} \times \frac{1}{\sqrt{3}} \times \sqrt{(r_1 - r_2)^2 + (g_1 - g_2)^2 + (b_1 - b_2)^2}$$
If it is **less than 10%**, the player wins the game.
### UI components
- Information lines: game name, user ID, moves left, target color, the closest color the player has obtained, and the color difference $\Delta$ between the closest color and the target (see Figure 1).
- 2-dimensional array of squares (**"tile"**) surrounded by circles (**"source"**).
The size of the array is $w \times h$.
In the Figure 1, $w = 10$ and $h = 4$.
The initial colors of all tiles and sources are black (see Figure 1).
- Additional details on tiles/sources:
<figure>
<center>
<img width=400 src="https://i.imgur.com/W57XW1i.gif"/>
</center>
<figcaption>
<center> Figure 2: tooltip and highlighting of tiles</center>
</figcaption>
</figure>
1. Each tile has a tooltip showing its color, including the tiles in the information lines, i.e., "target color" and "closest color" (see Figure 2).
2. `cursor: pointer` only applies to the tiles/sources that are clickable or draggable.
3. **[Bonus part A]** The closest one in the array of tiles is highlighted with red border (see Figure 2).
- **[Bonus part B]** A popup dialog allows the player to restart the game.
You can use `window.confirm()` or dialog components provided by any UI libraries.
### User interactions
- In the first 3 moves, the player has to **click sources**. The clicked source will be painted as red/green/blue, i.e., `rgb(255, 0, 0)`/`rgb(0, 255, 0)`/`rgb(0, 0, 255)`.
The tiles in the same row or column will be painted as well.
If the distance between the tile and the sourece is $d$, the color of the tile depends on the "relative distance" from the colored source, $(w+1-d)/(w+1)$ or $(h+1-d)/(h+1)$.
For example, in Figure 3, the 4 red tiles from the top to bottom have colors:
`rgb(255*4/5, 0, 0)`, `rgb(255*3/5, 0, 0)`,
`rgb(255*2/5, 0, 0)`, `rgb(255*1/5, 0, 0)`.
<figure>
<center>
<img src='https://i.imgur.com/IUTkn91.png' width=400 />
</center>
<figcaption>
<center> Figure 3: One colored source </center>
</figcaption>
</figure>
- If the tile is "shined" by multiple sources, the resulting color can be calculated by the following equations
$$ r = r_1 + r_2 + r_3 + r_4 $$
$$ g = g_1 + g_2 + g_3 + g_4 $$
$$ b = b_1 + b_2 + b_3 + b_4 $$
$$ f= 255 / \text{max}(r, g, b, 255) $$
$$ \text{Result} = \text{rgb}(r \times f, g \times f, b \times f) $$
Where $\text{rgb}(r_i,g_i,b_i), i = 1,2,3,4$ are the contributions from each source.
$f$ is a normalization factor to make sure that all RGB elements of the resulting color does not exceed 255.
In Figure 4, the color of highlighted tile can be calculated as the sum of the contributions of three sources:
`rgb(255*4/11, 0, 0)`, `rgb(0, 255*7/11, 0)` and `rgb(0, 0, 255*3/5)`.
The result is `rgb(93, 162, 153)`.
<figure>
<center>
<img width=400 src="https://i.imgur.com/8ktY9P1.png"/>
</center>
<figcaption>
<center> Figure 4: Multiple colored sources
</center>
</figcaption>
</figure>
- After the first 3 steps, the player cannot click sources any more, but they can **drag any tile onto any source**, including the black tile, to replace the source color with the tile color.
By this way, the player can create more colors in the array of tiles.
<figure>
<center>
<img width=400 src="https://i.imgur.com/DVlTDln.gif"/>
</center>
<figcaption>
<center> Figure 5: Dragging the tile to the source
</center>
</figcaption>
</figure>
- **[Bonus part B]** Once the target is reached, or there is 0 step left, a pop up window is displayed to notify the player the result (success or failure) and ask them if they want to play the game again.
If the player chooses to "play the game again", the app will fetch the data from the server and initialize the UI, but **keep the user ID unchanged**.
## Development environment
- We provides a simple Node.js program to start a local server listening at port 9876.
You can start the server by running the following command
```
npm install
npm start
```
This program was tested in Node version 14.17.3.
## API docs
- The web application fetches the basic information from the server to initialize the game.
```
// Request
curl http://localhost:9876/init
// Response
{
"userId":"774b31", // Random string
"width":10, // Random integer min=10 max=20
"height":4, // Random integer min=4 max=10
"maxMoves":8, // Random integer min=8 max=20
"target":[0,255,255] // Random RGB Color
}
```
- If the user chooses to play the game again, the current user ID should be used in the request.
```
// Request
curl http://localhost:9876/init/user/<my-user-id>
// Response
{"userId":"<my-user-id>","width":10,"height":4,"maxMoves":10,"target":[0,255,255]}
```
## Demo GIF
![](https://i.imgur.com/Kh9vNua.gif)
</div>
<div class="document-footer container-fluid hmd-pb-2 hidden-print">
<hr>
<div class="footer hmd-flex hmd-items-center">
<div class="footer__published-by hmd-flex-grow-1">
<span>Published on</span> <strong><a href="https://hackmd.io/" target="_blank"><i class="fa fa-file-text"></i> <span class="brand">HackMD</span></a></strong>
</div>
<div class="footer__views" style="margin-right: 18px;">
<i class="fa fa-eye"></i> <span class="ui-viewcount">12</span>
</div>
<div class="footer__views">
<span class="community-button ui-like " data-toggle="tooltip" data-placement="top" title="Like"><i class="fa fa-fw"></i><span class="text hidden-xs">Like</span><span class="count"></span></span>
<span class="community-button ui-bookmark " data-toggle="tooltip" data-placement="top" title="Bookmark"><i class="fa fa-fw"></i><span class="text hidden-xs"><span class="bookmark-label">Bookmark</span><span class="bookmarked-label">Bookmarked</span></span></span>
<div class="ui-notification dropup dropdown is-watch">
<span id="notificationLabel" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<div class="community-button" data-no-email data-toggle="tooltip" data-placement="top" title="Subscribe">
<i class="fa fa-fw fa-bell"></i><span class="text hidden-xs">Subscribed<i class="fa fa-fw fa-angle-down"></i><i class="fa fa-fw fa-angle-up"></i></span>
</div>
</span>
<ul class="dropdown-menu pull-right" aria-labelledby="notificationLabel">
<li class="ui-notification-watch notification-menu-item is-checked"><i class="fa fa-check fa-fw"></i><i class="fa fa-bell fa-fw"></i><div class="info"><div class="title">Any changes</div><div class="description" >Be notified of any changes</div></div></li>
<li class="ui-notification-mention notification-menu-item "><i class="fa fa-check fa-fw"></i><i class="fa fa-at fa-fw"></i><div class="info"><div class="title">Mention me</div><div class="description">Be notified of mention me</div></div></li>
<li class="divider"></li>
<!--
<li class="ui-notification-list notification-menu-item"><span><a href="#"><i class="fa fa-list-ul fa-fw"></i>My subscribed list</a></span></li>
-->
<li class="ui-notification-unsubscribe notification-menu-item"><i class="fa fa-bell-slash-o fa-fw"></i>Unsubscribe</li>
</ul>
<span class="ui-notification-subscribe community-button"><i class="fa fa-fw fa-bell-o"></i><span class="text hidden-xs">Subscribe</span></span>
</div>
</div>
</div>
</div>
<div class="ui-community unselectable hidden-print hidden-xs" style="display: none;">
<div class="community-button ui-like " title="Like" data-toggle="tooltip" data-placement="right" data-offset="0,5"><i class="fa fa-fw"></i><div class="count"></div></div>
<div class="community-button ui-bookmark " title="Bookmark" data-toggle="tooltip" data-placement="right" data-offset="0,5"><i class="fa fa-fw"></i></div>
<div class="ui-notification dropup dropdown is-watch" title="Subscribe" data-toggle="tooltip" data-placement="right" data-offset="0,5">
<div id="notificationLabel" class="community-button" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<div data-no-email class="ui-notification-status"><i class="fa fa-fw fa-bell"></i></div>
</div>
<ul class="dropdown-menu left" aria-labelledby="notificationLabel">
<li class="ui-notification-watch notification-menu-item is-checked"><i class="fa fa-check fa-fw"></i><i class="fa fa-bell fa-fw"></i><div class="info"><div class="title">Any changes</div><div class="description">Be notified of any changes</div></div></li>
<li class="ui-notification-mention notification-menu-item "><i class="fa fa-check fa-fw"></i><i class="fa fa-at fa-fw"></i><div class="info"><div class="title">Mention me</div><div class="description">Be notified of mention me</div></div></li>
<li class="divider"></li>
<!--
<li class="ui-notification-list notification-menu-item"><span><a href="#"><i class="fa fa-list-ul fa-fw"></i>My subscribed list</a></span></li>
-->
<li class="ui-notification-unsubscribe notification-menu-item"><i class="fa fa-bell-slash-o fa-fw"></i>Unsubscribe</li>
</ul>
<div class="ui-notification-subscribe community-button"><i class="fa fa-fw fa-bell-o"></i></div>
</div>
</div>
<div class="ui-toc dropup unselectable hidden-print" style="display:none;">
<div class="pull-left dropdown">
<a id="tocLabel" class="ui-toc-label btn btn-default" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" title="Table of content">
<i class="fa fa-bars"></i>
</a>
<ul id="ui-toc" class="ui-toc-dropdown dropdown-menu" aria-labelledby="tocLabel">
</ul>
</div>
</div>
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="display:none;"></div>
<div class="clearfix"></div>
<!-- signin modal -->
<div class="modal fade signin-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-top: 10px; right: 20px; position: absolute;"><span aria-hidden="true">×</span></button>
<h3>Sign in</h3>
<form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
<div class="hmd-dn"><input type="hidden" name="_csrf" value="npfSiRuJ-ukAwgYPw_X7FrEMM6p43-fCggK4"></div>
<div class="hmd-dn"><input type="hidden" name="create_team" value="false"></div>
<div class="hmd-dn"><input type="hidden" name="create_paid_team" value="false"></div>
<div class="form-group ">
<label for="email" class="control-label">Email</label>
<label for="inputEmail" class="control-label pull-right errors">
</label>
<span class="help-block control-label with-errors pull-right" style="display: inline;"></span>
<div class="input-block">
<input type="email" class="form-control" name="email" placeholder="Your email" required autocomplete="email">
<span class="error-sign"></span>
</div>
</div>
<div class="form-group ">
<label for="password" class="control-label">Password</label>
<label for="inputPassword" class="control-label pull-right errors">
</label>
<span class="help-block control-label with-errors pull-right" style="display: inline;"></span>
<div class="input-block">
<input type="password" class="form-control" name="password" placeholder="Your password" required autocomplete="current-password">
<span class="error-sign"></span>
<span class="control-label pull-right" style="font-size: 13px; margin-top: 5px;"><a href="https://hackmd.io/settings/forgotPassword" style="text-decoration: underline;">Forgot password</a></span>
</div>
</div>
<div style="text-align: center; padding-top: 15px; margin-bottom: 0px;">
<input type="submit" class="btn btn-success btn-large" formaction="https://hackmd.io/login" value="Sign in">
</div>
</form>
<p class="separator">or</p>
<p>By clicking below, you agree to our <a href="https://hackmd.io/s/terms" target="_blank">terms of service</a>.</p>
<div class="social-buttons-container">
<a href="https://hackmd.io/auth/facebook" class="btn btn-lg btn-block btn-social btn-facebook">
<i class="fa fa-facebook"></i> Sign in via Facebook
</a>
<a href="https://hackmd.io/auth/twitter" class="btn btn-lg btn-block btn-social btn-twitter">
<i class="fa fa-twitter"></i> Sign in via Twitter
</a>
<a href="https://hackmd.io/auth/github" class="btn btn-lg btn-block btn-social btn-github">
<i class="fa fa-github"></i> Sign in via GitHub
</a>
<a href="https://hackmd.io/auth/dropbox" class="btn btn-lg btn-block btn-social btn-dropbox">
<i class="fa fa-dropbox"></i> Sign in via Dropbox
</a>
<a href="https://hackmd.io/auth/google" class="btn btn-lg btn-block btn-social btn-google">
<i class="icon icon-google"></i> Sign in via Google
</a>
</div>
<div >
<p>New to HackMD? <a href="https://hackmd.io/join">Sign up</a></p>
</div>
</div>
</div>
</div>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-60728495-1"></script>
<script nonce="b2d6bc15-cd66-4053-b4fd-b24096aec77d">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
let userid = (document.cookie.match('(^|; )userid=([^;]*)')||0)[2];
gtag('config', 'UA-60728495-1', {'user_id': userid});
</script>
<script src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js" crossorigin="anonymous"></script>
<script nonce="b2d6bc15-cd66-4053-b4fd-b24096aec77d">Sentry.init({ dsn: 'https://73410f1915d84abc8b2dd1f1aabd1c82@sentry.hackmd.dev/4', environment: 'production', integrations: function (intrus) { return intrus.filter(function (itr) { return itr.name !== 'TryCatch' }) } });</script>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KLW9Z3"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<script src="https://hackmd.io/api/i18n.js"></script>
<script src="https://assets.hackmd.io/build/font-vendor.b287f22511a3b5df90f2.js" defer="defer"></script><script src="https://assets.hackmd.io/build/common-vendor.a6afaa33b9445d028070.js" defer="defer"></script><script src="https://assets.hackmd.io/build/pretty-vendor.fd16cb88af057a8f19d2.js" defer="defer"></script><script src="https://assets.hackmd.io/build/pretty-common.42870335f965b58e4642.js" defer="defer"></script><script src="https://assets.hackmd.io/build/pretty.0e312d24a293cfe69c18.js" defer="defer"></script>
</body>
</html>