From e5ef319355d6e9473c3335b25dafd3714e77b9f5 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 10 Aug 2023 21:36:56 +0100 Subject: [PATCH] feat: disable post cover autoplay --- src/components/home/PostCover.tsx | 19 +++++-------------- src/css/tailwind.css | 23 ----------------------- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/src/components/home/PostCover.tsx b/src/components/home/PostCover.tsx index 6d294181..5513904e 100644 --- a/src/components/home/PostCover.tsx +++ b/src/components/home/PostCover.tsx @@ -1,8 +1,7 @@ import "swiper/css" -import "swiper/css/effect-fade" import "swiper/css/navigation" -import "swiper/css/pagination" -import { Autoplay, EffectFade, Navigation, Pagination } from "swiper/modules" +import "swiper/css/scrollbar" +import { Navigation, Scrollbar } from "swiper/modules" import { Swiper, SwiperSlide } from "swiper/react" import { Image } from "~/components/ui/Image" @@ -30,23 +29,15 @@ export default function PostCover({ {(images?.length || 0) > 1 ? ( <> {images?.map((image) => ( diff --git a/src/css/tailwind.css b/src/css/tailwind.css index 998f8d28..d147abe5 100644 --- a/src/css/tailwind.css +++ b/src/css/tailwind.css @@ -445,26 +445,3 @@ textarea.input { .swiper-button { @apply absolute top-1/2 -translate-y-1/2 bg-white rounded-full z-[1] w-6 h-6 flex items-center justify-center opacity-80; } - -.swiper .swiper-pagination-bullet { - @apply bg-zinc-100 opacity-50 w-[7px] h-[7px]; -} - -.swiper .swiper-pagination-bullet-active { - @apply opacity-100; -} - -.swiper .swiper-pagination-bullets { - @apply leading-3; -} - -.swiper .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { - @apply bg-accent; - transition-duration: 5000ms !important; - transition-timing-function: linear; - transform: translate3d(0px, 0px, 0px) scaleX(0) scaleY(1); -} - -.swiper .swiper-pagination-progressbar.swiper-pagination-horizontal { - @apply h-[2px] bg-transparent; -}