_gallery.scss 4.41 KB
$borderGallery:#ededed;



.pswp__button {
  &.pswp__button--share {
    display: none;
  }

}
//миниатюрки
.gallery_min {
  $widthImg:146;
  $heightImg:90;
  $padding:5;
  margin-top: 10px;
  .row {
    margin-left: - $padding + px !important;
    margin-right: - $padding + px !important;
    div {

      width: 33.33333%;
      float: left;
      display: table;
      height: $heightImg + px;
      text-align: center;
      padding-left: $padding + px;
      padding-right: $padding + px;
      margin-top: ($padding*2) + px;

      a {
        border: 1px solid $borderGallery;
        display: table-cell;
        vertical-align: middle;
        //height: ($heightImg - 2) + px;
        &:before {
          position: absolute;
          width: 100%;
          height: 100%;
          background: #000;
          @include Opacity(0.6);
        }
        img {
          vertical-align: middle;
          max-width: 100%;
          max-height: 100%;
          @include Transition(0.2);
        }
      }

      &.video_pic {
        a {
          position: relative;
          &:before {
            @include svgIcon;
            position: absolute;
            $w:48;
            width: $w + px;
            height: $w + px;
            left: 50%;
            top: 50%;
            margin-top: -($w / 2) + px;
            margin-left: -($w / 2) + px;
            content: '\e9024';
            color: #fff;
            font-size: $w + px;
            background: none;
            z-index: 2;
            font-weight: 700;
          }

          &:after {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            background: #000;
            @include Opacity(0.6);
            content: '';
            z-index: 1;
          }
        }
      }
      &:hover {
        a {
          img {
            @include Scale(0.95);
          }
        }
      }
    }
  }

}

.video_pic {

}



/////////////////////
.my-gallery {
  overflow: hidden;
  border: 1px solid $borderGallery;
  height: 380px;
  position: relative;

  figure {
    display: table;
    text-align: center;
    width: 100%;
    height: 100%;
    a {
      display: table-cell;
      vertical-align: middle;
      img {
        max-width: 100%;
        max-height: 100%;
        vertical-align: middle;
        @include Transition(0.2);
      }
    }
    &:hover {
      a {
        img {
          @include Opacity(0.9);
        }
      }
    }
  }
}



.help_class {
  a {
    &:first-child {
      display: table-cell !important;
    }
  }
}

.pswp__item {
  .wrapper {
    $w:860;
    $h:540;
    width: $w + px;
    height: $h + px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-top: -($h / 2) + px;
    margin-left: -($w / 2) + px;

    iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100% !important;
      height: 100% !important;
    }
  }
}
.pswp {
  .pswp__bg {
    @include Opacity(0.85);
  }
}

@media (max-width: 992px) {
  .gallery_min  {
    .row {
      div {
        height: 60px;
      }
    }
  }
  .my-gallery {
    height: 260px;
  }
}

@media (max-width: 767px) {

}

@media (max-height: 640px) {
  .pswp__item {
    .wrapper {
      $w:660;
      $h:340;

      height: $h + px;
      margin-top: -($h / 2) + px;

    }
  }
}

@media (max-height: 440px) {
  .pswp__item {
    .wrapper {
      $w:460;
      $h:240;
      height: $h + px;
      margin-top: -($h / 2) + px;
    }
  }
}
@media (max-height: 310px) {
  .pswp__item {
    .wrapper {
      $w:300;
      $h:160;
      height: $h + px;
      margin-top: -($h / 2) + px;
    }
  }
}
@media (max-height: 200px) {
  .pswp__item {
    .wrapper {
      $w:200;
      $h:100;
      height: $h + px;
      margin-top: -($h / 2) + px;
    }
  }
}

@media (max-width: 992px) {
  .pswp__item {
    .wrapper {
      $w:760;
      width: $w + px;
      margin-left: -($w / 2) + px;
    }
  }
}


@media (max-width: 890px) {
  .pswp__item {
    .wrapper {
      $w:660;
      width: $w + px;
      margin-left: -($w / 2) + px;
    }
  }
}

@media (max-width: 790px) {
  .pswp__item {
    .wrapper {
      $w:560;
      width: $w + px;
      margin-left: -($w / 2) + px;
    }
  }
}

@media (max-width: 670px) {
  .pswp__item {
    .wrapper {
      $w:460;
      width: $w + px;
      margin-left: -($w / 2) + px;
    }
  }
}

@media (max-width: 540px) {
  .pswp__item {
    .wrapper {
      width: 100%;
      margin-left: 0;
    }
  }
}