hummingbird-me/kitsu-web

View on GitHub
app/styles/layout/_modals.scss

Summary

Maintainability
Test Coverage
// Yikes! This file needs a lot of cleaning! - Josh

#edit-profile-modal {
  .modal-header, .modal.body {
    padding: 0;
  }
  .modal-body {
    max-height: 405px;
    overflow: auto;
  }
  textarea {
    overflow: auto;
  }
  .alert {
    background: $divider-color;
    padding: 5px;
    width: 100%;
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
  }
}

.modal-header {
  &.modal-header-navbar {
    border-bottom: none;

    .cover-nav {
      margin-bottom: 0;
    }
  }
  .close {
    opacity: 0.5;

    &:hover {
      opacity: 0.8;
    }
    text-shadow: 0 1px 0 $close-text-shadow;
  }
}

.modal-content {
  background-color: $background-color;
  border: none;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.30);
  .label {
    color: $body-text-color;
    font-size: 12px;
  }
  input, textarea, select {
    width: 100%;
    border: 1px solid $divider-color;
    padding: 10px;
    border-radius: 3px;
  }
  .input-group-btn > button {
    padding: 10px;
  }
}

.modal-backdrop {
  background-color: #000;
  &.in {
    opacity: 0.92;
    transition: opacity .45s linear;
  }
}

.modal-body {
  padding: 15px;
}

.modal-dialog {
  @media (max-width: 544px) {
    margin: 20px;
  }
}

.modal-wrapper {
  padding: 20px;
  padding-top: 5px;
  .form-group:last-child {
    margin-bottom: 0;
  }
  .form-toggle-field {
    margin-top: 0.5rem;
  }
}

.modal-overlay-button {
  position: absolute;
  top: 0px;
  left: 0px;
  background-color: rgba(0, 0, 0, 0.8);
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  text-align: center;
  color: #fff;
  .overlay-text {
    position: relative;
    display: block;
    height: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #FFF;
  }
  svg {
    fill: $white;
    width: 30px;
    height: 30px;
  }
  &:hover {
    background-color: rgba(0, 0, 0, 0.5);
  }
}

.modal-cover-photo {
  width: 100%;
  height: 165px;
  background-size: cover;
  position: relative;
}

.modal-avatar-wrapper {
  position: relative;
  display: inline-block;
  .modal-overlay-button {
    border-radius: 999em;
    border: 2px solid $background-color;
  }
  img {
    border: 2px solid $background-color;
  }
}

.modal-user-avatar {
  margin-top: -38px;
  margin-left: 15px;
  position: absolute;
  z-index: $zIndex--modal-user-avatar;
}

.edit-heading {
  margin-bottom: 15px;
}

.modal-content {
  background: $background-color;
}

.modal-header {
  background-color: $tertiary-background-color;
  border-bottom: none;
  @if $theme == 'kitsu-light' {
    border-bottom: 1px solid $divider-color;
  }
}

.modal-body {
  background-color: $background-color;
}

.modal-footer {
  text-align: left;
  border-top: none;
  @if $theme == 'kitsu-light' {
    border-top: 1px solid $divider-color;
  }
  background: $tertiary-background-color;
  padding: 20px;
  .link-note {
    float: left;
    font-size: 12px;
    width: 65%;
    margin-bottom: 0;
  }
}

// Onboarding modal-content
#auth-modal {
  .modal-body {
    padding: 0;
  }
  .modal-wrapper {
    padding: 30px;

    .auth-section {
      margin-bottom: 45px;
    }
  }
  @media (min-width: 544px) {
    .modal-dialog {
        max-width: 530px;
        margin: 30px auto;
    }
  }
}


// modal for media trailers
.trailer-modal {
  .modal-body {
    padding: 0;
  }
  .modal-dialog {
    border-radius: 3px;
    overflow: hidden;
  }
}

