hummingbird-me/kitsu-web

View on GitHub
app/styles/layout/_cover-images.scss

Summary

Maintainability
Test Coverage
.cover-page {
  padding-top: 0;
  .global-container {
    max-width: 100%;
  }
  .transparent {
    background: transparent;
    box-shadow: none;
    transition: all 0.5s ease;
    border: none;
    .logo {
      g {
        fill: $white;
      }
    }
    .navbar-toggler {
      color: $white;
    }
    #exCollapsingNavbar2 {
      @media (max-width: 768px) {
        background-color: rgba(255, 255, 255, 0.1);
        .nav-link {
          border-color: rgba(255, 255, 255, 0.14);
        }
      }
    }
    .primary-nav--drop {
      &.in {
        background-color: rgba(255, 255, 255, 0.1);
        a, a:hover {
          color: $white;
          border-bottom: 1px solid rgba(255, 255, 255, 0.14);
          background: none;
        }
        li:last-child {
          a, a:hover {
            border-bottom: none;
          }
        }
      }
      a {
        color: $white;
        &.active,
        &:hover,
        &:focus {
          color: $active-link-color !important;
        }
      }
    }
    .navbar-buttons {
      opacity: 1;
      li {
        svg {
          path {
            fill: $white;
          }
        }
      }
      input {
        background: transparent;
      }
      .nav-item {
        .loading--small {
          border-bottom: 3px solid rgba(255, 255, 255, .1);
          border-left: 3px solid rgba(255, 255, 255, .1);
          border-right: 3px solid rgba(255, 255, 255, .1);
          border-top: 3px solid rgba(255, 255, 255, .4);
        }
        a {
          color: $white;
        }
        &.open {
          .notification-drop {
            a {
              color: #939393;
            }
          }
          .user-menu-drop {
            background-color: rgba(255, 255, 255, 0.1);
            a, a:hover {
              color: $white;
              border-bottom: 1px solid rgba(255, 255, 255, 0.14);
              background: none;
              &:last-child {
                border-bottom: none;
              }
            }
          }
        }
      }
    }
    .site-search__input {
      color: #fff;
    }
  }
  @media (max-width: 991px) {
    .feed-aside {
      display: none;
    }
  }

}

.user-cover {
  height: 400px;
  width: 100%;
  position: relative;
  .cover-photo {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 400px;
    width: 100%;
    position: relative;
  }
  .cover-user-info {
    position: absolute;
    width: 100%;
    bottom: 30px;
    z-index: $zIndex--cover-user-info;
    isolation: isolate;
    &.cover-media-info {
      bottom: 15px;
    }
  }
  .primary-info {
    float: left;
    height: 100px;
    position: relative;
    z-index: $zIndex--profile-primary-info;
    @media (max-width: 575px) {
      padding: 0 20px;
    }
    @media (max-width: 992px) {
      width: 100%;
      float: initial;
      margin-bottom: 15px;
    }
  }
  .cover-avatar {
    float: left;
  }
  .cover-username {
    color: $white;
    font-size: 30px;
    font-weight: 500;
    margin-top: 5px;
    margin-bottom: 10px;
    .tag {
      position: relative;
      top: -4px;
      font-size: initial;
      font-weight: initial;
    }
  }
  .mini-bio--poster {
    float: left;
    width: 100px;
    margin-right: 25px;
    img {
      border-radius: 3px;
    }
    @media (min-width: 768px) {
      display: none;
    }
  }
  .mini-bio {
    color: $white;
    font-size: 14px;
    float: left;
    margin-left: 25px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    p {
      margin-bottom: 0;
    }
    .media-actions {
      margin: 5px;
    }
    .reaction-content {
      max-width: 460px;
    }
  }
  .cover-cta {
    .button {
      padding: 8px 40px;
      font-size: 12px;
    }
    .stream-item-options {
      margin: 5px;
    }
  }
  .cover-profiles {
    position: absolute;
    z-index: $zIndex--cover-profiles;
    isolation: isolate;
    right: 0;
    bottom: 0;
    .about-me-profiles {
      text-align: right;
      max-width: 340px;
      > div {
        display: flex;
        flex-wrap: wrap-reverse;
        justify-content: flex-end
      }
      .profile-icon {
        display: inline-block;
        position: relative;
        top: 0;
        transition: all .2s ease-in-out;
        &:hover {
          top: -5px;
        }
        svg {
          width: 38px;
          height: 38px;
          margin-right: 5px;
        }
      }
    }
    @media (max-width: 992px) {
      position: relative;
      .about-me-profiles {
        max-width: 100%;
      }
    }
  }
  .dark-cover-overlay {
    position: absolute;
    bottom: 0;
    top: 0;
    width: 100%;
    background: rgba(0,0,0,.5);
  }
}

