File tree Expand file tree Collapse file tree 2 files changed +50
-41
lines changed Expand file tree Collapse file tree 2 files changed +50
-41
lines changed Original file line number Diff line number Diff line change 1111 aria-label =" Slider mit Elementen"
1212 data-m-slider-splide =" m-slider-comment"
1313 >
14- <muc- button
14+ <button
1515 v-if =" showBackArrow"
16+ aria-label =" Vorheriges Element"
1617 class =" previous-button is-control"
17- icon =" arrow-left"
1818 @click =" prevSlide"
19- />
19+ >
20+ <svg class =" icon" >
21+ <use xlink:href =" #icon-arrow-left" ></use >
22+ </svg >
23+ </button >
2024 <Splide
2125 :options =" sliderOptions"
2226 aria-label =" Dies ist ein Karussell mit rotierenden Elementen. Verwenden Sie
2529 >
2630 <slot />
2731 </Splide >
28- <muc- button
32+ <button
2933 v-if =" showNextArrow"
34+ aria-label =" Nächstes Element"
3035 class =" next-button is-control"
31- icon =" arrow-right"
3236 @click =" nextSlide"
33- />
37+ >
38+ <svg class =" icon" >
39+ <use xlink:href =" #icon-arrow-right" ></use >
40+ </svg >
41+ </button >
3442 </section >
3543 </div >
3644 </div >
3947</template >
4048
4149<script setup lang="ts">
42- import type { Options } from " @splidejs/splide" ;
43-
50+ import { sliderOptions } from ' ./SliderOptions' ;
4451import { Splide } from " @splidejs/vue-splide" ;
4552import { computed , onMounted , ref , useTemplateRef } from " vue" ;
4653
47- import { MucButton } from " ../Button" ;
48-
4954defineSlots <{
5055 /**
5156 * MucSliderItems can be put into this slot.
@@ -114,40 +119,11 @@ onMounted(() => {
114119 });
115120 }
116121});
117-
118- const sliderOptions: Options = {
119- autoplay: false ,
120- keyboard: true ,
121- slideFocus: true ,
122- lazyLoad: false ,
123- arrows: false ,
124- perMove: 1 ,
125- gap: " 0" ,
126- type: " slide" ,
127- perPage: 1 ,
128- pagination: false ,
129- speed: 350 ,
130- mediaQuery: " min" ,
131- breakpoints: {
132- 1 : {
133- perPage: 1 ,
134- gap: " 1.5rem" ,
135- },
136- 768 : {
137- perPage: 1 ,
138- gap: " 1.5rem" ,
139- },
140- 1200 : {
141- perPage: 1 ,
142- gap: " 2rem" ,
143- },
144- },
145- };
146122 </script >
147123
148124<style scoped>
149125.m-component-slider-comment {
150- padding-right : 1.5 rem ;
151- padding-left : 1.5 rem ;
126+ padding-right : 1.8 rem ;
127+ padding-left : 1.8 rem ;
152128}
153129 </style >
Original file line number Diff line number Diff line change 1+ import type { Options } from "@splidejs/splide" ;
2+
3+ export const sliderOptions : Options = {
4+ autoplay : false ,
5+ keyboard : true ,
6+ slideFocus : true ,
7+ lazyLoad : false ,
8+ arrows : false ,
9+ perMove : 1 ,
10+ gap : "0" ,
11+ type : "slide" ,
12+ perPage : 1 ,
13+ pagination : false ,
14+ speed : 350 ,
15+ drag : true ,
16+ swipe : true ,
17+ swipeThreshold : 50 ,
18+ mediaQuery : "min" ,
19+ breakpoints : {
20+ 1 : {
21+ perPage : 1 ,
22+ gap : "1.5rem" ,
23+ } ,
24+ 768 : {
25+ perPage : 1 ,
26+ gap : "1.5rem" ,
27+ } ,
28+ 1200 : {
29+ perPage : 1 ,
30+ gap : "2rem" ,
31+ } ,
32+ } ,
33+ } ;
You can’t perform that action at this time.
0 commit comments