|
167 | 167 | | The autoplay circles between all the slides and goes back to the begining after the last slide.#[br] |
168 | 168 | | You can also pause and resume the autoplay from an external button using Vue refs like this: |
169 | 169 | w-button.ml2( |
170 | | - small |
171 | 170 | bg-color="primary" |
172 | 171 | @click="$refs.exBasic[`${autoPlaying ? 'pause' : 'resume'}Autoplay`]();autoPlaying = !autoPlaying;pauseOnHover = false") |
173 | | - w-icon.mr1(md) material-icons {{ autoPlaying ? 'pause_circle_outline' : 'play_circle_outline' }} |
| 172 | + w-icon.mr1(lg) material-icons {{ autoPlaying ? 'pause_circle_outline' : 'play_circle_outline' }} |
174 | 173 | | {{ autoPlaying ? 'Pause' : 'Resume' }} |
175 | | - w-button.ml2(small bg-color="primary" :outline="!pauseOnHover" @click="pauseOnHover = !pauseOnHover") |
176 | | - w-icon.mr1(v-if="pauseOnHover" md) material-icons check |
| 174 | + w-button.ml2(bg-color="primary" :outline="!pauseOnHover" @click="pauseOnHover = !pauseOnHover") |
| 175 | + w-icon.mr1(v-if="pauseOnHover" lg) material-icons check |
177 | 176 | | Pause on mouseover |
178 | 177 | code.ml2 Currently {{ internalAutoPlaying ? 'playing' : 'paused' }} |
179 | 178 | vueper-slides.ex2( |
|
340 | 339 | :title="i.toString()" |
341 | 340 | :style="'background-color: ' + colors[(i + 1) % 4]") |
342 | 341 | template(#bullet="{ active, slideIndex, index }") |
343 | | - w-icon.mr1(:color="colors[(index + 1) % 4]") material-icons {{ active ? 'check_circle' : 'radio_button_unchecked' }} |
| 342 | + w-icon.mr1(:style="'color: ' + colors[(index + 1) % 4]" lg) material-icons {{ active ? 'check_circle' : 'radio_button_unchecked' }} |
344 | 343 | strong(:style="`color: ${colors[(index + 1) % 4]}`") Slide \#{{ index }} |
345 | 344 |
|
346 | 345 | p.mb0 When using the #[span.code bullet] slot, 3 variables are accessible: |
|
373 | 372 | :title="i.toString()" |
374 | 373 | :style="'background-color: ' + colors[(i + 1) % 4]") |
375 | 374 | template(#bullets="{ bulletIndexes, goToSlide, previous, next, currentSlide }") |
376 | | - button.px1.py3( |
| 375 | + button.px1.py3.transparent--bg.bd0( |
377 | 376 | v-for="(slideIndex, i) in bulletIndexes" |
378 | 377 | :key="i" |
379 | 378 | :class="{ 'active': currentSlide === slideIndex }" |
|
382 | 381 | @click="goToSlide(slideIndex)" |
383 | 382 | @keyup.left="previous()" |
384 | 383 | @keyup.right="next()") |
385 | | - w-icon(:color="colors[(i + 2) % 4]") |
| 384 | + w-icon(:style="'color: ' + colors[(i + 2) % 4]" lg) |
386 | 385 | | material-icons {{ currentSlide === slideIndex ? 'check_circle' : 'radio_button_unchecked' }} |
387 | 386 |
|
388 | 387 | p.mb0 When using the #[span.code bullets] slot, 5 variables are accessible: |
|
597 | 596 | template(#content) |
598 | 597 | .vueperslide__content-wrapper |
599 | 598 | .subtitle-1 |
600 | | - w-icon.mr2(color="white") material-icons check |
| 599 | + w-icon.mr2(color="white" lg) material-icons check |
601 | 600 | | Complex content {{ i.toString() }} with Vue.js |
602 | 601 | | {{ 1 === 1 ? 'interpreted' : 'non-interpreted' }} compilable content like |
603 | 602 | | components & #[span(v-pre) {{ mustaches }}]. |
|
613 | 612 | </template> |
614 | 613 | </vueper-slide> |
615 | 614 | </vueper-slides> |
616 | | - highlight(type="info") |
617 | | - ul.my0 |
618 | | - li if both #[span.code :content="..."] and #[span.code #content] are provided, the content slot will be displayed. |
| 615 | + highlight.pl6(type="info"). |
| 616 | + If both #[span.code :content="..."] and #[span.code #content] are provided, the content slot will be displayed. |
619 | 617 |
|
620 | 618 | h3 |
621 | 619 | a(href="#ex--updating-content" v-scroll-to="'#ex--updating-content'") Updating Content Inside/Outside |
|
628 | 626 | In this example the content is set in a slot (refer to #[a(href="#ex--complex-slide-title-and-content" v-scroll-to="'#ex--complex-slide-title-and-content'") Complex Slide Title & Content] |
629 | 627 | for more details) and uses interpreted mustaches #[span.code(v-pre) {{ }} and Vuetify components like #[span.code v-layout] & #[span.code v-icon]]. |
630 | 628 |
|
631 | | - highlight(type="tips") |
| 629 | + highlight.mt4(type="tips") |
632 | 630 | strong.red WARNING: The following tip does not apply to Vue 3. Vue 3 resolves this internally. |
633 | 631 | p. |
634 | 632 | The only thing that does not keep updated by default - as more costly, is the slides clones |
|
637 | 635 | This is only for particular cases like this clock and you usually don't need this as the slides are copied from original content on mounted. |
638 | 636 | w-flex.max-widthed.mb4(align-center wrap) |
639 | 637 | w-flex.shrink.mr4(align-center wrap) |
640 | | - w-button.mt2.mr2(bg-color="primary" @click="toggleSlidesTime" small) |
641 | | - w-icon.pr2 material-icons {{ slidesTimeTimerId ? 'highlight_off' : 'access_time' }} |
| 638 | + w-button.mt2.mr2(bg-color="primary" @click="toggleSlidesTime") |
| 639 | + w-icon.pr2(lg) material-icons {{ slidesTimeTimerId ? 'highlight_off' : 'access_time' }} |
642 | 640 | | {{ slidesTimeTimerId ? 'Stop' : 'Keep' }} updating time |
643 | 641 | w-transition-expand(x) |
644 | | - w-tag.mt2(v-if="slidesTimeTimerId === 0" small outline) CPU says THANK YOU! |
| 642 | + w-tag.mt2.grey.text-nowrap(v-if="slidesTimeTimerId === 0" outline) CPU says THANK YOU! |
645 | 643 | w-flex(align-center wrap) |
646 | | - w-button.mt2.mx2(bg-color="primary" @click="contentPositionChange" small) |
647 | | - w-icon material-icons swap_vert |
| 644 | + w-button.mt2.mx2(bg-color="primary" @click="contentPositionChange") |
| 645 | + w-icon(lg) material-icons swap_vert |
648 | 646 | | Move content position |
649 | 647 | strong.mt2.code {{ contentPosition === 'false' ? ':' : '' }}slide-content-outside="#[span.primary {{ contentPosition }}]" |
650 | 648 | vueper-slides.ex--updating-content( |
|
656 | 654 | vueper-slide(v-for="(slide, i) in slides4" :key="i" :style="'background-color: ' + ['#42b983', '#ff5252'][i % 2]") |
657 | 655 | template(#content) |
658 | 656 | .vueperslide__content-wrapper(style="flex-direction: row") |
659 | | - w-icon.pr3(color="white" size="5em") material-icons access_time |
| 657 | + w-icon.mr4(color="white" size="5em" lg) material-icons access_time |
660 | 658 | span(style="font-size: 3.7em") {{ slide.title }} |
661 | 659 |
|
662 | 660 | ssh-pre(language="html-vue" label="HTML Vue Template"). |
|
711 | 709 | p |
712 | 710 | | This example illustrates how to add or remove slides on the fly from a running Vueper Slides instance.#[br] |
713 | 711 | | You can also completely freeze the slideshow and unfreeze when you want to.#[br] |
714 | | - w-button.ma1(bg-color="primary" @click="appendSlide" small) |
715 | | - w-icon material-icons add |
| 712 | + w-button.ma1(bg-color="primary" @click="appendSlide" ) |
| 713 | + w-icon(lg) material-icons add |
716 | 714 | | Add Slide |
717 | | - w-button.ma1(bg-color="primary" @click="removeSlide" small) |
718 | | - w-icon material-icons remove |
| 715 | + w-button.ma1(bg-color="primary" @click="removeSlide" ) |
| 716 | + w-icon(lg) material-icons remove |
719 | 717 | | Remove Slide |
720 | | - w-button.ma1(bg-color="secondary" @click="toggleSlideshow" small) |
721 | | - w-icon material-icons {{ slideshowDisabled ? 'check_circle' : 'highlight_off'}} |
| 718 | + w-button.ma1(bg-color="secondary" @click="toggleSlideshow" ) |
| 719 | + w-icon(lg) material-icons {{ slideshowDisabled ? 'check_circle' : 'highlight_off'}} |
722 | 720 | | {{ slideshowDisabled ? 'Enable' : 'Disable' }} Slideshow |
723 | 721 | highlight Note that the slideshow disables controls if you have only 1 slide or none. |
724 | 722 | p The arrows are also disabled on edges in this example. |
|
736 | 734 | :content="slide.content" |
737 | 735 | :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]") |
738 | 736 | ssh-pre(language="html-vue" label="HTML Vue Template"). |
739 | | - <button @click="appendSlide" small> |
| 737 | + <button @click="appendSlide" > |
740 | 738 | <i class="icon material-icons">add</i> Add Slide |
741 | 739 | </button> |
742 | | - <button @click="removeSlide" small> |
| 740 | + <button @click="removeSlide" > |
743 | 741 | <i class="icon material-icons">remove</i> Remove Slide |
744 | 742 | </button> |
745 | | - <button @click="toggleSlideshow" small> |
| 743 | + <button @click="toggleSlideshow" > |
746 | 744 | <i class="icon material-icons"> {{ "\{\{ slideshowDisabled ? 'check_circle' : 'highlight_off'\}\}" }}</i> {{ "\{\{ slideshowDisabled ? 'Enable' : 'Disable' \}\}" }} Slideshow |
747 | 745 | </button> |
748 | 746 |
|
|
840 | 838 | div.grey(v-if="logs") |
841 | 839 | strong // event-name: |
842 | 840 | span.ml2 params |
843 | | - w-button(bg-color="primary" sm outline @click="logs = []") |
844 | | - w-icon.mr1(small) material-icons close |
| 841 | + w-button(color="primary" sm outline @click="logs = []") |
| 842 | + w-icon.mr1() material-icons close |
845 | 843 | | Clear logs |
846 | 844 | div(v-for="(log, i) in logs") |
847 | 845 | strong.mr2 {{ log.eventName }}: |
|
878 | 876 | padding: 4px 25px; |
879 | 877 | background: orange; |
880 | 878 | color: #fff; |
881 | | - font-size: 10px; |
| 879 | + font-size: 11px; |
882 | 880 | transform: translateX(30%) rotate(45deg); |
883 | 881 | transform-origin: 0 0; |
884 | 882 | box-shadow: 0 0 9px rgba(0, 0, 0, 0.2); |
|
966 | 964 | You might also want to set a fixed content on top of the moving background using |
967 | 965 | the #[span.code parallax-fixed-content] option. |
968 | 966 | w-flex.max-widthed.mb4(align-center wrap) |
969 | | - w-button.my1.mr2(small bg-color="primary" @click="parallax *= -1;$refs.exParallax.refreshParallax()") |
970 | | - w-icon material-icons sync |
| 967 | + w-button.my1.mr2( bg-color="primary" @click="parallax *= -1;$refs.exParallax.refreshParallax()") |
| 968 | + w-icon(lg) material-icons sync |
971 | 969 | | Reverse parallax effect |
972 | 970 | strong.code.mr4 :parallax="#[span.primary {{ parallax.toString() }}]" |
973 | 971 |
|
974 | | - w-button.my1.mr2(small bg-color="primary" @click="parallaxFixedContent = !parallaxFixedContent") |
975 | | - w-icon material-icons {{ parallaxFixedContent ? 'close' : 'remove_from_queue' }} |
| 972 | + w-button.my1.mr2( bg-color="primary" @click="parallaxFixedContent = !parallaxFixedContent") |
| 973 | + w-icon(lg) material-icons {{ parallaxFixedContent ? 'close' : 'remove_from_queue' }} |
976 | 974 | | Add a fix content |
977 | 975 | strong.code :parallax-fixed-content="#[span.primary {{ parallaxFixedContent.toString() }}]" |
978 | 976 | vueper-slides.ex--parallax(ref="exParallax" :parallax="parallax" :parallax-fixed-content="parallaxFixedContent") |
|
1225 | 1223 | refer to the #[a(href="#ex--parallax" v-scroll-to="'#ex--parallax'") Parallax Effect] example. |
1226 | 1224 |
|
1227 | 1225 | div.text-center.mb3 |
1228 | | - w-button.ma1(bg-color="primary" small @click="$refs.myVueperSlides.previous()") |
1229 | | - w-icon material-icons arrow_back |
| 1226 | + w-button.ma1(bg-color="primary" @click="$refs.myVueperSlides.previous()") |
| 1227 | + w-icon(lg) material-icons arrow_back |
1230 | 1228 | | Previous |
1231 | | - w-button.ma1(bg-color="primary" small @click="$refs.myVueperSlides.goToSlide(5)") |
1232 | | - w-icon material-icons call_made |
| 1229 | + w-button.ma1(bg-color="primary" @click="$refs.myVueperSlides.goToSlide(5)") |
| 1230 | + w-icon(lg) material-icons call_made |
1233 | 1231 | | Go to slide 6 |
1234 | | - w-button.ma1(bg-color="primary" small @click="$refs.myVueperSlides.next()") |
1235 | | - w-icon material-icons arrow_forward |
| 1232 | + w-button.ma1(bg-color="primary" @click="$refs.myVueperSlides.next()") |
| 1233 | + w-icon(lg) material-icons arrow_forward |
1236 | 1234 | | Next |
1237 | 1235 | vueper-slides(:slide-ratio="1/5" ref="myVueperSlides") |
1238 | 1236 | vueper-slide(v-for="i in 10" :key="i" :title="i.toString()" :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]") |
|
1319 | 1317 | p |
1320 | 1318 | a(href="https://codepen.io/antoniandre/pen/ZEGEydP" target="_blank") |
1321 | 1319 | | Edit this example in Codepen |
1322 | | - w-icon.ml1(small color="primary") material-icons open_in_new |
| 1320 | + w-icon.ml1( color="primary") material-icons open_in_new |
1323 | 1321 | vueper-slides( |
1324 | 1322 | ref="vueperslides3" |
1325 | 1323 | :touchable="false" |
|
0 commit comments