App.scss 13.3 KB
Newer Older
Jiayi Zheng's avatar
Jiayi Zheng committed
1
@import './_variables.scss';
2

lain's avatar
lain committed
3
#app {
4
  min-height: 100vh;
5 6
  max-width: 100%;
  overflow: hidden;
lain's avatar
.  
lain committed
7 8
}

Tae Hoon's avatar
Tae Hoon committed
9 10 11 12 13 14 15 16 17 18
.app-bg-wrapper {
  position: fixed;
  z-index: -1;
  height: 100%;
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 0 50%;
}

19 20 21 22
i {
  user-select: none;
}

lain's avatar
.  
lain committed
23
h4 {
24
  margin: 0;
lain's avatar
.  
lain committed
25 26 27
}

#content {
28 29 30 31 32 33
  box-sizing: border-box;
  padding-top: 60px;
  margin: auto;
  min-height: 100vh;
  max-width: 980px;
  background-color: rgba(0,0,0,0.15);
34
  align-content: flex-start;
lain's avatar
.  
lain committed
35 36 37
}

.text-center {
38
  text-align: center;
lain's avatar
.  
lain committed
39 40 41
}

body {
42
  font-family: sans-serif;
HJ's avatar
HJ committed
43
  font-family: var(--interfaceFont, sans-serif);
44 45
  font-size: 14px;
  margin: 0;
HJ's avatar
HJ committed
46 47
  color: $fallback--text;
  color: var(--text, $fallback--text);
48 49
  max-width: 100vw;
  overflow-x: hidden;
lain's avatar
.  
lain committed
50 51 52
}

a {
53 54 55
  text-decoration: none;
  color: $fallback--link;
  color: var(--link, $fallback--link);
lain's avatar
.  
lain committed
56 57
}

HJ's avatar
HJ committed
58
button {
59
  user-select: none;
HJ's avatar
HJ committed
60 61 62 63
  color: $fallback--text;
  color: var(--btnText, $fallback--text);
  background-color: $fallback--fg;
  background-color: var(--btn, $fallback--fg);
64
  border: none;
65 66
  border-radius: $fallback--btnRadius;
  border-radius: var(--btnRadius, $fallback--btnRadius);
67
  cursor: pointer;
HJ's avatar
HJ committed
68
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 1), 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset;
69
  box-shadow: var(--buttonShadow);
70 71
  font-size: 14px;
  font-family: sans-serif;
HJ's avatar
HJ committed
72
  font-family: var(--interfaceFont, sans-serif);
73

HJ's avatar
HJ committed
74 75 76 77
  i[class*=icon-] {
    color: $fallback--text;
    color: var(--btnText, $fallback--text);
  }
78

HJ's avatar
HJ committed
79 80 81 82
  &::-moz-focus-inner {
    border: none;
  }

83 84
  &:hover {
    box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
85
    box-shadow: var(--buttonHoverShadow);
86
  }
87

HJ's avatar
HJ committed
88
  &:active {
HJ's avatar
HJ committed
89
    box-shadow: 0px 0px 4px 0px rgba(255, 255, 255, 0.3), 0px 1px 0px 0px rgba(0, 0, 0, 0.2) inset, 0px -1px 0px 0px rgba(255, 255, 255, 0.2) inset;
90
    box-shadow: var(--buttonPressedShadow);
HJ's avatar
HJ committed
91 92
  }

93 94 95 96 97 98 99 100 101 102 103
  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  &.pressed {
    color: $fallback--faint;
    color: var(--faint, $fallback--faint);
    background-color: $fallback--bg;
    background-color: var(--bg, $fallback--bg)
  }
hakui's avatar
hakui committed
104 105
}

106 107
label.select {
  padding: 0;
108

109 110 111
}

input, textarea, .select {
112
  border: none;
HJ's avatar
HJ committed
113 114
  border-radius: $fallback--inputRadius;
  border-radius: var(--inputRadius, $fallback--inputRadius);
HJ's avatar
HJ committed
115
  box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.2) inset, 0px -1px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px 0px 2px 0px rgba(0, 0, 0, 1) inset;
116
  box-shadow: var(--inputShadow);
HJ's avatar
HJ committed
117 118 119 120
  background-color: $fallback--fg;
  background-color: var(--input, $fallback--fg);
  color: $fallback--lightText;
  color: var(--inputText, $fallback--lightText);
