A web-based drawing app
git clone git://soophie.de/outline
1
tool.colors=Farben2
tool.pencil=Stift3
tool.scale=Skalierung4
tool.clear=Löschen5
tool.capture=Capture6
tool.undo=Rückgängig7
tool.redo=Wiederholen9
action.multiplayer=Mehrspieler10
action.account=Konto11
action.more=Mehr5
action.clear=Löschen6
action.capture=Capture7
action.undo=Rückgängig8
action.redo=Wiederholen10
option.multiplayer=Mehrspieler11
option.account=Konto12
option.more=Mehr13
option.edit-mode=Bearbeiten15
pencil.pen=Stift16
pencil.pen.info=Standard Stift
30
notification.input-device.gamepad.add=Gamepad erkannt31
notification.input-device.gamepad.remove=Gamepad entfernt32
notification.clear=Bildschirm gelöscht31
notification.view-mode.on=View Mode aktiviert32
notification.view-mode.off=View Mode deaktiviert33
notification.view-mode.on=View Mode34
notification.view-mode.off=Edit Mode36
multiplayer.join=Beitreten37
multiplayer.join.info=Suche nach beitretbaren Channels
1
tool.colors=Colors2
tool.pencil=Pencil3
tool.scale=Scale4
tool.clear=Clear5
tool.capture=Capture6
tool.undo=undo7
tool.redo=redo9
action.multiplayer=Multiplayer10
action.account=Account11
action.more=More5
action.clear=Clear6
action.capture=Capture7
action.undo=undo8
action.redo=redo10
option.multiplayer=Multiplayer11
option.account=Account12
option.more=More13
option.edit-mode=Edit Mode15
pencil.pen=Pen16
pencil.pen.info=Default pen
30
notification.input-device.gamepad.add=Gamepad detected31
notification.input-device.gamepad.remove=Gamepad removed32
notification.clear=Screen cleared31
notification.view-mode.on=View Mode enabled32
notification.view-mode.off=View Mode disabled33
notification.view-mode.on=View Mode34
notification.view-mode.off=Edit Mode36
multiplayer.join=Join37
multiplayer.join.info=Search for channel to join
1
* {2
margin: 0;3
padding: 0;4
font-family: 'Roboto', sans-serif;5
box-sizing: border-box;6
}7
*:hover,8
*:focus {9
outline: none;10
}11
html {12
position: relative;13
overflow-x: hidden;14
min-height: 100vh;15
}16
body {17
width: 100%;18
font-size: 14px;19
min-height: 100vh;20
}21
img {22
pointer-events: none;23
user-select: none;24
}25
input {26
-webkit-appearance: none;27
}28
button {29
user-select: none;30
cursor: pointer;31
}32
.hidden {33
display: none !important;34
}35
.ico {36
font-family: 'Material Icons';37
font-weight: normal;38
font-style: normal;39
font-size: 24px;40
display: inline-block;41
line-height: 1;42
text-transform: none;43
letter-spacing: normal;44
word-wrap: normal;45
white-space: nowrap;46
direction: ltr;47
-webkit-font-smoothing: antialiased;48
text-rendering: optimizeLegibility;49
-moz-osx-font-smoothing: grayscale;50
font-feature-settings: 'liga';51
user-select: none;52
pointer-events: none;53
}54
* {55
-webkit-tap-highlight-color: transparent;56
}57
html,58
body {59
overflow: hidden;60
}61
.wrapper {62
position: fixed;63
top: 0;64
left: 0;65
right: 0;66
bottom: 0;67
background: white;68
z-index: 999;69
}70
.header-list {71
width: 100%;72
height: 60px;73
background: white;74
border-bottom: 1px solid #F1F1F1;75
display: flex;76
justify-content: space-between;77
padding: 8px 14px;78
pointer-events: all;79
}80
.header-list.inactive .action-item,81
.header-list.inactive .tool-item,82
.header-list.inactive .option-item {83
pointer-events: none !important;84
}85
.header-list .tool ul,86
.header-list .action ul,87
.header-list .option ul {88
list-style-type: none;89
display: flex;90
gap: 10px;91
}92
.header-list .tool ul li,93
.header-list .action ul li,94
.header-list .option ul li {95
width: 44px;96
height: 44px;97
padding: 10px;98
border-radius: 22px;99
cursor: pointer;100
pointer-events: all;101
}102
.header-list .tool ul li:not(.inactive):not(.active):hover,103
.header-list .action ul li:not(.inactive):not(.active):hover,104
.header-list .option ul li:not(.inactive):not(.active):hover {105
background: rgba(250, 250, 250, 0.95);106
}107
.header-list .tool ul li:not(.inactive):not(.active):hover.ripple.ripple-active,108
.header-list .action ul li:not(.inactive):not(.active):hover.ripple.ripple-active,109
.header-list .option ul li:not(.inactive):not(.active):hover.ripple.ripple-active {110
background: rgba(245, 245, 245, 0.95);111
}112
.header-list .tool ul li.active,113
.header-list .action ul li.active,114
.header-list .option ul li.active {115
background: rgba(238, 238, 238, 0.95);116
}117
.header-list .tool ul li.active.ripple.ripple-active,118
.header-list .action ul li.active.ripple.ripple-active,119
.header-list .option ul li.active.ripple.ripple-active {120
background: rgba(233, 233, 233, 0.95);121
}122
.header-list .tool ul li.inactive i.ico,123
.header-list .action ul li.inactive i.ico,124
.header-list .option ul li.inactive i.ico {125
color: #E0E0E0;126
}127
.header-list .tool ul li i.ico,128
.header-list .action ul li i.ico,129
.header-list .option ul li i.ico {130
color: #555555;131
}132
#canvas,133
#overlay,134
.controls {135
position: fixed;136
top: 0;137
left: 0;138
right: 0;139
bottom: 0;140
}141
#overlay {142
pointer-events: none;143
}144
.badge {145
display: inline-block;146
margin-top: -1px;147
margin-left: 5px;148
padding: 2px 4px;149
border-radius: 2px;150
font-weight: 500;151
font-size: 12px;152
color: white !important;153
}154
.badge.prime {155
background: #0372EF;156
}157
.badge.beta {158
background: #388E3C;159
}160
.button {161
display: block;162
height: 44px;163
padding: 0 22px;164
border: none;165
border-radius: 4px;166
background: #F5F5F5;167
color: #24292E;168
font-size: 16px;169
}170
.button:hover.ripple-active {171
background: #f0f0f0;172
}173
.button.outline {174
border: 1px solid #F1F1F1;175
background: transparent;176
}177
.button.outline:hover.ripple-active {178
background: #fafafa;179
}180
.button.prime {181
background: #0372EF;182
color: white;183
}184
.button.prime:hover.ripple-active {185
background: #036de5;186
}187
.button.danger {188
background: #E53935;189
color: white;190
}191
.button.danger:hover.ripple-active {192
background: #e4302c;193
}194
.controls {195
pointer-events: none;196
}197
.controls .notification {198
top: 90px;199
position: fixed;200
display: flex;201
justify-content: center;202
width: 100%;203
opacity: 0;204
}205
.controls .notification p {206
display: inline-block;207
padding: 10px 24px;208
border-radius: 999px;209
background: #24292E;210
color: white;211
opacity: 0.95;212
user-select: none;213
pointer-events: none;214
}215
.controls .hotbar {216
display: flex;217
position: fixed;218
left: calc(50% - 216px);219
bottom: 30px;220
z-index: -1;221
}222
.controls .hotbar.inactive .color {223
pointer-events: none !important;224
}225
.controls .hotbar .color {226
margin: 6px;227
width: 60px;228
height: 60px;229
border-radius: 30px;230
background: #EEE;231
cursor: pointer;232
transition: transform 0.2s;233
transform: scale(0.9);234
pointer-events: all;235
}236
.controls .hotbar .color:not(.active):hover {237
transform: scale(1);238
}239
.controls .hotbar .color.focus {240
transform: scale(1);241
}242
.controls .hotbar .color.active {243
transform: scale(1.1);244
}245
.controls .pencil-modal {246
top: 75px;247
left: 120px;248
}249
.controls .scale-modal {250
top: 75px;251
left: 70px;252
width: 400px;253
height: 60px;254
}255
.controls .scale-modal input[type="range"] {256
-webkit-appearance: none;257
width: calc(400px - 54px);258
margin-top: 21px;259
margin-left: 27px;260
height: 6px;261
background: #EEEEEE;262
border: none;263
border-radius: 4px;264
}265
.controls .scale-modal input[type="range"]::-webkit-slider-runnable-track {266
-webkit-appearance: none;267
}268
.controls .scale-modal input[type="range"]::-webkit-slider-thumb {269
-webkit-appearance: none;270
height: 20px;271
width: 20px;272
margin-top: 0px;273
background: #9E9E9E;274
border-radius: 10px;275
cursor: pointer;276
}277
.controls .scale-modal input[type="range"]::-webkit-slider-thumb:hover {278
background: #757575;279
}280
.controls .clear-modal {281
top: calc(50% - 75.5px);282
left: calc(50% - 200px);283
width: 400px;284
padding: 25px;285
display: flex;286
flex-direction: column;287
}288
.controls .clear-modal .info {289
width: 100%;290
font-size: 20px;291
text-align: center;292
margin-bottom: 25px;293
color: #24292E;294
user-select: none;295
}296
.controls .clear-modal .align {297
display: flex;298
gap: 25px;299
}300
.controls .clear-modal .align .btn-cancel {301
width: 185px;302
height: 50px;303
border: none;304
border-radius: 3px;305
font-size: 17px;306
}307
.controls .clear-modal .align .btn-apply {308
width: 185px;309
height: 50px;310
border: none;311
border-radius: 3px;312
border-color: grey;313
font-size: 17px;314
}315
.controls .capture-modal {316
top: calc(50% - 213px);317
left: calc(50% - 200px);318
width: 400px;319
display: flex;320
flex-direction: column;321
padding: 25px;322
}323
.controls .capture-modal .info {324
font-size: 20px;325
width: 100%;326
text-align: center;327
margin-bottom: 25px;328
color: #24292E;329
user-select: none;330
}331
.controls .capture-modal .preview {332
height: 250px;333
background: #F5F5F5;334
border: 1px solid #f1f1f1;335
border-radius: 3px;336
margin-bottom: 25px;337
}338
.controls .capture-modal .align {339
display: flex;340
gap: 25px;341
}342
.controls .capture-modal .align .btn-cancel {343
width: 185px;344
height: 50px;345
border: none;346
border-radius: 3px;347
font-size: 17px;348
}349
.controls .capture-modal .align .btn-apply {350
width: 185px;351
height: 50px;352
border: none;353
border-radius: 3px;354
border-color: grey;355
font-size: 17px;356
}357
.controls .colors-modal {358
flex-wrap: wrap;359
min-width: 410px;360
width: 410px;361
max-width: 410px;362
padding: 30px !important;363
top: 75px;364
left: 15px;365
display: flex;366
gap: 12px;367
}368
.controls .colors-modal .color {369
width: 60px;370
height: 60px;371
border-radius: 30px;372
background: #EEE;373
cursor: pointer;374
transition: transform 0.2s;375
transform: scale(0.9);376
}377
.controls .colors-modal .color:not(.active):hover {378
transform: scale(1);379
}380
.controls .colors-modal .color.active {381
transform: scale(1.1);382
}383
.controls .colors-modal .color.focus {384
transform: scale(1);385
}386
.controls .multiplayer-modal {387
top: 75px;388
right: 130px;389
}390
.controls .account-modal {391
top: 75px;392
right: 80px;393
}394
.controls .more-modal {395
top: 75px;396
right: 20px;397
}398
.modal {399
width: 250px;400
position: fixed;401
background: white;402
border: 1px solid #F1F1F1;403
border-radius: 4px;404
padding: 6px 0;405
pointer-events: all;406
overflow: hidden;407
z-index: -1;408
display: flex;409
}410
.modal .main {411
width: 248px;412
min-width: 248px;413
7max-width: 248px;414
}415
.modal ul.tab-list {416
width: 248px;417
min-width: 248px;418
max-width: 248px;419
}420
.modal .header {421
display: flex;422
margin-bottom: 3px;423
}424
.modal .header .back {425
margin: 10px;426
margin-top: 15px;427
margin-right: 3px;428
width: 36px;429
height: 36px;430
border-radius: 18px;431
padding: 6px;432
padding-left: 5px;433
cursor: pointer;434
}435
.modal .header .back i.ico {436
color: #424242;437
}438
.modal .header .back:hover {439
background: #FAFAFA;440
}441
.modal .header .back.ripple.ripple-active {442
background: #f5f5f5;443
}444
.modal .header .info {445
display: flex;446
flex-direction: column;447
margin-top: 15px;448
}449
.modal .header .info p {450
display: flex;451
align-items: center;452
font-weight: 500;453
color: #555555;454
user-select: none;455
pointer-events: none;456
}457
.modal .header .info span {458
display: block;459
margin-top: 3px;460
font-size: 12px;461
color: #9E9E9E;462
user-select: none;463
pointer-events: none;464
}465
.modal ul.item-list .separator {466
margin: 6px 0;467
width: 100%;468
height: 1px;469
background: #F1F1F1;470
}471
.modal ul.item-list li.caption {472
padding: 2px 15px;473
padding-top: 12px;474
list-style: none;475
}476
.modal ul.item-list li.caption p {477
color: #9E9E9E;478
user-select: none;479
pointer-events: none;480
}481
.modal ul.item-list li.item {482
display: flex;483
align-items: center;484
padding: 15px;485
cursor: pointer;486
}487
.modal ul.item-list li.item.empty p {488
display: block;489
width: 100%;490
color: #9E9E9E;491
text-align: center;492
user-select: none;493
pointer-events: none;494
}495
.modal ul.item-list li.item:not(.active):not(.inactive):hover {496
background: #FAFAFA;497
}498
.modal ul.item-list li.item:not(.active):not(.inactive).ripple.ripple-active {499
background: #f5f5f5;500
}501
.modal ul.item-list li.item i.ico {502
color: #555555;503
user-select: none;504
pointer-events: none;505
}506
.modal ul.item-list li.item i.lang {507
display: flex;508
justify-content: center;509
align-items: center;510
font-style: normal;511
font-weight: 600;512
width: 24px;513
height: 24px;514
color: #555555;515
user-select: none;516
pointer-events: none;517
}518
.modal ul.item-list li.item .info {519
display: flex;520
flex-direction: column;521
margin-left: 10px;522
max-width: calc(100% - 24px - 10px);523
}524
.modal ul.item-list li.item .info p {525
display: flex;526
align-items: center;527
font-weight: 500;528
color: #555555;529
user-select: none;530
pointer-events: none;531
}532
.modal ul.item-list li.item .info span {533
display: block;534
margin-top: 3px;535
font-size: 12px;536
color: #9E9E9E;537
user-select: none;538
pointer-events: none;539
white-space: nowrap;540
overflow: hidden;541
text-overflow: ellipsis;542
}543
.modal ul.item-list li.item.active {544
background: #EEEEEE;545
}546
.modal ul.item-list li.item.active.ripple.ripple-active {547
background: #e9e9e9;548
}549
.modal ul.item-list li.item.inactive i.ico {550
color: #E0E0E0;551
}552
.modal ul.item-list li.item.inactive .info p {553
color: #9E9E9E;554
}555
.modal ul.item-list li.item.inactive .info span {556
color: #9E9E9E;557
}558
.tooltip {559
position: relative;560
display: flex;561
justify-content: center;562
align-items: center;563
}564
.tooltip:hover::before {565
opacity: 0.95;566
transition-delay: 0.6s;567
}568
.tooltip:hover::after {569
opacity: 0.95;570
transition-delay: 0.6s;571
}572
.tooltip::after {573
display: flex;574
opacity: 0;575
content: attr(data-title);576
justify-content: center;577
align-items: center;578
position: absolute;579
background: #24292E;580
color: white;581
min-height: 24px;582
padding: 0 12px;583
border-radius: 999px;584
font-size: 12px;585
top: auto;586
bottom: -64%;587
white-space: nowrap;588
z-index: 9999;589
pointer-events: none;590
}1
*{margin:0;padding:0;font-family:Roboto,sans-serif;box-sizing:border-box}:focus,:hover{outline:0}html{position:relative;overflow-x:hidden;min-height:100vh}body{width:100%;font-size:14px;min-height:100vh}img{pointer-events:none;user-select:none}input{-webkit-appearance:none}button{user-select:none;cursor:pointer}.hidden{display:none!important}.ico{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:'liga';user-select:none;pointer-events:none}*{-webkit-tap-highlight-color:transparent}body,html{overflow:hidden}.wrapper{position:fixed;top:0;left:0;right:0;bottom:0;background:#fff;z-index:999}.header-list{width:100%;height:60px;background:#fff;border-bottom:1px solid #F1F1F1;display:flex;flex-direction:column;pointer-events:all}.header-list .sidebar{justify-content:flex-end!important}.header-list .mainbar,.header-list .sidebar{width:100%;display:flex;justify-content:space-between;padding:8px 14px;min-height:60px;height:60px}.header-list .mainbar.inactive .action-item,.header-list .mainbar.inactive .option-item,.header-list .mainbar.inactive .tool-item,.header-list .sidebar.inactive .action-item,.header-list .sidebar.inactive .option-item,.header-list .sidebar.inactive .tool-item{pointer-events:none!important}.header-list .mainbar .action ul,.header-list .mainbar .option ul,.header-list .mainbar .tool ul,.header-list .sidebar .action ul,.header-list .sidebar .option ul,.header-list .sidebar .tool ul{list-style-type:none;display:flex;gap:10px}.header-list .mainbar .action ul li,.header-list .mainbar .option ul li,.header-list .mainbar .tool ul li,.header-list .sidebar .action ul li,.header-list .sidebar .option ul li,.header-list .sidebar .tool ul li{width:44px;height:44px;padding:10px;border-radius:22px;cursor:pointer;pointer-events:all}.header-list .mainbar .action ul li:not(.inactive):not(.active):hover,.header-list .mainbar .option ul li:not(.inactive):not(.active):hover,.header-list .mainbar .tool ul li:not(.inactive):not(.active):hover,.header-list .sidebar .action ul li:not(.inactive):not(.active):hover,.header-list .sidebar .option ul li:not(.inactive):not(.active):hover,.header-list .sidebar .tool ul li:not(.inactive):not(.active):hover{background:rgba(250,250,250,.95)}.header-list .mainbar .action ul li:not(.inactive):not(.active):hover.ripple.ripple-active,.header-list .mainbar .option ul li:not(.inactive):not(.active):hover.ripple.ripple-active,.header-list .mainbar .tool ul li:not(.inactive):not(.active):hover.ripple.ripple-active,.header-list .sidebar .action ul li:not(.inactive):not(.active):hover.ripple.ripple-active,.header-list .sidebar .option ul li:not(.inactive):not(.active):hover.ripple.ripple-active,.header-list .sidebar .tool ul li:not(.inactive):not(.active):hover.ripple.ripple-active{background:rgba(245,245,245,.95)}.header-list .mainbar .action ul li.active,.header-list .mainbar .option ul li.active,.header-list .mainbar .tool ul li.active,.header-list .sidebar .action ul li.active,.header-list .sidebar .option ul li.active,.header-list .sidebar .tool ul li.active{background:rgba(238,238,238,.95)}.header-list .mainbar .action ul li.active.ripple.ripple-active,.header-list .mainbar .option ul li.active.ripple.ripple-active,.header-list .mainbar .tool ul li.active.ripple.ripple-active,.header-list .sidebar .action ul li.active.ripple.ripple-active,.header-list .sidebar .option ul li.active.ripple.ripple-active,.header-list .sidebar .tool ul li.active.ripple.ripple-active{background:rgba(233,233,233,.95)}.header-list .mainbar .action ul li.inactive i.ico,.header-list .mainbar .option ul li.inactive i.ico,.header-list .mainbar .tool ul li.inactive i.ico,.header-list .sidebar .action ul li.inactive i.ico,.header-list .sidebar .option ul li.inactive i.ico,.header-list .sidebar .tool ul li.inactive i.ico{color:#E0E0E0}.header-list .mainbar .action ul li i.ico,.header-list .mainbar .option ul li i.ico,.header-list .mainbar .tool ul li i.ico,.header-list .sidebar .action ul li i.ico,.header-list .sidebar .option ul li i.ico,.header-list .sidebar .tool ul li i.ico{color:#555}#canvas,#overlay,.controls{position:fixed;top:0;left:0;right:0;bottom:0}#overlay{pointer-events:none}.badge{display:inline-block;margin-top:-1px;margin-left:5px;padding:2px 4px;border-radius:2px;font-weight:500;font-size:12px;color:#fff!important}.badge.prime{background:#0372EF}.badge.beta{background:#388E3C}.button{display:block;height:44px;padding:0 22px;border:none;border-radius:4px;background:#F5F5F5;color:#24292E;font-size:16px}.button:hover.ripple-active{background:#f0f0f0}.button.outline{border:1px solid #F1F1F1;background:0 0}.button.outline:hover.ripple-active{background:#fafafa}.button.prime{background:#0372EF;color:#fff}.button.prime:hover.ripple-active{background:#036de5}.button.danger{background:#E53935;color:#fff}.button.danger:hover.ripple-active{background:#e4302c}.controls{pointer-events:none}.controls .notification{top:90px;position:fixed;display:flex;justify-content:center;width:100%;opacity:0}.controls .notification p{display:inline-block;padding:10px 24px;border-radius:999px;background:#24292E;color:#fff;opacity:.95;user-select:none;pointer-events:none}.controls .hotbar{display:flex;position:fixed;left:calc(50% - 216px);bottom:30px;z-index:-1}.controls .hotbar.inactive .color{pointer-events:none!important}.controls .hotbar .color{margin:6px;width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9);pointer-events:all}.controls .hotbar .color:not(.active):hover{transform:scale(1)}.controls .hotbar .color.focus{transform:scale(1)}.controls .hotbar .color.active{transform:scale(1.1)}.controls .pencil-modal{top:75px;left:120px}.controls .scale-modal{top:75px;left:70px;width:400px;height:60px}.controls .scale-modal input[type=range]{-webkit-appearance:none;width:calc(400px - 54px);margin-top:21px;margin-left:27px;height:6px;background:#EEE;border:none;border-radius:4px}.controls .scale-modal input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}.controls .scale-modal input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:20px;width:20px;margin-top:0;background:#9E9E9E;border-radius:10px;cursor:pointer}.controls .scale-modal input[type=range]::-webkit-slider-thumb:hover{background:#757575}.controls .clear-modal{top:calc(50% - 75.5px - 30px);left:calc(50% - 175px);width:350px;padding:25px;display:flex;flex-direction:column}.controls .clear-modal .info{width:100%;font-size:20px;text-align:center;margin-bottom:25px;color:#24292E;user-select:none}.controls .clear-modal .align{display:flex;gap:15px}.controls .clear-modal .align .btn-cancel{width:50%;height:48px;border:none;border-radius:3px;font-size:17px}.controls .clear-modal .align .btn-apply{width:50%;height:48px;border:none;border-radius:3px;border-color:grey;font-size:17px}.controls .colors-modal{flex-wrap:wrap;min-width:418px;width:418px;max-width:418px;padding:30px!important;top:75px;left:15px;display:flex;gap:12px;max-height:calc(100vh - 90px);overflow-y:auto}.controls .colors-modal::-webkit-scrollbar{width:8px}.controls .colors-modal::-webkit-scrollbar-thumb{width:8px;background:#F1F1F1}.controls .colors-modal::-webkit-scrollbar-thumb:hover{background:#E0E0E0}.controls .colors-modal .color{width:60px;height:60px;border-radius:30px;background:#EEE;cursor:pointer;transition:transform .2s;transform:scale(.9)}.controls .colors-modal .color:not(.active):hover{transform:scale(1)}.controls .colors-modal .color.active{transform:scale(1.1)}.controls .colors-modal .color.focus{transform:scale(1)}.controls .multiplayer-modal{top:75px;right:120px}.controls .account-modal{top:75px;right:70px}.controls .more-modal{top:75px;right:15px}.modal{width:250px;position:fixed;background:#fff;border:1px solid #F1F1F1;border-radius:4px;padding:6px 0;pointer-events:all;overflow:hidden;z-index:-1;display:flex}.modal .main{width:248px;min-width:248px;7max-width:248px}.modal ul.tab-list{width:248px;min-width:248px;max-width:248px}.modal .header{display:flex;margin-bottom:3px}.modal .header .back{margin:10px;margin-top:15px;margin-right:3px;width:36px;height:36px;border-radius:18px;padding:6px;padding-left:5px;cursor:pointer}.modal .header .back i.ico{color:#424242}.modal .header .back:hover{background:#FAFAFA}.modal .header .back.ripple.ripple-active{background:#f5f5f5}.modal .header .info{display:flex;flex-direction:column;margin-top:15px}.modal .header .info p{display:flex;align-items:center;font-weight:500;color:#555;user-select:none;pointer-events:none}.modal .header .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list .separator{margin:6px 0;width:100%;height:1px;background:#F1F1F1}.modal ul.item-list li.caption{padding:2px 15px;padding-top:12px;list-style:none}.modal ul.item-list li.caption p{color:#9E9E9E;user-select:none;pointer-events:none}.modal ul.item-list li.item{display:flex;align-items:center;padding:15px;cursor:pointer}.modal ul.item-list li.item.empty p{display:block;width:100%;color:#9E9E9E;text-align:center;user-select:none;pointer-events:none}.modal ul.item-list li.item:not(.active):not(.inactive):hover{background:#FAFAFA}.modal ul.item-list li.item:not(.active):not(.inactive).ripple.ripple-active{background:#f5f5f5}.modal ul.item-list li.item i.ico{color:#555;user-select:none;pointer-events:none}.modal ul.item-list li.item i.lang{display:flex;justify-content:center;align-items:center;font-style:normal;font-weight:600;width:24px;height:24px;color:#555;user-select:none;pointer-events:none}.modal ul.item-list li.item .info{display:flex;flex-direction:column;margin-left:10px;max-width:calc(100% - 24px - 10px)}.modal ul.item-list li.item .info p{display:flex;align-items:center;font-weight:500;color:#555;user-select:none;pointer-events:none}.modal ul.item-list li.item .info span{display:block;margin-top:3px;font-size:12px;color:#9E9E9E;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.modal ul.item-list li.item.active{background:#EEE}.modal ul.item-list li.item.active.ripple.ripple-active{background:#e9e9e9}.modal ul.item-list li.item.inactive i.ico{color:#E0E0E0}.modal ul.item-list li.item.inactive .info p{color:#9E9E9E}.modal ul.item-list li.item.inactive .info span{color:#9E9E9E}.tooltip{position:relative;display:flex;justify-content:center;align-items:center}.tooltip:hover::before{opacity:.95;transition-delay:.6s}.tooltip:hover::after{opacity:.95;transition-delay:.6s}.tooltip::after{display:flex;opacity:0;content:attr(data-title);justify-content:center;align-items:center;position:absolute;background:#24292E;color:#fff;min-height:24px;padding:0 12px;border-radius:999px;font-size:12px;top:auto;bottom:-64%;white-space:nowrap;z-index:9999;pointer-events:none}1
\ No newline at end of file
26
<p class="content"></p>27
</div>28
<div class="header-list">29
<div class="tool">30
<ul class="tool-list">31
<li class="tool-item ripple tooltip" data-lang="tool.colors" data-type="tooltip" data-title="Colors" data-event="toggle.modal" data-code="colors">32
<i class="ico">palette</i>33
</li>34
<li class="tool-item ripple tooltip" data-lang="tool.scale" data-type="tooltip" data-title="Scale" data-event="toggle.modal" data-code="scale">35
<i class="ico">bubble_chart</i>36
</li>37
<li class="tool-item ripple tooltip" data-lang="tool.pencil" data-type="tooltip" data-title="Pencil" data-event="toggle.modal" data-code="pencil">38
<i class="ico">edit</i>39
</li>40
<ul>41
</div>42
<div class="action">43
<ul class="action-list">44
<li class="action-item ripple tooltip inactive" data-lang="tool.undo" data-type="tooltip" data-title="Undo">45
<i class="ico">undo</i>46
</li>47
<li class="tool-item ripple tooltip inactive" data-lang="tool.redo" data-type="tooltip" data-title="Redo">48
<i class="ico">redo</i>49
</li>50
<li class="tool-item ripple tooltip" data-lang="tool.clear" data-type="tooltip" data-title="Clear" data-event="toggle.modal" data-code="clear">51
<i class="ico">clear</i>52
</li>53
<li class="tool-item ripple tooltip" data-lang="tool.capture" data-type="tooltip" data-title="Capture" data-event="toggle.modal" data-code="capture">54
<i class="ico">crop_free</i>55
</li>56
<ul>29
<div class="mainbar">30
<div class="tool">31
<ul class="tool-list">32
<li class="tool-item ripple tooltip" data-lang="tool.colors" data-type="tooltip" data-title="Colors" data-event="toggle.modal" data-code="colors">33
<i class="ico">palette</i>34
</li>35
<li class="tool-item ripple tooltip" data-lang="tool.scale" data-type="tooltip" data-title="Scale" data-event="toggle.modal" data-code="scale">36
<i class="ico">bubble_chart</i>37
</li>38
<li class="tool-item ripple tooltip" data-lang="tool.pencil" data-type="tooltip" data-title="Pencil" data-event="toggle.modal" data-code="pencil">39
<i class="ico">edit</i>40
</li>41
<ul>42
</div>43
<div class="action">44
<ul class="action-list">45
<li class="action-item ripple tooltip inactive" data-lang="action.undo" data-type="tooltip" data-title="Undo">46
<i class="ico">undo</i>47
</li>48
<li class="action-item ripple tooltip inactive" data-lang="action.redo" data-type="tooltip" data-title="Redo">49
<i class="ico">redo</i>50
</li>51
<li class="action-item ripple tooltip" data-lang="action.clear" data-type="tooltip" data-title="Clear" data-event="toggle.modal" data-code="clear">52
<i class="ico">clear</i>53
</li>54
<ul>55
</div>56
<div class="option">57
<ul class="option-list">58
<li class="option-item ripple tooltip" data-lang="option.multiplayer" data-type="tooltip" data-title="Multiplayer" data-event="toggle.modal" data-code="multiplayer">59
<i class="ico">dns</i>60
</li>61
<li class="option-item ripple tooltip" data-lang="option.account" data-type="tooltip" data-title="Account" data-event="toggle.modal" data-code="account">62
<i class="ico">person</i>63
</li>64
<li class="option-item ripple tooltip" data-lang="option.more" data-type="tooltip" data-title="More" data-event="toggle.modal" data-code="more">65
<i class="ico">more_vert</i>66
</li>67
</ul>68
</div>69
</div>58
<div class="option">59
<ul class="option-list">60
<li class="option-item ripple tooltip" data-lang="action.multiplayer" data-type="tooltip" data-title="Multiplayer" data-event="toggle.modal" data-code="multiplayer">61
<i class="ico">dns</i>62
</li>63
<li class="tool-item ripple tooltip" data-lang="action.account" data-type="tooltip" data-title="Account" data-event="toggle.modal" data-code="account">64
<i class="ico">person</i>65
</li>66
<li class="tool-item ripple tooltip" data-lang="action.more" data-type="tooltip" data-title="More" data-event="toggle.modal" data-code="more">67
<i class="ico">more_vert</i>68
</li>69
<ul>70
<div class="sidebar hidden">71
<div class="option">72
<ul class="option-list">73
<li class="option-item ripple tooltip" data-lang="option.edit-mode" data-type="tooltip" data-title="Edit Mode" data-event="close.view-mode">74
<i class="ico">expand_more</i>75
</li>76
</ul>77
</div>78
</div>79
</div>80
<div class="hotbar">
185
<button class="btn btn-apply button danger ripple" data-event="clear" data-lang="modal.clear.action.apply">Yes</button>186
</div>187
</div>180
<div class="modal capture-modal hidden">181
<p class="info" data-lang="modal.capture.info">Do you want to save this screen?</p>182
<div class="preview"></div>183
<div class="align">184
<button class="btn btn-cancel button ripple " data-event="close.modal" data-lang="modal.capture.action.cancel">No</button>185
<button class="btn btn-apply button prime ripple" data-lang="modal.capture.action.apply">Yes</button>186
</div>187
</div>188
<div class="modal multiplayer-modal hidden">189
<div class="main">190
<ul class="item-list">
102
});103
active = true;104
state.redo_history = [];105
draw_curve(g, state, point_list);106
}108
function on_move(event, state) {
117
}118
}119
function on_release(event, state) {120
function on_release(event, state, undrag) {121
if(active) {121
if(event && event.type === 'pointerup') {122
if((event && event.type === 'pointerup') || undrag) {123
active = false;124
}125
if(point_list.length > 0) {
164
function draw_curve(g, state, point_list) {165
if(state.pencil === 'pen') {166
g.strokeStyle = COLORS[state.color];167
g.fillStyle = COLORS[state.color];168
}169
if(state.pencil === 'marker') {170
g.strokeStyle = COLORS[state.color] + '88';171
g.fillStyle = COLORS[state.color] + '88';172
}173
if(state.pencil === 'eraser') {174
g.strokeStyle = 'white';175
g.fillStyle = 'white';176
}177
g.lineCap = 'round';178
g.lineJoin = 'round';179
g.lineWidth = 2 * state.radius;180
if(point_list.length < 3) {177
g.fillStyle = COLORS[state.color];181
g.beginPath();182
g.arc(point_list[0].x, point_list[0].y, g.lineWidth / 2, 0, Math.PI * 2, !0);183
g.closePath();
56
'#141414'57
];59
export { COLORS };59
const PRIORITY_MODAL = [60
'clear'61
];63
export { COLORS, PRIORITY_MODAL };
1
import { COLORS } from './constant.js';1
import { COLORS, PRIORITY_MODAL } from './constant.js';2
import { uuid, query, prevent } from './util.js';4
// addons
68
pencil_tool: '.tool-item[data-code="pencil"]',69
option_event_fullscreen: '[data-event="toggle.fullscreen"]',70
option_event_view_mode: '[data-event="toggle.view-mode"]',71
undo_tool: '[data-lang="tool.undo"]',72
redo_tool: '[data-lang="tool.redo"]'71
undo_tool: '[data-lang="action.undo"]',72
redo_tool: '[data-lang="action.redo"]',73
colors_modal: '.colors-modal',74
mainbar: '.mainbar',75
sidebar: '.sidebar',76
edit_mode: '[data-event="close.view-mode"]'77
});79
fill_hotbar_list();
115
}116
}, { passive: false });117
document.addEventListener('touchmove', function(event) {114
if(event.target !== node.scale_input) {118
if(event.target !== node.scale_input && event.target !== node.colors_modal && !node.modal_color_list.includes(event.target)) {119
event.preventDefault();120
}121
}, { passive: false });
236
canvas.redo(state);237
update_undo_and_redo();238
});239
node.edit_mode.addEventListener('click', function(event) {240
state.option.view_mode = false;241
update_view_mode_option();242
});243
}245
function update_language_list() {
297
state.tab = null;298
update_tab_list();299
if(state.modal) {300
canvas.on_release(event, state, true);301
let modal = document.querySelector(`.modal.${state.modal}-modal`);302
let button = document.querySelector(`[data-event*=".modal"][data-code="${state.modal}"]`);303
if(modal) {
367
duration: 250,368
fill: 'both'369
});361
node.header.animate([362
{ opacity: 1 },363
{ opacity: 0 }370
node.mainbar.animate([371
{ opacity: 1, marginTop: 0 },372
{ opacity: 0, marginTop: '-60px' }373
], {374
easing: 'ease-out',375
duration: 250,376
fill: 'both'377
});378
node.sidebar.classList.remove('hidden');379
node.sidebar.animate([380
{ opacity: 0 },381
{ opacity: 1 }382
], {383
delay: 250,384
easing: 'ease-out',385
duration: 250,386
fill: 'both'387
});388
}389
else {390
canvas.get_canvas().style.cursor = 'none';
398
duration: 250,399
fill: 'both'400
});382
node.header.animate([383
{ opacity: 0 },384
{ opacity: 1 }401
node.mainbar.animate([402
{ opacity: 0, marginTop: '-60px' },403
{ opacity: 1, marginTop: 0 }404
], {405
easing: 'ease-out',406
duration: 250,407
fill: 'both'408
});409
node.sidebar.classList.add('hidden');410
}411
}
441
// drawing442
if(!state.option.view_mode && state.device === event.pointerType) {443
if(event.target === canvas.get_canvas()) {424
update_focus(false);425
canvas.on_press(event, state);426
update_undo_and_redo();427
state.point = {428
x: event.layerX,429
y: event.layerY430
};431
canvas.draw_cursor(state);444
if(!PRIORITY_MODAL.includes(state.modal)) {445
update_focus(false);446
canvas.on_press(event, state);447
update_undo_and_redo();448
state.point = {449
x: event.layerX,450
y: event.layerY451
};452
canvas.draw_cursor(state);453
}454
}455
}456
}
471
// drawing472
if(!state.option.view_mode && state.device === event.pointerType) {473
if(event.target === canvas.get_canvas()) {452
canvas.on_move(event, state);474
if(!PRIORITY_MODAL.includes(state.modal)) {475
canvas.on_move(event, state);476
}477
state.point = {478
x: event.layerX,479
y: event.layerY480
};457
canvas.draw_cursor(state);481
}482
else {483
state.point = {484
x: null,485
y: null486
};487
}488
canvas.draw_cursor(state);489
}490
}492
function on_pointerup(event) {493
if(!state.option.view_mode && state.device === event.pointerType) {464
canvas.on_release(event, state);465
update_undo_and_redo();466
canvas.draw_cursor(state);467
update_focus(true);494
if(!PRIORITY_MODAL.includes(state.modal)) {495
canvas.on_release(event, state);496
update_undo_and_redo();497
update_focus(true);498
}499
}500
}502
function on_pointerout(event) {503
if(!state.option.view_mode && state.device === event.pointerType) {473
canvas.on_release(event, state);474
update_undo_and_redo();475
state.point = null;476
canvas.draw_cursor(state);504
if(!PRIORITY_MODAL.includes(state.modal)) {505
canvas.on_release(event, state);506
update_undo_and_redo();507
state.point = null;508
canvas.draw_cursor(state);509
}510
}511
}
540
}541
}542
}510
if(event.code === 'KeyC') {543
if(event.code === 'KeyZ') {544
state.modal = state.modal !== 'colors' ? 'colors' : null;545
update_modal_list();546
}514
if(event.code === 'KeyS') {547
if(event.code === 'KeyX') {548
state.modal = state.modal !== 'scale' ? 'scale' : null;549
update_modal_list();550
}518
if(event.code === 'KeyE') {551
if(event.code === 'KeyC') {552
state.modal = state.modal !== 'pencil' ? 'pencil' : null;553
update_modal_list();554
}522
if(event.code === 'KeyD') {555
if(event.code === 'KeyV') {556
state.modal = state.modal !== 'clear' ? 'clear' : null;557
update_modal_list();558
}526
if(event.code === 'KeyQ') {527
state.modal = state.modal !== 'capture' ? 'capture' : null;528
update_modal_list();529
}530
}531
if(event.code === 'KeyV') {532
state.option.view_mode = !state.option.view_mode;533
update_view_mode_option();534
}535
if(event.code === 'ArrowLeft') {536
canvas.undo(state);537
update_undo_and_redo();538
}539
if(event.code === 'ArrowRight') {540
canvas.redo(state);541
update_undo_and_redo();542
}543
}544
// alt545
if(event.altKey && !event.ctrlKey && !event.shiftKey) {546
if(!state.option.view_mode) {547
if(!lock) {548
if(event.code.startsWith('Digit')) {549
let i = parseInt(event.code.substr(5)) - 1;550
if(i >= 0 && i < state.pencil_list.length) {551
canvas.on_release(event, state);552
state.pencil = state.pencil_list[i];553
canvas.draw_cursor(state);554
update_pencil_list();555
}556
}557
}558
if(event.code === 'KeyM') {559
if(event.code === 'KeyB') {560
state.modal = state.modal !== 'multiplayer' ? 'multiplayer' : null;561
update_modal_list();562
}562
if(event.code === 'KeyP') {563
if(event.code === 'KeyN') {564
state.modal = state.modal !== 'account' ? 'account' : null;565
update_modal_list();566
}566
if(event.code === 'KeyS') {567
if(event.code === 'KeyM') {568
state.modal = state.modal !== 'more' ? 'more' : null;569
update_modal_list();570
}570
if(event.code === 'KeyH') {571
if(state.tab !== 'help') {572
state.modal = 'more';573
update_modal_list();574
state.tab = 'help';575
update_tab_list();576
}577
else {578
state.modal = null;579
update_modal_list();580
}571
if(event.code === 'ArrowLeft') {572
canvas.undo(state);573
update_undo_and_redo();574
}582
if(event.code === 'KeyL') {583
if(state.tab !== 'language') {584
state.modal = 'more';585
update_modal_list();586
state.tab = 'language';587
update_tab_list();588
}589
else {590
state.modal = null;591
update_modal_list();592
}575
if(event.code === 'ArrowRight') {576
canvas.redo(state);577
update_undo_and_redo();578
}594
if(event.code === 'KeyI') {595
if(state.tab !== 'device') {596
state.modal = 'more';597
update_modal_list();598
state.tab = 'device';599
update_tab_list();600
}601
else {602
state.modal = null;603
update_modal_list();604
}579
if(event.code === 'KeyQ') {580
canvas.on_release(event, state);581
state.pencil = state.pencil_list[0];582
canvas.draw_cursor(state);583
update_pencil_list();584
}606
if(event.code === 'KeyA') {607
if(state.tab !== 'appearance') {608
state.modal = 'more';609
update_modal_list();610
state.tab = 'appearance';611
update_tab_list();612
}613
else {614
state.modal = null;615
update_modal_list();616
}585
if(event.code === 'KeyW') {586
canvas.on_release(event, state);587
state.pencil = state.pencil_list[1];588
canvas.draw_cursor(state);589
update_pencil_list();590
}591
if(event.code === 'KeyE') {592
canvas.on_release(event, state);593
state.pencil = state.pencil_list[2];594
canvas.draw_cursor(state);595
update_pencil_list();596
}597
}598
if(event.code === 'Space') {599
state.option.view_mode = !state.option.view_mode;600
update_view_mode_option();601
}602
}603
}
640
for(let [ i, item ] of Object.entries(node.modal_color_list)) {641
if(COLORS.length > i) {642
item.style.background = COLORS[i];660
item.addEventListener('pointerdown', function(event) {643
item.addEventListener('click', function(event) {644
canvas.on_release(event, state);645
state.color = i;646
state.modal = null;
675
fill: 'both'676
});677
}695
}, 2000);678
}, 1000);679
}
23
background: white;24
border-bottom: 1px solid @brand-grey-5;25
display: flex;26
justify-content: space-between;27
padding: 8px 14px;26
flex-direction: column;27
pointer-events: all;30
&.inactive {29
.sidebar {30
justify-content: flex-end !important;31
}33
.mainbar,34
.sidebar {35
width: 100%;36
display: flex;37
justify-content: space-between;38
padding: 8px 14px;39
min-height: 60px;40
height: 60px;32
.action-item,33
.tool-item,34
.option-item {35
pointer-events: none !important;42
&.inactive {44
.action-item,45
.tool-item,46
.option-item {47
pointer-events: none !important;48
}49
}37
}39
.tool,40
.action,41
.option {51
.tool,52
.action,53
.option {43
ul {44
list-style-type: none;45
display: flex;46
gap: 10px;55
ul {56
list-style-type: none;57
display: flex;58
gap: 10px;48
li {49
width: 44px;50
height: 44px;51
padding: 10px;52
border-radius: 22px;53
cursor: pointer;54
pointer-events: all;60
li {61
width: 44px;62
height: 44px;63
padding: 10px;64
border-radius: 22px;65
cursor: pointer;66
pointer-events: all;56
&:not(.inactive):not(.active):hover {57
background: rgba(@brand-grey-7, 0.95);68
&:not(.inactive):not(.active):hover {69
background: rgba(@brand-grey-7, 0.95);59
&.ripple {71
&.ripple {61
&.ripple-active {62
background: lighten(rgba(@brand-grey-7, 0.95), -2%);73
&.ripple-active {74
background: lighten(rgba(@brand-grey-7, 0.95), -2%);75
}76
}77
}65
}67
&.active {68
background: rgba(#EEEEEE, 0.95);79
&.active {80
background: rgba(#EEEEEE, 0.95);70
&.ripple {82
&.ripple {72
&.ripple-active {73
background: lighten(rgba(#EEEEEE, 0.95), -2%);84
&.ripple-active {85
background: lighten(rgba(#EEEEEE, 0.95), -2%);86
}87
}88
}76
}78
&.inactive {90
&.inactive {80
i.ico {81
color: @brand-grey-4;92
i.ico {93
color: @brand-grey-4;94
}95
}83
}85
i.ico {86
color: @brand-grey-1;97
i.ico {98
color: @brand-grey-1;99
}100
}101
}102
}
294
}296
.clear-modal {284
top: calc(50% - 75.5px);285
left: calc(50% - 200px);286
width: 400px;297
top: calc(50% - 75.5px - 30px);298
left: calc(50% - 175px);299
width: 350px;300
padding: 25px;301
display: flex;302
flex-direction: column;
313
.align {314
display: flex;302
gap: 25px;304
.btn-cancel {305
width: 185px;306
height: 50px;307
border: none;308
border-radius: 3px;309
font-size: 17px;310
}312
.btn-apply {313
width: 185px;314
height: 50px;315
border: none;316
border-radius: 3px;317
border-color: grey;318
font-size: 17px;319
}320
}321
}323
.capture-modal {324
top: calc(50% - 213px);325
left: calc(50% - 200px);326
width: 400px;327
display: flex;328
flex-direction: column;329
padding: 25px;331
.info {332
font-size: 20px;333
width: 100%;334
text-align: center;335
margin-bottom: 25px;336
color: @brand-black;337
user-select: none;338
}340
.preview {341
height: 250px;342
background: @brand-grey-6;343
border: 1px solid #f1f1f1;344
border-radius: 3px;345
margin-bottom: 25px;346
}348
.align {349
display: flex;350
gap: 25px;315
gap: 15px;317
.btn-cancel {353
width: 185px;354
height: 50px;318
width: 50%;319
height: 48px;320
border: none;321
border-radius: 3px;322
font-size: 17px;323
}325
.btn-apply {361
width: 185px;362
height: 50px;326
width: 50%;327
height: 48px;328
border: none;329
border-radius: 3px;330
border-color: grey;
336
.colors-modal {337
flex-wrap: wrap;373
min-width: 410px;374
width: 410px;375
max-width: 410px;338
min-width: 418px;339
width: 418px;340
max-width: 418px;341
padding: 30px !important;342
top: 75px;343
left: 15px;344
display: flex;345
gap: 12px;346
max-height: calc(100vh - 90px);347
overflow-y: auto;349
&::-webkit-scrollbar {350
width: 8px;351
}353
&::-webkit-scrollbar-thumb {354
width: 8px;355
background: @brand-grey-5;357
&:hover {358
background: @brand-grey-4;359
}360
}362
.color {363
width: 60px;
385
.multiplayer-modal {386
top: 75px;407
right: 130px;387
right: 120px;388
}390
.account-modal {391
top: 75px;412
right: 80px;392
right: 70px;393
}395
.more-modal {396
top: 75px;417
right: 20px;397
right: 15px;398
}399
}