Last active
June 21, 2023 23:51
-
-
Save Eralpozcan/ae1f7d40b16b8420d4ab3f0ac6b6b430 to your computer and use it in GitHub Desktop.
Sentry performance analysis with Swiper Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
import 'swiper/css'; | |
import 'swiper/css/navigation'; | |
import 'swiper/css/pagination'; | |
import 'swiper/css/mousewheel'; | |
import 'swiper/css/autoplay'; | |
import 'swiper/css/parallax'; | |
import 'swiper/css/a11y'; | |
//-- Other imports and functions | |
</script> | |
<template> | |
<div class="container" v-if="sliderData"> | |
<Swiper :modules="SwiperModules" :slides-per-view="3" :space-between="40" :navigation="true" :mousewheel="true" | |
:autoHeight="true" :parallax="true"> | |
<SwiperSlide v-for="item in sliderData" :key="item"> | |
<div class="carousel__item"> | |
<div class="card border-0" @click="moviesDetailGo(item.id, customFields.clickable)"> | |
<UseImage v-if="customFields.imagePath" :src="ImagePath(item[customFields.imagePath])" class="rounded-3" | |
alt="Picture"> | |
<template #loading> | |
Loading.. | |
</template> | |
<template #error> | |
Failed | |
</template> | |
</UseImage> | |
<div class="card-itemc cast-slider"> | |
<h5 class="card-title text-truncate fw-bold" v-if="customFields.title">{{ item[customFields.title] }}</h5> | |
<div class="d-flex justify-content-between align-items-center"> | |
<small class="text-muted" v-if="customFields.profession">{{ item[customFields.profession] }}</small> | |
<span class="badge bg-warning mx-1" v-if="customFields.vote">{{ Number(item[customFields.vote]).toFixed(2) | |
}} | |
</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</SwiperSlide> | |
</Swiper> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
import 'swiper/css'; | |
import 'swiper/css/navigation'; | |
import 'swiper/css/pagination'; | |
import 'swiper/css/mousewheel'; | |
import 'swiper/css/autoplay'; | |
import 'swiper/css/parallax'; | |
import 'swiper/css/a11y'; | |
//-- Other imports and functions | |
</script> | |
<template> | |
<div class="container" v-if="sliderData"> | |
<Swiper :modules="SwiperModules" :slides-per-view="3" :space-between="40" :navigation="true" :mousewheel="true" | |
:autoHeight="true" :parallax="true"> | |
<SwiperSlide v-for="item in sliderData" :key="item"> | |
<div class="carousel__item"> | |
<div class="card border-0" @click="moviesDetailGo(item.id, customFields.clickable)"> | |
<img v-if="customFields.imagePath" :src="ImagePath(item[customFields.imagePath])" class="rounded-3" | |
alt="Picture"> | |
<div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div> | |
<div class="card-itemc cast-slider"> | |
<h5 class="card-title text-truncate fw-bold" v-if="customFields.title">{{ item[customFields.title] }}</h5> | |
<div class="d-flex justify-content-between align-items-center"> | |
<small class="text-muted" v-if="customFields.profession">{{ item[customFields.profession] }}</small> | |
<span class="badge bg-warning mx-1" v-if="customFields.vote">{{ Number(item[customFields.vote]).toFixed(2) | |
}} | |
</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</SwiperSlide> | |
</Swiper> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
import 'swiper/css'; | |
import 'swiper/css/navigation'; | |
import 'swiper/css/pagination'; | |
import 'swiper/css/mousewheel'; | |
import 'swiper/css/autoplay'; | |
import 'swiper/css/parallax'; | |
import 'swiper/css/a11y'; | |
//-- Other imports and functions | |
</script> | |
<template> | |
<div class="container" v-if="sliderData"> | |
<Swiper :modules="SwiperModules" :slides-per-view="3" :space-between="40" :navigation="true" :mousewheel="true" | |
:autoHeight="true" :parallax="true" :lazy="true"> | |
<SwiperSlide v-for="item in sliderData" :key="item"> | |
<div class="carousel__item"> | |
<div class="card border-0" @click="moviesDetailGo(item.id, customFields.clickable)"> | |
<img v-if="customFields.imagePath" loading="lazy" :src="ImagePath(item[customFields.imagePath])" | |
class="rounded-3" alt="Picture"> | |
<div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div> | |
<div class="card-itemc cast-slider"> | |
<h5 class="card-title text-truncate fw-bold" v-if="customFields.title">{{ item[customFields.title] }}</h5> | |
<div class="d-flex justify-content-between align-items-center"> | |
<small class="text-muted" v-if="customFields.profession">{{ item[customFields.profession] }}</small> | |
<span class="badge bg-warning mx-1" v-if="customFields.vote">{{ Number(item[customFields.vote]).toFixed(2) | |
}} | |
</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</SwiperSlide> | |
</Swiper> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
//-- Other imports and functions | |
</script> | |
<template> | |
<div class="container" v-if="sliderData"> | |
<Swiper :modules="SwiperModules" :slides-per-view="3" :space-between="40" :navigation="true" :mousewheel="true" | |
:autoHeight="true" :parallax="true" :lazy="true"> | |
<SwiperSlide v-for="item in sliderData" :key="item"> | |
<div class="carousel__item"> | |
<div class="card border-0" @click="moviesDetailGo(item.id, customFields.clickable)"> | |
<img v-if="customFields.imagePath" loading="lazy" :src="ImagePath(item[customFields.imagePath])" | |
class="rounded-3" alt="Picture"> | |
<div class="swiper-lazy-preloader swiper-lazy-preloader-white"></div> | |
<div class="card-itemc cast-slider"> | |
<h5 class="card-title text-truncate fw-bold" v-if="customFields.title">{{ item[customFields.title] }}</h5> | |
<div class="d-flex justify-content-between align-items-center"> | |
<small class="text-muted" v-if="customFields.profession">{{ item[customFields.profession] }}</small> | |
<span class="badge bg-warning mx-1" v-if="customFields.vote">{{ Number(item[customFields.vote]).toFixed(2) | |
}} | |
</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</SwiperSlide> | |
</Swiper> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment