thedrummeraki/tanoshimu

View on GitHub
app/assets/stylesheets/shows.scss

Summary

Maintainability
Test Coverage
// Place all the styles related to the shows controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

.chip-holder {
  // margin: 1rem 0;
  word-wrap: normal;
}

.chip {
  cursor: pointer;
  display: inline;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;

  border: 1px #888888 solid;
  color: #aaa;
  padding: 3px 5px;
  border-radius: 10px;
  line-height: 36px;

  transition: 0.3s;
  -o-transition: 0.3s;
  -webkit-transition: 0.3s;
  -ms-transition: 0.3s;
  -moz-transition: 0.3s;
}

.chip:hover {
  background-color: #777777;
}

.chip.active {
  background-color: #ee6e73;
  color: #fff;
}

.show-title {
  position: absolute;
  bottom: 30px;
}

.description {
  font-size: 0.875em;
}
.clamped {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* number of lines to show */
  -webkit-box-orient: vertical;
} // https://stackoverflow.com/questions/3922739/limit-text-length-to-n-lines-using-css

.clamped.oneliner {
  -webkit-line-clamp: 1;
  word-break: break-all;
}

.clamped.long-title {
  -webkit-line-clamp: 3;
}

.show-url-image img {
  height: 3rem;
  width: 3rem;
  object-fit: cover;
  vertical-align: middle;
  border-radius: 10px;
}

.show-url-image img.larger {
  height: 5rem;
  width: 5rem;
}

.show-url-image img.tiny {
  height: 1.5rem;
  width: 1.5rem;
}
.show-url-image img.round {
  border-radius: 50%;
}

.main.image {
  height: 480px;
  transform: scale(1.1);
}

.col-center {
  float: none;
  margin: 0 auto;
}

.like {
  background-image: url(/img/like_full_small.png);
  background-repeat: no-repeat;
  padding: 30px;
}

.not-like {
  background-image: url(/img/like_small.png);
  background-repeat: no-repeat;
  padding: 30px;
}

.top-tags-holder {
  position: absolute;
  top: -4px;
  left: 0px;
  z-index: 1;
  width: 100%;

  .badge,
  .tag {
    border-radius: 0;
    margin: 0 !important;
  }
}

.is-poster {
  a {
    color: #fff !important;
  }
  a:hover {
    color: #ccc !important;
  }
}

.show-poster {
  position: relative;
}

.show-body {
  .head {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 20%;
    z-index: 0;
    position: relative;
    height: 500px;
    padding: 0;
    top: -5.2rem;
  }

  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    user-select: none;
    overflow: hidden;
    background: -webkit-linear-gradient(top, rgba(23, 23, 23, 0.2) 0, #262626);
    background: linear-gradient(180deg, rgba(23, 23, 23, 0.2) 0, #262626);
    z-index: 0;

    .selectable {
      user-select: text;
    }
  }
}

img.not-avail {
  -webkit-filter: blur(8px);
  filter: blur(8px);
}

img.broken {
  -webkit-filter: grayscale(10) blur(5px);
  filter: grayscale(10) blur(5px);
}

.title-img {
  object-fit: cover;
  width: 200px;
}

.title-img.level {
  margin-bottom: -2px;
}

.holder {
  position: relative;
  padding: 0 0 56.5%;
  overflow: hidden;

  .overlay {
    z-index: 1;
    width: 100%;
    height: 100%;
    position: absolute;
  }

  .overlay.darken::after {
    display: block;
    position: absolute;
    background: -webkit-linear-gradient(
      top,
      rgba(0, 0, 0, 0.5) 0,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0.5) 100%
    );
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.5) 0,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0.5) 100%
    );
    height: 100%;
    width: 100%;
    content: "";
  }

  img {
    z-index: 0;
    position: absolute;
    width: 100%;
    min-height: 100%;
    object-fit: cover;
  }
}

.thumb-overlay {
  width: 100%;
  height: 100%;
}

.image-card-container {
  color: white;
  position: relative;
  -moz-transition: all 0.3s;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;

  .description {
    position: absolute;
    bottom: 5px;
    left: 10px;
  }

  .focusable {
    .card-img-top {
      max-width: 100% !important;

      -moz-transition: all 0.3s;
      -webkit-transition: all 0.3s;
      transition: all 0.3s;
    }
    .card-img-top.descriptive {
      background-image: linear-gradient(
        to bottom,
        rgba(255, 0, 0, 0),
        black
      ); /* Standard syntax (must be last) */
    }
  }
}

@media (max-width: 1400px) {
  .title-img {
    height: 375px;
  }
}

@media (max-width: 768px) {
  .title-img {
    display: none;
  }
}