.media-sidebar--sticky {
  top: 215px;
  width: 195px;
  float: left;
  @media (max-width: 767px) {
    position: unset;
    width: 100%;
    float: none;
    top: 0;
    margin-top: -15px;
    margin-bottom: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid $divider-color;

    .media-sidebar {
      display: grid;
      gap: 10px;
      grid-template-columns: max-content auto;
      grid-template-rows: max-content auto;

      @media (max-width: 370px) {
        grid-template-columns: auto minmax(50px, 195px) auto;
      }

      .media-poster {
        grid-row: 1 / span 2;
        grid-column: 1;
        width: 195px;
        height: 277px;

        img {
          width: unset;
          height: unset;
        }

        .media-favorite {
          left: 0;
          right: auto;
        }
      }

      .library-state {
        grid-row: 1;
        grid-column: 2;
      }

      .where-to-watch-widget {
        grid-row: 2;
        grid-column: 2;
      }

      @media (max-width: 370px) {
        .media-poster {
          grid-row: 1;
          grid-column: 2;

          width: unset;
          height: unset;
        }

        .library-state {
          grid-row: 2;
          grid-column: 1 / span 3;
        }
  
        .where-to-watch-widget {
          grid-row: 3;
          grid-column: 1 / span 3;
        }
      }
    }
  }

  @media screen and (max-height: 710px) {
    position: relative;
    top: 0;
  }

  &:after {
    content: '';
    display: block;
    visibility: hidden;
    height: 0;
    clear: both;
  }

  .media-sidebar {
    position: relative;
    top: -142px;
    @media (max-width: 767px) {
      margin-top: 10px;
      margin-left: auto;
      margin-right: auto;
      top: 0;
    }
    img {
      border-radius: 3px;
      @media (max-width: 767px) {

      }
    }
    .button--primary {
      padding: 10px;
      width: 100%;
      font-size: 12px;
      margin-top: 10px;
      &:hover {
        box-shadow: none;
      }
    }
  }
}

.where-to-watch-widget {
  ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
  li {
    display: inline-block;
    max-width: 23.5%;
    padding: 0 3px 6px;
  }
  a {
    max-width: 100%;
    display: flex;
    background: $white;
    padding: 8px;
    border-radius: 3px;
    border: 1px solid #eee;
    flex-direction: column;
  }
  svg {
    width: auto;
    height: 20px;
  }
}

.where-to-watch-header {
  margin-top: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  position: relative;
  border-top: 1px solid darken($background-color, 5);
  > span {
    top: -20px;
    position: relative;
    background-color: $background-color;
    color: $body-text-color;
    font-size: 12px;
    padding: 10px;
  }
}

.media-cover-wrapper {
  .user-cover {
    .primary-info {
      height: auto;
      margin-bottom: 0;
    }
    .cover-user-info.cover-media-info {
      bottom: 0;
    }
  }
  width: 100%;
  .mini-bio {
    display: flex;
    align-items: center;
    margin-left: 220px;
    transform: translateY(-35%);
    @media (max-width: 767px) {
      margin-left: 0;
    }
    .reaction-ticker {
      display: flex;
      align-items: center;
      font-size: 16px;
      font-weight: 600;
      .lazy-image {
        display: inline;
        width: 50px;
        min-width: 50px;
        height: 50px;
        margin-right: 15px;
        img {
          border-radius: 999em;
        }
      }
    }
  }
  .cover-nav {
    margin-bottom: 15px;
    .navbar-nav {
      padding-left: 220px;
      @media (max-width: 767px) {
        padding-left: 0;
      }
    }
  }
}

.navbar-nav {
  .tag {
    background-color: $divider-color;
    padding: 4px;
    color: $body-text-color;
    margin-left: 5px;
    font-weight: normal;
    @if $theme == 'kitsu-light' {
      color: lighten($body-text-color,30);
    }
  }
}