blog-details.component.ts 1.84 KB
Newer Older
Ooh-Ao committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
import { Component } from '@angular/core';
import SwiperCore, {
  Navigation,
  Pagination,
  Scrollbar,
  A11y,
  Virtual,
  Zoom,
  Autoplay,
  Thumbs,
} from 'swiper';

SwiperCore.use([
  Navigation,
  Pagination,
  Scrollbar,
  A11y,
  Virtual,
  Zoom,
  Autoplay,
  Thumbs,
]);
@Component({
  selector: 'app-blog-details',
  templateUrl: './blog-details.component.html',
  styleUrls: ['./blog-details.component.scss'],
})
export class BlogDetailsComponent {
  indexNumber = 1;

  thumbsSwiper: unknown;

  setThumbsSwiper(swiper: unknown) {
    this.thumbsSwiper = swiper;
  }
  breakpoints = {
    640: { slidesPerView: 2, spaceBetween: 20 },
    768: { slidesPerView: 4, spaceBetween: 40 },
    1024: { slidesPerView: 4, spaceBetween: 50 },
  };
  breakPointsToggle!: boolean;
  breakpointChange() {
    this.breakPointsToggle = !this.breakPointsToggle;
    this.breakpoints = {
      640: { slidesPerView: 2, spaceBetween: 20 },
      768: { slidesPerView: 4, spaceBetween: 40 },
      1024: { slidesPerView: this.breakPointsToggle ? 7 : 5, spaceBetween: 50 },
    };
  }
  imageData = [
    {
      src: './assets/img/gallery/4.jpg',
      text: 'The agency has a diverse workforce of just under 18,000 civil servants, and works with many more U.S.',
      date: '12,Dec 2022 - 04:34PM',
      name: 'Json Taylor -',
      text2: 'N.A.S.A',
    },
    {
      src: './assets/img/gallery/5.jpg',
      text: 'The agency has a diverse workforce of just under 18,000 civil servants, and works with many more U.S.',
      date: '12,Dec 2022 - 04:34PM',
      name: 'Json Taylor -',
      text2: 'N.A.S.A',
    },
    {
      src: './assets/img/gallery/6.jpg',
      text: 'The agency has a diverse workforce of just under 18,000 civil servants, and works with many more U.S.',
      date: '12,Dec 2022 - 04:34PM',
      name: 'Json Taylor -',
      text2: 'N.A.S.A',
    },
  ];
}