Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion resources/js/processes-catalogue/components/CarouselSlide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@
<b-carousel
ref="carousel"
:interval="0"
controls
class="carousel"
>
<div class="controls tw-flex tw-content-stretch tw-absolute tw-w-full tw-z-10 tw-top-1/2 tw-flex-wrap">
<button
class="tw-content-center tw-grow tw-left-0 tw-absolute tw-bg-transparent tw-color-[#556271] tw-text-xl"
@click="prevSlide()"
>
<i class="fas fa-caret-left" />
</button>
<button
class="tw-content-center tw-grow tw-right-0 tw-absolute tw-bg-transparent tw-color-[#556271] tw-text-xl"
@click="nextSlide()"
>
<i class="fas fa-caret-right" />
</button>
</div>
<b-carousel-slide
v-for="(image, index) in images.length > 0 ? images : defaultImage"
:key="index"
Expand Down Expand Up @@ -68,6 +82,12 @@ export default {
);
},
methods: {
prevSlide() {
this.$refs.carousel.prev();
},
nextSlide() {
this.$refs.carousel.next();
},
resizeCarousel(url, index) {
this.fullPage = !this.fullPage;
this.$emit("full-carousel", {
Expand All @@ -80,6 +100,12 @@ export default {
</script>

<style scoped>
.controls {
display: none;
}
.carousel:hover .controls {
display: block;
}
.carousel-normal {
width: 100%;
height: auto;
Expand Down
Loading