.modal--header-title {
  border-bottom: 1px solid $divider-color;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.review-modal {
  .modal-dialog {
    max-width: 750px;
  }
  img {
    border-radius: 3px;
  }
  textarea {
    max-height: 350px;
    overflow: auto !important;
  }
  h3 {
    margin-bottom: 15px;
  }
  .col-xs-4 {
    max-width: 225px;
    @media (max-width: 544px) {
      display: none;
    }
  }
  .rating-wrapper {
    display: inline-block;
    border: 1px solid #eee;
    padding: 0 10px;
    border-radius: 3px;
    padding-top: 5px;
    h6 {
      float: left;
      font-weight: normal;
      font-size: 12px;
      margin-bottom: 0;
      line-height: 29px;
      margin-right: 10px;
    }
    span {
      display: inline-block;
    }
  }
  .review--cta {
    margin-top: 25px;
  }
}

.reaction-modal {
  .modal.fade .modal-dialog {
    transform: translate(0, 0);
  }
  .modal-dialog {
    width: 390px;
    height: 390px;
    @media (min-width: 544px) {
      margin: 100px auto;
    }
  }
  .modal-content {
    @extend .animated;
    @extend .zoomIn;
    animation-duration: .3s;
    height: 100%;
    box-shadow: none;
    border-radius: 3px;
    overflow: visible !important;
  }
  .modal-body {
    height: 100%;
    padding: 0;
  }
  .reaction-poster {
    height: 100%;
    color: $body-secondary-text-color;
    background-size: 100%;
  }
  .reaction-loader {
    position: relative;
    top: 150px;
  }
  .reaction-content {
    width: 360px;
    position: absolute;
    bottom: 50px;
    textarea {
      font-size: 15px;
    }
  }
  .reaction-overlay {
    height: 100%;
    padding: 20px;
    background-image: linear-gradient(to bottom,transparent 0,rgba(0,0,0,.7) 50%,#000 100%);
  }
  .reaction-delete-button {
    float: left;
    bottom: 10px;
    position: fixed;
    svg {
      width: 20px;
      height: 20px;
      fill: $red;
    }
  }
  .reaction-edit-warning {
    font-style: italic;
  }
  .reaction-header {
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255,255,255,.2);
    .reaction-media-info {
      font-size: 14px;
    }
    .reaction-media-title {
      font-weight: 300;
      color: #ccc;
    }
    .reaction-media-remaining {
      float: right;
      font-size: 13px;
      line-height: 28px;
      &.is-invalid {
        color: #e74c3c;
      }
    }
  }
  textarea {
    min-height: 70px;
    padding: 0;
    padding-top: 15px;
    resize: none;
    background-color: transparent;
    color: white;
    border: 0;
  }
  button {
    width: 106px;
    height: 106px;
    position: fixed;
    bottom: -50px;
    right: 0;
    border-radius: 999em;
    border: 3px solid $white;
    background-color: $primary-cta-color;
    color: white;
    transition: all .2s cubic-bezier(.175,.885,.32,2);
    outline: none;

    &:disabled {
      background-color: $secondary-cta-color;
    }
    &:hover {
      transform: scale(1.1);
      z-index: 2;
    }
    &:active {
      transform: scale(.9);
    }
    &.skip-button {
      right: 103px;
      width: 84px;
      height: 84px;
      bottom: -40px;
      font-size: 13px;
      background-color: $body-text-color;
    }
  }
}

.ticket-modal {
  .modal-dialog {
    padding: 0;
    margin: 0;
    float: right;
    border-radius: 0;
    height: 100%;
  }
  .modal-content {
    width: 400px;
    float: right;
    height: 100%;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
  }
  .modal-body {
    height: 100%;
  }

  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }

  .align-left {
    text-align: left;
  }

  .align-right {
    text-align: right;
  }

  .float-right {
    float: right;
  }
  .ticket {
    border-radius: 3px;
    font-size: 14px;
    color: #434651;
    position: relative;
    height: 100%;
    overflow: hidden;

    .ticket-header {
      padding: 20px;
      border-top-left-radius: 3px;
      border-top-right-radius: 3px;
      border-bottom: 1px solid $divider-color;
      position: absolute;
      background: #fff;
      width: 100%;
      z-index: 1;
      top: 0;

      img {
        float: left;
        width: 55px;
        border-radius: 999em;
      }

      .ticket-about {
        float: left;
        padding-left: 10px;
      }

      .ticket-with {
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 5px;
      }

      .ticket-actions {
        a {
          border: 1px solid $divider-color;
          border-radius: 5px;
          padding: 5px 8px;
          font-size: 12px;
          color: #616161;
          &:hover {
            background: #fafafa;
          }
        }
        .close-ticket {
          background: $primary-cta-color;
          border: 1px solid $primary-cta-color;
          color: $white;
          margin-right: 5px;
          &:hover {
            background: darken($primary-cta-color, 10);
            border-color: darken($primary-cta-color, 5);
          }
        }
      }

      .fa-star {
        float: right;
        color: #D8DADF;
        font-size: 20px;
        margin-top: 12px;
      }
    }

    .ticket-history {
      padding: 120px 30px 500px;
      background: #f5f5f5;
      border-bottom: 1px solid $divider-color;
      overflow-y: scroll;
      height: 100%;
      .card {
        margin-top: -85px;
      }

      .message-data {
        margin-bottom: 5px;
        font-size: 12px;
      }

      .message-data-name {
        font-weight: 700;
        a {
          color: $body-text-color;
        }
      }
      .message-data-time {
        color: #999;
        padding-left: 6px;
      }

      .message {
        color: $white;
        padding: 18px 20px;
        padding-top: 0;
        line-height: 20px;
        font-size: 14px;
        border-radius: 7px;
        margin-bottom: 30px;
        width: 90%;
        position: relative;
        white-space: pre-line;
      }

      .leader-message {
        background: #86BB71;
      }

      .other-message {
        background: #7fafdc;
      }

      .mod-note {
        background: #f9eab0;
        border: 1px dashed #e2bb7e;
        color: #886c40;
      }

    }

    .ticket-message {
      padding: 30px;
      padding-top: 10px;
      position: absolute;
      width: 100%;
      bottom: 0;
      background: #fff;
      z-index: 1;
      border-top: 1px solid $divider-color;
      border-bottom-left-radius: 3px;
      border-bottom-right-radius: 3px;

      textarea {
        width: 100%;
        border: 1px solid $divider-color;
        padding: 10px 20px;
        font-size: 14px;
        margin-bottom: 10px;
        border-radius: 5px;
        resize: none;
        max-height: 150px;
        overflow: auto !important;
      }

      .fa-file-o, .fa-file-image-o {
        font-size: 16px;
        color: gray;
        cursor: pointer;

      }

      .nav {
        border-bottom: 1px solid $divider-color;
        margin-bottom: 15px;
        .nav-link {
          color: #989898;
          padding: 5px;
          margin-right: 10px;
          &.active {
            color: #333;
            font-weight: 700;
            border-bottom: 2px solid $divider-color;
          }
        }
      }

      button {
        float: right;
        color: $white;
        font-size: 14px;
        border: none;
        cursor: pointer;
        background: $primary-cta-color;
        border-radius: 3px;
        padding: 5px 10px;

        &:hover {
          color: $white;
          color: darken($primary-cta-color, 7%);
        }
      }
    }
  }
}