121
  font-family: sans-serif;
HJ's avatar
HJ committed
122
  font-family: var(--inputFont, sans-serif);
123
  font-size: 14px;
HJ's avatar
HJ committed
124
  padding: 8px .5em;
125
  box-sizing: border-box;
126 127
  display: inline-block;
  position: relative;
HJ's avatar
HJ committed
128
  height: 28px;
129
  line-height: 16px;
HJ's avatar
HJ committed
130
  hyphens: none;
131

132 133 134 135 136
  &:disabled, &[disabled=disabled] {
    cursor: not-allowed;
    opacity: 0.5;
  }

137 138 139 140 141 142
  .icon-down-open {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 5px;
    height: 100%;
HJ's avatar
HJ committed
143 144
    color: $fallback--text;
    color: var(--text, $fallback--text);
HJ's avatar
HJ committed
145
    line-height: 28px;
146 147 148
    z-index: 0;
    pointer-events: none;
  }
149

150 151 152 153 154 155
  select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
HJ's avatar
HJ committed
156 157
    color: $fallback--text;
    color: var(--text, $fallback--text);
158
    margin: 0;
HJ's avatar
HJ committed
159 160 161 162
    padding: 0 2em 0 .2em;
    font-family: sans-serif;
    font-family: var(--inputFont, sans-serif);
    font-size: 14px;
163 164
    width: 100%;
    z-index: 1;
HJ's avatar
HJ committed
165
    height: 28px;
166
    line-height: 16px;
167
  }
168

HJ's avatar
HJ committed
169 170 171 172 173 174 175 176
  &[type=range] {
    background: none;
    border: none;
    margin: 0;
    box-shadow: none;
    flex: 1;
  }

177 178 179 180
  &[type=radio],
  &[type=checkbox] {
    display: none;
    &:checked + label::before {
HJ's avatar
HJ committed
181 182
      color: $fallback--text;
      color: var(--text, $fallback--text);
183
    }
184
    &:disabled {
185 186 187 188 189 190
      &,
      & + label,
      & + label::before {
        opacity: .5;
      }
    }
191 192 193 194 195 196
    + label::before {
      display: inline-block;
      content: '✔';
      transition: color 200ms;
      width: 1.1em;
      height: 1.1em;
HJ's avatar
HJ committed
197 198
      border-radius: $fallback--checkboxRadius;
      border-radius: var(--checkboxRadius, $fallback--checkboxRadius);
199
      box-shadow: 0px 0px 2px black inset;
200
      box-shadow: var(--inputShadow);
201
      margin-right: .5em;
HJ's avatar
HJ committed
202 203
      background-color: $fallback--fg;
      background-color: var(--input, $fallback--fg);
204
      vertical-align: top;
205 206 207 208 209 210
      text-align: center;
      line-height: 1.1em;
      font-size: 1.1em;
      box-sizing: border-box;
      color: transparent;
      overflow: hidden;
211
      box-sizing: border-box;
212 213 214 215
    }
  }
}

216
option {
HJ's avatar
HJ committed
217 218
  color: $fallback--text;
  color: var(--text, $fallback--text);
219 220 221 222
  background-color: $fallback--bg;
  background-color: var(--bg, $fallback--bg);
}

HJ's avatar
fixes  
HJ committed
223
i[class*=icon-] {
224 225
  color: $fallback--icon;
  color: var(--icon, $fallback--icon)
226 227 228
}


lain's avatar
.  
lain committed
229
.container {
230 231 232 233
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0 10px 0 10px;
lain's avatar
.  
lain committed
234 235 236
}

.item {
237
  flex: 1;
HJ's avatar
HJ committed
238 239
  line-height: 50px;
  height: 50px;
240
  overflow: hidden;
HJ's avatar
HJ committed
241 242
  display: flex;
  flex-wrap: wrap;
243

244 245 246
  .nav-icon {
    margin-left: 0.4em;
  }
lain's avatar
.  
lain committed
247

HJ's avatar
HJ committed
248
  &.right {
HJ's avatar
HJ committed
249
    justify-content: flex-end;
HJ's avatar
HJ committed
250
  }
lain's avatar
.  
lain committed
251 252 253
}

