Skip to content
Snippets Groups Projects
App.scss 15.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • Jiayi Zheng's avatar
    Jiayi Zheng committed
    @import './_variables.scss';
    
    lain's avatar
    lain committed
    #app {
    
    lain's avatar
    .
    lain committed
    }
    
    
    Tae Hoon's avatar
    Tae Hoon committed
    .app-bg-wrapper {
      position: fixed;
      z-index: -1;
      height: 100%;
      width: 100%;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: 0 50%;
    }
    
    
    i {
      user-select: none;
    }
    
    
    lain's avatar
    .
    lain committed
    h4 {
    
    lain's avatar
    .
    lain committed
    }
    
    #content {
    
      box-sizing: border-box;
      padding-top: 60px;
      margin: auto;
      min-height: 100vh;
      max-width: 980px;
      background-color: rgba(0,0,0,0.15);
    
    lain's avatar
    .
    lain committed
    }
    
    .text-center {
    
    lain's avatar
    .
    lain committed
    }
    
    body {
    
    HJ's avatar
    HJ committed
      font-family: var(--interfaceFont, sans-serif);
    
    HJ's avatar
    HJ committed
      color: $fallback--text;
      color: var(--text, $fallback--text);
    
    lain's avatar
    .
    lain committed
    }
    
    a {
    
      text-decoration: none;
      color: $fallback--link;
      color: var(--link, $fallback--link);
    
    lain's avatar
    .
    lain committed
    }
    
    
    HJ's avatar
    HJ committed
    button {
    
    HJ's avatar
    HJ committed
      color: $fallback--text;
      color: var(--btnText, $fallback--text);
      background-color: $fallback--fg;
      background-color: var(--btn, $fallback--fg);
    
      border-radius: $fallback--btnRadius;
      border-radius: var(--btnRadius, $fallback--btnRadius);
    
    HJ's avatar
    HJ committed
      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;
    
      font-size: 14px;
      font-family: sans-serif;
    
    HJ's avatar
    HJ committed
      font-family: var(--interfaceFont, sans-serif);
    
    HJ's avatar
    HJ committed
      i[class*=icon-] {
        color: $fallback--text;
        color: var(--btnText, $fallback--text);
      }
    
    HJ's avatar
    HJ committed
      &::-moz-focus-inner {
        border: none;
      }
    
    
      &:hover {
        box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
    
        box-shadow: var(--buttonHoverShadow);
    
    HJ's avatar
    HJ committed
      &:active {
    
    HJ's avatar
    HJ committed
        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;
    
        box-shadow: var(--buttonPressedShadow);
    
    HJ's avatar
    HJ committed
      }
    
    
      &: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)
      }
    
    Eugenij's avatar
    Eugenij committed
    
      &.danger {
        // TODO: add better color variable
        color: $fallback--text;
        color: var(--alertErrorPanelText, $fallback--text);
        background-color: $fallback--alertError;
        background-color: var(--alertError, $fallback--alertError);
      }
    
    hakui's avatar
    hakui committed
    }
    
    
    HJ's avatar
    HJ committed
      border-radius: $fallback--inputRadius;
      border-radius: var(--inputRadius, $fallback--inputRadius);
    
    HJ's avatar
    HJ committed
      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;
    
    HJ's avatar
    HJ committed
      background-color: $fallback--fg;
      background-color: var(--input, $fallback--fg);
      color: $fallback--lightText;
      color: var(--inputText, $fallback--lightText);
    
      font-family: sans-serif;
    
    HJ's avatar
    HJ committed
      font-family: var(--inputFont, sans-serif);
    
    HJ's avatar
    HJ committed
      padding: 8px .5em;
    
      display: inline-block;
      position: relative;
    
    HJ's avatar
    HJ committed
      height: 28px;
    
    HJ's avatar
    HJ committed
      hyphens: none;
    
      &:disabled, &[disabled=disabled] {
        cursor: not-allowed;
        opacity: 0.5;
      }
    
    
      .icon-down-open {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 5px;
        height: 100%;
    
    HJ's avatar
    HJ committed
        color: $fallback--text;
        color: var(--text, $fallback--text);
    
    HJ's avatar
    HJ committed
        line-height: 28px;
    
      select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background: transparent;
        border: none;
    
    HJ's avatar
    HJ committed
        color: $fallback--text;
    
        color: var(--inputText, --text, $fallback--text);
    
    HJ's avatar
    HJ committed
        padding: 0 2em 0 .2em;
        font-family: sans-serif;
        font-family: var(--inputFont, sans-serif);
        font-size: 14px;
    
    HJ's avatar
    HJ committed
        height: 28px;
    
    HJ's avatar
    HJ committed
      &[type=range] {
        background: none;
        border: none;
        margin: 0;
        box-shadow: none;
        flex: 1;
      }
    
    
      &[type=radio],
      &[type=checkbox] {
        display: none;
        &:checked + label::before {
    
    HJ's avatar
    HJ committed
          color: $fallback--text;
          color: var(--text, $fallback--text);
    
        + label::before {
          display: inline-block;
          content: '✔';
          transition: color 200ms;
          width: 1.1em;
          height: 1.1em;
    
    HJ's avatar
    HJ committed
          border-radius: $fallback--checkboxRadius;
          border-radius: var(--checkboxRadius, $fallback--checkboxRadius);
    
          box-shadow: 0px 0px 2px black inset;
    
    HJ's avatar
    HJ committed
          background-color: $fallback--fg;
          background-color: var(--input, $fallback--fg);
    
          text-align: center;
          line-height: 1.1em;
          font-size: 1.1em;
          box-sizing: border-box;
          color: transparent;
          overflow: hidden;
    
    HJ's avatar
    HJ committed
      color: $fallback--text;
      color: var(--text, $fallback--text);
    
      background-color: $fallback--bg;
      background-color: var(--bg, $fallback--bg);
    }
    
    
    HJ's avatar
    HJ committed
    i[class*=icon-] {
    
      color: $fallback--icon;
      color: var(--icon, $fallback--icon)
    
    lain's avatar
    .
    lain committed
    .container {
    
      display: flex;
      flex-wrap: wrap;
      margin: 0;
      padding: 0 10px 0 10px;
    
    lain's avatar
    .
    lain committed
    }
    
    .item {
    
    HJ's avatar
    HJ committed
      line-height: 50px;
      height: 50px;
    
    HJ's avatar
    HJ committed
      display: flex;
      flex-wrap: wrap;
    
    lain's avatar
    .
    lain committed
    
    
    HJ's avatar
    HJ committed
      &.right {
    
    HJ's avatar
    HJ committed
        justify-content: flex-end;
    
    HJ's avatar
    HJ committed
      }
    
    lain's avatar
    .
    lain committed
    }
    
    .auto-size {
    
    lain's avatar
    .
    lain committed
    }
    
    
    .nav-bar {
      padding: 0;
    
      width: 100%;
      align-items: center;
      position: fixed;
      height: 50px;
    
    
      .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;
    
        transition: opacity;
        transition-timing-function: ease-out;
        transition-duration: 100ms;
    
        .mask {
          mask-repeat: no-repeat;
          mask-position: center;
          mask-size: contain;
          background-color: $fallback--fg;
    
          background-color: var(--topBarText, $fallback--fg);
    
          position: absolute;
          top: 0;
          bottom: 0;
          left: 0;
          right: 0;
        }
    
          height: 100%;
          object-fit: contain;
    
        margin: auto;
        box-sizing: border-box;
        padding-left: 10px;
        padding-right: 10px;
    
    lain's avatar
    .
    lain committed
        align-items: center;
    
    lain's avatar
    .
    lain committed
        height: 50px;
    
    HJ's avatar
    HJ committed
        a, a i {
    
    HJ's avatar
    HJ committed
          color: var(--topBarLink, $fallback--link);
    
    lain's avatar
    .
    lain committed
    }
    
    main-router {
    
    lain's avatar
    .
    lain committed
    }
    
    .status.compact {
    
      color: rgba(0, 0, 0, 0.42);
      font-weight: 300;
    
    lain's avatar
    .
    lain committed
    
    
    lain's avatar
    .
    lain committed
    }
    
    /* Panel */
    
    .panel {
    
      flex-direction: column;
      margin: 0.5em;
    
    lain's avatar
    .
    lain committed
    
    
      background-color: $fallback--bg;
      background-color: var(--bg, $fallback--bg);
    
      &::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);
      }
    
    }
    
    .panel-body:empty::before {
    
      content: "¯\\_(ツ)_/¯"; // Could use words but it'd require translations
      display: block;
      margin: 1em;
      text-align: center;
    
    lain's avatar
    .
    lain committed
    }
    
    .panel-heading {
    
    HJ's avatar
    HJ committed
      display: flex;
    
    Tae Hoon's avatar
    Tae Hoon committed
      flex: none;
    
      border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;
      border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;
    
    HJ's avatar
    HJ committed
      padding: .6em .6em;
    
      color: var(--panelText);
    
    HJ's avatar
    HJ committed
      background-color: $fallback--fg;
      background-color: var(--panel, $fallback--fg);
    
    HJ's avatar
    HJ committed
      align-items: baseline;
    
      box-shadow: var(--panelHeaderShadow);
    
    HJ's avatar
    HJ committed
    
      .title {
        flex: 1 0 auto;
    
    HJ's avatar
    HJ committed
      .faint {
        background-color: transparent;
        color: $fallback--faint;
        color: var(--panelFaint, $fallback--faint);
      }
    
    
      .alert {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow-x: hidden;
    
    HJ's avatar
    HJ committed
      }
    
      button {
    
        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
      }
    
    
      a {
        color: $fallback--link;
        color: var(--panelLink, $fallback--link)
      }
    
    lain's avatar
    .
    lain committed
    }
    
    
    .panel-heading.stub {
      border-radius: $fallback--panelRadius;
      border-radius: var(--panelRadius, $fallback--panelRadius);
    }
    
    
    lain's avatar
    .
    lain committed
    .panel-footer {
    
      border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;
      border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);
    
    
      .faint {
        color: $fallback--faint;
        color: var(--panelFaint, $fallback--faint);
      }
    
    
      a {
        color: $fallback--link;
        color: var(--panelLink, $fallback--link)
      }
    
    lain's avatar
    .
    lain committed
    }
    
    .panel-body > p {
    
      line-height: 18px;
      padding: 1em;
      margin: 0;
    
    lain's avatar
    .
    lain committed
    }
    
    
    lain's avatar
    lain committed
    .container > * {
    
    lain's avatar
    .
    lain committed
    }
    
    .fa {
    
    lain's avatar
    .
    lain committed
    }
    
    
    lain's avatar
    lain committed
    nav {
    
      color: var(--topBarText);
    
    HJ's avatar
    HJ committed
      background-color: $fallback--fg;
      background-color: var(--topBar, $fallback--fg);
    
      color: $fallback--faint;
      color: var(--faint, $fallback--faint);
      box-shadow: 0px 0px 4px rgba(0,0,0,.6);
    
      box-shadow: var(--topBarShadow);
    
    HJ's avatar
    HJ committed
    
      .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;
    
          max-width: 5px;
    
    HJ's avatar
    HJ committed
        }
      }
    
    lain's avatar
    lain committed
    }
    
    
    .fade-enter-active, .fade-leave-active {
      transition: opacity .2s
    }
    .fade-enter, .fade-leave-active {
      opacity: 0
    }
    
    lain's avatar
    lain committed
    
    .main {
    
      flex-basis: 50%;
    
    lain's avatar
    lain committed
    }
    
    lain's avatar
    lain committed
    .mobile-shown {
    
    @media all and (min-width: 800px) {
    
    HJ's avatar
    HJ committed
    
      nav {
        .back-button {
          display: none;
        }
      }
    
    
        flex-shrink: 0;
        flex-grow: 0;
    
    HJ's avatar
    HJ committed
    .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);
      }
    }
    
    .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
    HJ committed
        background-color: $fallback--alertError;
        background-color: var(--alertError, $fallback--alertError);
    
        color: $fallback--text;
        color: var(--alertErrorText, $fallback--text);
    
        .panel-heading & {
          color: $fallback--text;
          color: var(--alertErrorPanelText, $fallback--text);
        }
    
    .faint {
      color: $fallback--faint;
    
    Shpuld Shpludson's avatar
    Shpuld Shpludson committed
      color: var(--faint, $fallback--faint);
    
    
    .faint-link {
      color: $fallback--faint;
      color: var(--faint, $fallback--faint);
    
      &:hover {
        text-decoration: underline;
      }
    }
    
    
    @media all and (min-width: 800px) {
    
      .logo {
        opacity: 1 !important;
      }
    }
    
    .item.right {
      text-align: right;
    
    lain's avatar
    lain committed
    }
    
    lain's avatar
    lain committed
    
    
    .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);
    }
    
    .notice-dismissible {
      padding-right: 4rem;
      position: relative;
    
      .dismiss {
        position: absolute;
        top: 0;
        right: 0;
        padding: .5em;
        color: inherit;
      }
    }
    
    
    @keyframes modal-background-fadein {
      from {
        background-color: rgba(0, 0, 0, 0);
      }
      to {
        background-color: rgba(0, 0, 0, 0.5);
      }
    }
    
    .modal-view {
      z-index: 1000;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: auto;
      animation-duration: 0.2s;
      background-color: rgba(0, 0, 0, 0.5);
      animation-name: modal-background-fadein;
    }
    
    
    @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);
      }
    }
    
    
    @media all and (max-width: 800px) {
    
      .mobile-hidden {
        display: none;
      }
    
      .panel-switcher {
        display: flex;
      }
    
      .container {
        padding: 0;
      }
    
      .panel {
        margin: 0.5em 0 0.5em 0;
      }
    
    
      .menu-button {
        display: block;
        margin-right: 0.8em;
      }
    
    .setting-item {
      border-bottom: 2px solid var(--fg, $fallback--fg);
      margin: 1em 1em 1.4em;
      padding-bottom: 1.4em;
    
      > div {
        margin-bottom: .5em;
        &:last-child {
          margin-bottom: 0;
        }
      }
    
      &:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 1em;
      }
    
      select {
        min-width: 10em;
      }
    
    
      textarea {
        width: 100%;
        max-width: 100%;
        height: 100px;
      }
    
      .unavailable,
      .unavailable i {
        color: var(--cRed, $fallback--cRed);
        color: $fallback--cRed;
      }
    
      .btn {
        min-height: 28px;
        min-width: 10em;
        padding: 0 2em;
      }
    
      .number-input {
        max-width: 6em;
      }
    }
    .select-multiple {
      display: flex;
      .option-list {
        margin: 0;
        padding-left: .5em;
      }
    }
    .setting-list,
    .option-list{
      list-style-type: none;
      padding-left: 2em;
      li {
        margin-bottom: 0.5em;
      }
      .suboptions {
        margin-top: 0.3em
      }
    }
    
    
    .login-hint {
      text-align: center;
    
      @media all and (min-width: 801px) {
        display: none;
      }
    
      a {
        display: inline-block;
        padding: 1em 0px;
        width: 100%;
      }
    }
    
    Edijs Bov's avatar
    Edijs Bov committed
    
    .btn.btn-default {
      min-height: 28px;
    }
    
    
    .autocomplete {
      &-panel {
        position: relative;
    
        &-body {
          margin: 0 0.5em 0 0.5em;
          border-radius: $fallback--tooltipRadius;
          border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
          position: absolute;
          z-index: 1;
          box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
          // this doesn't match original but i don't care, making it uniform.
          box-shadow: var(--popupShadow);
          min-width: 75%;
          background: $fallback--bg;
          background: var(--bg, $fallback--bg);
          color: $fallback--lightText;
          color: var(--lightText, $fallback--lightText);
        }
      }
    
      &-item {
        cursor: pointer;
        padding: 0.2em 0.4em 0.2em 0.4em;
        border-bottom: 1px solid rgba(0, 0, 0, 0.4);
        display: flex;
    
        img {
          width: 24px;
          height: 24px;
          object-fit: contain;
        }
    
        span {
          line-height: 24px;
          margin: 0 0.1em 0 0.2em;
        }
    
        small {
          margin-left: .5em;
          color: $fallback--faint;
          color: var(--faint, $fallback--faint);
        }
    
        &.highlighted {
          background-color: $fallback--fg;
          background-color: var(--lightBg, $fallback--fg);
        }
      }
    
    Tae Hoon's avatar
    Tae Hoon committed
    }