.leader-permissions {
  background: $white;
  border-radius: 3px;
  height: 100%;
  position: relative;
  overflow: hidden;

  .leader-permission--header {
    text-align: center;
    border-bottom: 1px solid $divider-color;
    padding: 15px;
    background: #fafafa;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
  }
  img {
    width: 80px;
    height: auto;
    border-radius: 999em;
  }
  .leader-name {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 20px;
  }
  .leader-permission--content {
    padding: 15px;
    margin-top: 10px;
    height: 100%;
    padding-bottom: 80px;
    h6 {
      font-size: 12px;
      text-transform: uppercase;
      margin-bottom: 15px;
    }
  }

  .leader-permission--list {
    height: 100%;
    overflow: auto;
    padding-bottom: 200px;
    li {
      @extend .clearfix;
      border-bottom: 1px solid $divider-color;
      padding-bottom: 15px;
      margin-bottom: 15px;
      line-height: 30px;
      &:last-child {
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 0;
      }
    }
    .toggle {
      float: right;
    }
  }
  .leader-permission--save {
    position: absolute;
    width: 100%;
    bottom: 0;
    background: #fff;
    z-index: 1;
    border-top: 1px solid $divider-color;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    text-align: right;
    padding: 15px;
    .button--secondary {
      padding: 10px 20px;
      margin-right: 10px;
    }
    .button--primary {
      padding: 10px 20px;
    }
  }
}

.library-edit-modal {
  .modal-dialog {
    max-width: 450px;
  }
  .form-group {
    &:last-child {
      margin-bottom: 1s0px;
    }
    .btn-secondary {
      height: 100%;
      border: 1px solid $divider-color;
      border-color: darken($background-color,5);
      background-color: $input-secondary-action-background-color;
      color: $body-text-color;

      &:hover {
        color: $input-text-color;
        background-color: $input-secondary-action-background-color;
      }
    }
    .input-group-addon {
      border-color: darken($background-color,5);
      background-color: $input-secondary-action-background-color;
      color: $body-text-color;
    }
  }
  .button--primary {
    float: right;
    font-size: 14px;
    padding: 10px 20px;
  }
  .button--secondary {
    padding: 8px 15px;
    background: #cecece;
    svg {
      fill: #4e4e4e;
    }
    &:hover {
      background: #ffbbb5;
      svg {
        fill: #6b1e16;
      }
    }
  }
  .input-group {
    .form-control {
      min-width: 50px;
    }
  }
}