.auto-size {
254
  flex: 1
lain's avatar
.  
lain committed
255 256
}

257 258
.nav-bar {
  padding: 0;
259 260 261 262 263
  width: 100%;
  align-items: center;
  position: fixed;
  height: 50px;

264 265 266 267 268 269 270 271 272 273 274 275
  .logo {
    display: flex;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    align-items: stretch;
    justify-content: center;
    flex: 0 0 auto;
    z-index: -1;
276 277 278
    transition: opacity;
    transition-timing-function: ease-out;
    transition-duration: 100ms;
279

280 281 282 283 284
    .mask {
      mask-repeat: no-repeat;
      mask-position: center;
      mask-size: contain;
      background-color: $fallback--fg;
285
      background-color: var(--topBarText, $fallback--fg);
286 287 288 289 290 291
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
    }
292

293
    img {
294 295
      height: 100%;
      object-fit: contain;
296 297 298 299 300
      display: block;
      flex: 0;
    }
  }

301
  .inner-nav {
302 303 304 305
    margin: auto;
    box-sizing: border-box;
    padding-left: 10px;
    padding-right: 10px;
306
    display: flex;
lain's avatar
.  
lain committed
307
    align-items: center;
308
    flex-basis: 970px;
lain's avatar
.  
lain committed
309
    height: 50px;
310

HJ's avatar
HJ committed
311
    a, a i {
312
      color: $fallback--link;
HJ's avatar
HJ committed
313
      color: var(--topBarLink, $fallback--link);
314
    }
315
  }
lain's avatar
.  
lain committed
316 317 318
}

main-router {
319
  flex: 1;
lain's avatar
.  
lain committed
320 321 322
}

.status.compact {
323 324
  color: rgba(0, 0, 0, 0.42);
  font-weight: 300;
lain's avatar
.  
lain committed
325

326 327 328 329
  p {
    margin: 0;
    font-size: 0.8em
  }
lain's avatar
.  
lain committed
330 331 332 333 334
}

/* Panel */

.panel {
335
  display: flex;
336 337
  position: relative;

338 339
  flex-direction: column;
  margin: 0.5em;
lain's avatar
.  
lain committed
340

341 342
  background-color: $fallback--bg;
  background-color: var(--bg, $fallback--bg);
343

344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
  &::after, & {
    border-radius: $fallback--panelRadius;
    border-radius: var(--panelRadius, $fallback--panelRadius);
  }

  &::after {
    content: '';
    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    pointer-events: none;

    box-shadow: 1px 1px 4px rgba(0,0,0,.6);
    box-shadow: var(--panelShadow);
  }
363 364 365
}

.panel-body:empty::before {
366 367 368 369
  content: "¯\\_(ツ)_/¯"; // Could use words but it'd require translations
  display: block;
  margin: 1em;
  text-align: center;
lain's avatar
.  
lain committed
370 371 372
}

.panel-heading {
HJ's avatar
HJ committed
373
  display: flex;
374 375
  border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;
  border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;
376
  background-size: cover;
HJ's avatar
HJ committed
377
  padding: .6em .6em;
378
  text-align: left;
379
  line-height: 28px;
380
  color: var(--panelText);
HJ's avatar
HJ committed
381 382
  background-color: $fallback--fg;
  background-color: var(--panel, $fallback--fg);
HJ's avatar
HJ committed
383
  align-items: baseline;
384
  box-shadow: var(--panelHeaderShadow);
HJ's avatar
HJ committed
385 386 387

  .title {
    flex: 1 0 auto;
388 389 390
    font-size: 1.3em;
  }

HJ's avatar
HJ committed
391 392 393 394 395 396
  .faint {
    background-color: transparent;
    color: $fallback--faint;
    color: var(--panelFaint, $fallback--faint);
  }

397 398 399 400
  .alert {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-x: hidden;
HJ's avatar
HJ committed
401 402 403
  }

  button {
404 405 406 407 408 409 410 411 412 413 414 415
    flex-shrink: 0;
  }

  button, .alert {
    // height: 100%;
    line-height: 21px;
    min-height: 0;
    box-sizing: border-box;
    margin: 0;
    margin-left: .25em;
    min-width: 1px;
    align-self: stretch;
HJ's avatar
HJ committed
416
  }
417 418 419 420 421

  a {
    color: $fallback--link;
    color: var(--panelLink, $fallback--link)
  }
lain's avatar
.  
lain committed
422 423
}

