hummingbird-me/kitsu-web

View on GitHub
app/styles/pages/_unit-pages.scss

Summary

Maintainability
Test Coverage
.media-unit--block {
  @extend .card;
  padding: 10px;
  position: relative;
  transition: .2s all;
  .thumbnail-description h6 {
    font-size: 14px;
    padding-top: 4px;
    padding-bottom: 1px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow-x: hidden;
    color: $body-secondary-text-color;
    .thumb-caption {
      font-weight: 300;
    }
    .unit-number {
      color: $body-text-color;
    }
  }
  .thumbnail-wrapper {
    position: relative;
    .completion-status {
      position: absolute;
      bottom: 0;
      width: 100%;
      background: rgba(0,0,0,.5);
      color: $white;
      text-align: center;
      font-size: 12px;
      padding: 5px;
      display: none;
      z-index: 1;
    }
  }
  &.complete {
    .completion-status {
      display: block;
    }
    img {
      filter: gray; /* IE6-9 */
      -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */
      filter: grayscale(1); /* Microsoft Edge and Firefox 35+ */
    }
  }
  &:hover {
    transform: scale(1.1);
    z-index: 1;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.1);
  }
}

.media--unit-grid {
  list-style-type: none;
  padding: 0;
  width: 100%;
  margin-left: -5px;
  margin-right: -5px;
  li {
    display: inline-block;
    padding: 0 5px;
    img {
      width: 100%;
      height: 125px;
      object-fit: cover;
    }
  }
}

.unit-thumbnail {
  padding: 0;
  margin: 0;
}
.unit-description {
  margin-bottom: 20px;
  padding-top: 10px;
  font-size: 12px;
}

.unit-discussion {
  margin-top: 20px;
}

.episode-list {
  margin-bottom: 13px;
  display: block;
  width: 100%;
  ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    li {
      width: 10%;
      display: block;
      padding: 4px;
      flex: none;
      a {
        background: #ddd;
        width: 100%;
        display: block;
        text-align: center;
        border-radius: 3px;
        color: #333;
        padding: 8px 0;
        font-size: 14px;
        border: 1px solid #ddd;
        &:hover {
          background: darken(#ddd, 5);
          color: #333;
        }
      }
      &.active {
        a {
          background: none;
          border: 1px dashed #c7c7c7;
        }
      }
    }
  }
  .more {
    svg {
      width: 17px;
      height: 12px;
    }
  }
}

.language-selector {
  text-align: center;
  font-size: 14px;
  margin-bottom: 5px;
  position: relative;
  .dropdown {
    display: inline-block;
    background: #f7f7f7;
    z-index: 1;
    padding: 0 25px;
    .dropdown-item {
      background: #fff;
      font-weight: 300;
      &:hover {
        background: #fafafa;
      }
    }
  }
  a {
    background: #f7f7f7;
    z-index: 1;
    color: #636363;
    font-weight: 700;
  }
  .divider {
    height: 1px;
    background: #ddd;
    width: 100%;
    position: absolute;
    display: block;
    top: 10px;
    left: 0;
    right: 0;
  }
}

.unit-summary {
  .video-embed {
    max-height: 480px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
  }
  .thumbnail-wrapper {
    margin-bottom: 5px;
    img {
      border-radius: 3px;
      height: 65px;
    }
    .thumb-caption {
      margin-bottom: 5px;
    }
  }
  .unit-date {
    color: $body-secondary-text-color;
  }
  iframe {
    width: 100%;
    height: 480px;
  }
  .summary-wrapper {
    background: $foreground-background-color;
    border: 1px solid $divider-color;
    padding: 15px;
    padding-bottom: 0;
    border-radius: 3px;
  }
  .col-sm.row {
    margin: 0;
    padding: 0;
  }
}

.streamer-plug {
  width: 270px;
  margin-left: 10px;
  border-radius: 3px;
  text-align: center;
  padding: 20px;
  color: #fff;
  &.hulu-plug {
    background: #4CAC51;
    padding: 15px;
    .plug-logo svg {
      width: 100px;
      height: 40px;
    }
    .plug-cta {
      display: block;
      background: #fff;
      color: #333;
      border-radius: 3px;
      padding: 15px;
    }
  }
}

.unit-meta {
  align-items: center;
  display: flex;
  .unit-number {
    margin: 0;
  }
}

.video-player {
  position: relative;
  height: 480px;
  margin-bottom: 10px;
  .loading {
    position: absolute;
    width: 100%;
    border: 0;
    background: #000s;
    animation: none;
    border-radius: 0;
    height: 480px;
  }
}

.join-prompt {
  background: #000;
  color: #fff;
  margin-top: -10px;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  padding: 15px;
  text-align: center;
  margin-bottom: 10px;
  a {
    background: $primary-cta-color;
    padding: 5px 15px;
    border-radius: 3px;
    margin-left: 15px;
    &:hover {
      background: darken($primary-cta-color, 5);
    }
  }
}

.mark-watched-prompt {
  background: #000;
  color: #fff;
  margin-top: -10px;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  padding: 5px;
  text-align: center;
  font-size: 14px;
  margin-bottom: 10px;
  .prompt-cta {
    color: $body-link-color;
  }
}