|
| 1 | +<!-- |
| 2 | + - Call example |
| 3 | + <homeLogosComponent |
| 4 | + v-bind:logos="sponsors" |
| 5 | + v-bind:size="150" |
| 6 | + v-bind:ratio="1" |
| 7 | + v-bind:custom="null" |
| 8 | + ></homeLogosComponent> |
| 9 | + - Data Example |
| 10 | + sponsors: { |
| 11 | + title: 'Sponsor', |
| 12 | + data: [ |
| 13 | + [{ |
| 14 | + title: 'OpenCollective', |
| 15 | + image: 'logos/opencollective.png', |
| 16 | + link: 'https://opencollective.com/weareopensource', |
| 17 | + }, { |
| 18 | + title: 'Ko-fi', |
| 19 | + image: 'logos/patreon.png', |
| 20 | + link: 'https://ko-fi.com/weareopensource', |
| 21 | + }, { |
| 22 | + title: 'Patreon', |
| 23 | + image: 'logos/kofi.png', |
| 24 | + link: 'https://patreon.com/weareopensource', |
| 25 | + }], |
| 26 | + ], |
| 27 | + }, |
| 28 | +--> |
| 29 | +<template> |
| 30 | + <section |
| 31 | + id="features" |
| 32 | + class="py-12" |
| 33 | + :style="custom && custom.section ? custom.section : null" |
| 34 | + v-if="logos.data.length > 0" |
| 35 | + > |
| 36 | + <v-container class="text-center"> |
| 37 | + <h2 class="display-1 font-weight-bold mb-3 pb-8 text-uppercase" v-if="logos.title"> |
| 38 | + {{ logos.title }} |
| 39 | + </h2> |
| 40 | + <v-row v-for="(data, i) in logos.data" :key="i" justify="center"> |
| 41 | + <v-col |
| 42 | + v-for="({ image, link, title }, i) in data" |
| 43 | + :key="i" |
| 44 | + :cols="12 / ratio" |
| 45 | + :sm="6 / ratio" |
| 46 | + :md="4 / ratio" |
| 47 | + :lg="4 / ratio" |
| 48 | + :xl="2 / ratio" |
| 49 | + > |
| 50 | + <v-tooltip top> |
| 51 | + <template v-slot:activator="{ on }" |
| 52 | + ><div> |
| 53 | + <a :href="link"> |
| 54 | + <v-avatar v-on="on" v-if="link" :size="size"> |
| 55 | + <img v-if="image" :src="image" /> |
| 56 | + </v-avatar> |
| 57 | + </a> |
| 58 | + </div> |
| 59 | + </template> |
| 60 | + <span>{{ title }} </span> |
| 61 | + </v-tooltip> |
| 62 | + </v-col> |
| 63 | + </v-row> |
| 64 | + </v-container> |
| 65 | + </section> |
| 66 | +</template> |
| 67 | +<script> |
| 68 | +/** |
| 69 | + * Export default |
| 70 | + */ |
| 71 | +export default { |
| 72 | + name: 'homeLogosComponent', |
| 73 | + props: ['logos', 'custom', 'size', 'ratio'], |
| 74 | +}; |
| 75 | +</script> |
0 commit comments