424 425 426 427 428
.panel-heading.stub {
  border-radius: $fallback--panelRadius;
  border-radius: var(--panelRadius, $fallback--panelRadius);
}

lain's avatar
.  
lain committed
429
.panel-footer {
430 431
  border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;
  border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);
432

433 434 435 436 437 438

  .faint {
    color: $fallback--faint;
    color: var(--panelFaint, $fallback--faint);
  }

439 440 441 442
  a {
    color: $fallback--link;
    color: var(--panelLink, $fallback--link)
  }
lain's avatar
.  
lain committed
443 444 445
}

.panel-body > p {
446 447 448
  line-height: 18px;
  padding: 1em;
  margin: 0;
lain's avatar
.  
lain committed
449 450
}

lain's avatar
lain committed
451
.container > * {
452
  min-width: 0px;
lain's avatar
.  
lain committed
453 454 455
}

.fa {
456
  color: grey;
lain's avatar
.  
lain committed
457 458
}

lain's avatar
lain committed
459
nav {
460
  z-index: 1000;
461
  color: var(--topBarText);
HJ's avatar
HJ committed
462 463
  background-color: $fallback--fg;
  background-color: var(--topBar, $fallback--fg);
464 465 466
  color: $fallback--faint;
  color: var(--faint, $fallback--faint);
  box-shadow: 0px 0px 4px rgba(0,0,0,.6);
467
  box-shadow: var(--topBarShadow);
HJ's avatar
HJ committed
468 469 470 471 472 473 474 475 476 477 478 479 480 481

  .back-button {
    display: block;
    max-width: 99px;
    transition-property: opacity, max-width;
    transition-duration: 300ms;
    transition-timing-function: ease-out;

    i {
      margin: 0 1em;
    }

    &.hidden {
      opacity: 0;
482
      max-width: 5px;
HJ's avatar
HJ committed
483 484
    }
  }
lain's avatar
lain committed
485
}
lain's avatar
lain committed
486

487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504
.menu-button {
  display: none;
  position: relative;
}

.alert-dot {
  border-radius: 100%;
  height: 8px;
  width: 8px;
  position: absolute;
  left: calc(50% - 4px);
  top: calc(50% - 4px);
  margin-left: 6px;
  margin-top: -6px;
  background-color: $fallback--cRed;
  background-color: var(--badgeNotification, $fallback--cRed);
}

lain's avatar
lain committed
505 506 507 508 509 510
.fade-enter-active, .fade-leave-active {
  transition: opacity .2s
}
.fade-enter, .fade-leave-active {
  opacity: 0
}
lain's avatar
lain committed
511 512

.main {
Shpuld Shpludson's avatar
Shpuld Shpludson committed
513
  flex-basis: 50%;
514 515
  flex-grow: 1;
  flex-shrink: 1;
lain's avatar
lain committed
516
}
lain's avatar
lain committed
517

518
.sidebar-bounds {
519
  flex: 0;
520
  flex-basis: 35%;
lain's avatar
lain committed
521 522
}

523 524
.sidebar-flexer {
  flex: 1;
525
  flex-basis: 345px;
526 527 528
  width: 365px;
}

lain's avatar
lain committed
529
.mobile-shown {
530
  display: none;
lain's avatar
lain committed
531 532 533
}

.panel-switcher {
534 535 536
  display: none;
  width: 100%;
  height: 46px;
HJ's avatar
HJ committed
537

538 539 540 541 542 543 544
  button {
    display: block;
    flex: 1;
    max-height: 32px;
    margin: 0.5em;
    padding: 0.5em;
  }
lain's avatar
lain committed
545 546
}

