|
| 1 | +<template> |
| 2 | + <section |
| 3 | + id="features" |
| 4 | + :class="full ? '': 'py-12'" |
| 5 | + :style="custom && custom.section ? custom.section : null" |
| 6 | + v-if="slides.data.length > 0" |
| 7 | + > |
| 8 | + <!-- slideshow full --> |
| 9 | + <v-carousel v-if="full" cycle :height="height" hide-delimiter-background :show-arrows="false"> |
| 10 | + <v-carousel-item v-for="({img, title}, i) in slides.data" :key="i"> |
| 11 | + <v-sheet color="transparent" height="100%"> |
| 12 | + <v-row class="fill-height" align="center" justify="center"> |
| 13 | + <v-img :src="img" class="mb-4" height="100%" max-width="100%"> |
| 14 | + <div class="pt-10 display-2 text-center">{{ title }}</div> |
| 15 | + </v-img> |
| 16 | + </v-row> |
| 17 | + </v-sheet> |
| 18 | + </v-carousel-item> |
| 19 | + </v-carousel> |
| 20 | + <!-- slideshow with text --> |
| 21 | + <v-container v-else class="text-center"> |
| 22 | + <h2 |
| 23 | + class="display-1 font-weight-bold mb-3 text-uppercase" |
| 24 | + v-if="slides.title" |
| 25 | + >{{ slides.title }}</h2> |
| 26 | + <v-carousel cycle :height="height + 100" hide-delimiter-background :light='this.theme === "light" ? true : false' :show-arrows="false"> |
| 27 | + <v-carousel-item v-for="({ img, icon, title, text }, i) in slides.data" :key="i"> |
| 28 | + <v-sheet color="transparent" height="100%"> |
| 29 | + <v-row justify="center" align="center" class="fill-height"> |
| 30 | + <v-col cols="12" :md="mdImage || 6"> |
| 31 | + <v-img :src="img" class="mb-4" :height="height" max-width="100%"></v-img> |
| 32 | + </v-col> |
| 33 | + <v-col v-if="title || text || icon" cols="12" :md="mdText || 6"> |
| 34 | + <v-card |
| 35 | + class="py-12 px-4" |
| 36 | + :flat="config.vuetify.theme.flat" |
| 37 | + color="rgb(255, 255, 255, 0)" |
| 38 | + > |
| 39 | + <div> |
| 40 | + <v-avatar v-if="icon" color="primary" size="88"> |
| 41 | + <v-icon dark large data-aos="fade-up">{{ icon }}</v-icon> |
| 42 | + </v-avatar> |
| 43 | + </div> |
| 44 | + <v-card-title |
| 45 | + v-if="title" |
| 46 | + class="justify-center font-weight-black text-uppercase" |
| 47 | + v-text="title" |
| 48 | + ></v-card-title> |
| 49 | + <v-card-text v-if="text" class="subtitle-1 text--secondary"> |
| 50 | + <vue-markdown :source="text" /> |
| 51 | + </v-card-text> |
| 52 | + </v-card> |
| 53 | + </v-col> |
| 54 | + </v-row> |
| 55 | + </v-sheet> |
| 56 | + </v-carousel-item> |
| 57 | + </v-carousel> |
| 58 | + </v-container> |
| 59 | + </section> |
| 60 | +</template> |
| 61 | + |
| 62 | +<script> |
| 63 | +/** |
| 64 | + * Module dependencies. |
| 65 | + */ |
| 66 | +import { mapGetters } from 'vuex'; |
| 67 | +import VueMarkdown from 'vue-markdown'; |
| 68 | +/** |
| 69 | + * Export default |
| 70 | + */ |
| 71 | +export default { |
| 72 | + name: 'homeSlideshowComponent', |
| 73 | + props: ['slides', 'custom', 'height', 'mdImage', 'mdText', 'full'], |
| 74 | + computed: { |
| 75 | + ...mapGetters(['theme']), |
| 76 | + }, |
| 77 | + components: { |
| 78 | + VueMarkdown, |
| 79 | + }, |
| 80 | +}; |
| 81 | +</script> |
0 commit comments