Shpuld Shpludson's avatar
Shpuld Shpludson committed
547
@media all and (min-width: 800px) {
548 549 550
  body {
    overflow-y: scroll;
  }
HJ's avatar
HJ committed
551 552 553 554 555 556 557

  nav {
    .back-button {
      display: none;
    }
  }

558
  .sidebar-bounds {
559 560
    overflow: hidden;
    max-height: 100vh;
561
    width: 345px;
562 563 564
    position: fixed;
    margin-top: -10px;

565
    .sidebar-scroller {
566
      height: 96vh;
567
      width: 365px;
568
      padding-top: 10px;
569
      padding-right: 50px;
570
      overflow-x: hidden;
571
      overflow-y: scroll;
572
    }
573 574 575 576

    .sidebar {
      width: 345px;
    }
577 578 579
  }
  .sidebar-flexer {
    max-height: 96vh;
580 581
    flex-shrink: 0;
    flex-grow: 0;
582 583
  }
}
HJ's avatar
HJ committed
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604
.badge {
  display: inline-block;
  border-radius: 99px;
  min-width: 22px;
  max-width: 22px;
  min-height: 22px;
  max-height: 22px;
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  padding: 0;

  &.badge-notification {
    background-color: $fallback--cRed;
    background-color: var(--badgeNotification, $fallback--cRed);
    color: white;
    color: var(--badgeNotificationText, white);
  }
}
605

606 607 608 609 610 611 612 613 614
.alert {
  margin: 0.35em;
  padding: 0.25em;
  border-radius: $fallback--tooltipRadius;
  border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
  min-height: 28px;
  line-height: 28px;

  &.error {
HJ's avatar
updates  
HJ committed
615 616
    background-color: $fallback--alertError;
    background-color: var(--alertError, $fallback--alertError);
617 618 619 620 621 622 623
    color: $fallback--text;
    color: var(--alertErrorText, $fallback--text);

    .panel-heading & {
      color: $fallback--text;
      color: var(--alertErrorPanelText, $fallback--text);
    }
624 625 626
  }
}

627 628
.faint {
  color: $fallback--faint;
Shpuld Shpludson's avatar
Shpuld Shpludson committed
629
  color: var(--faint, $fallback--faint);
630
}
631 632 633 634 635 636 637 638 639 640

.faint-link {
  color: $fallback--faint;
  color: var(--faint, $fallback--faint);

  &:hover {
    text-decoration: underline;
  }
}

Shpuld Shpludson's avatar
Shpuld Shpludson committed
641
@media all and (min-width: 800px) {
642 643 644 645
  .logo {
    opacity: 1 !important;
  }
}
646

647 648
.item.right {
  text-align: right;
lain's avatar
lain committed
649
}
lain's avatar
lain committed
650

651 652 653 654 655 656
.visibility-tray {
  font-size: 1.2em;
  padding: 3px;
  cursor: pointer;

  .selected {
HJ's avatar
HJ committed
657 658
    color: $fallback--lightText;
    color: var(--lightText, $fallback--lightText);
659
  }
660

661 662 663
  div {
    padding-top: 5px;
  }
664 665 666 667 668 669 670 671 672
}

.visibility-notice {
  padding: .5em;
  border: 1px solid $fallback--faint;
  border: 1px solid var(--faint, $fallback--faint);
  border-radius: $fallback--inputRadius;
  border-radius: var(--inputRadius, $fallback--inputRadius);
}
673

674 675 676 677
.button-icon {
  font-size: 1.2em;
}

678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704
@keyframes shakeError {
  0% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(0.375rem);
  }
  30% {
    transform: translateX(-0.375rem);
  }
  45% {
    transform: translateX(0.375rem);
  }
  60% {
    transform: translateX(-0.375rem);
  }
  75% {
    transform: translateX(0.375rem);
  }
  90% {
    transform: translateX(-0.375rem);
  }
  100% {
    transform: translateX(0);
  }
}

Shpuld Shpludson's avatar
Shpuld Shpludson committed
705
@media all and (max-width: 800px) {
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721
  .mobile-hidden {
    display: none;
  }

  .panel-switcher {
    display: flex;
  }

  .container {
    padding: 0;
  }

  .panel {
    margin: 0.5em 0 0.5em 0;
  }

722 723 724 725
  .menu-button {
    display: block;
    margin-right: 0.8em;
  }
726
}
727 728 729

.login-hint {
  text-align: center;
730

731 732 733 734 735 736 737 738 739 740
  @media all and (min-width: 801px) {
    display: none;
  }

  a {
    display: inline-block;
    padding: 1em 0px;
    width: 100%;
  }
}
Edijs Bov's avatar
Edijs Bov committed
741 742 743 744

.btn.btn-default {
  min-height: 28px;
}