|
1 | 1 | <template> |
2 | 2 | <div v-if="activeCompany"> |
3 | | - <h4> |
| 3 | + <!-- <h4> |
4 | 4 | {{ $t('introduction.usedByTitle') }} |
5 | | - </h4> |
| 5 | + </h4> --> |
6 | 6 | <div class="row carousel-container pt-small pb-small bg-white bg-grey-dark-darkmode card"> |
7 | 7 | <button |
8 | 8 | class="col-sm-1 flex center middle" |
|
14 | 14 | <div |
15 | 15 | :key="activeCompanyIndex" |
16 | 16 | class="col-sm-10 row middle" |
17 | | - :style="!$store.state.isMobile ? 'height: 10rem;' : ''"> |
| 17 | + :style="!$store.state.isMobile ? 'height: 13rem;' : ''"> |
18 | 18 | <div |
19 | 19 | class="col-sm-12 col-md-3 col-md-offset-0" |
20 | 20 | :class="$store.state.isMobile ? 'mb-medium' : ''"> |
|
52 | 52 | <div class="row between"> |
53 | 53 | <button |
54 | 54 | v-for="(company, i) in companiesShuffled.slice(5, 10)" |
55 | | - :key="company.name" |
56 | | - :aria-label="`${company.name} testimonial`" |
57 | | - :style="`background-image: url(${publicPath}img/carousel-company-icons/${company.imgName})`" |
| 55 | + :key="company?.name" |
| 56 | + :aria-label="`${company?.name} testimonial`" |
| 57 | + :style="`background-image: url(${publicPath}img/carousel-company-icons/${company?.imgName}); ${!company.name && 'opacity: 0; pointer-events: none;'}`" |
58 | 58 | class="img-container-small bg-white card mt-small" |
59 | 59 | :class="activeCompanyIndex === i + 5 ? 'logo-active border-black border-thin' : ''" |
60 | 60 | @click="activeCompanyIndex = i + 5" /> |
|
65 | 65 | v-for="(company, i) in companiesShuffled" |
66 | 66 | :key="company.name" |
67 | 67 | :aria-label="`${company.name} testimonial`" |
68 | | - :style="`background-image: url(${publicPath}img/carousel-company-icons/${company.imgName})`" |
| 68 | + :style="`background-image: url(${publicPath}img/carousel-company-icons/${company.imgName}); ${!company.name && 'opacity: 0; pointer-events: none;'}`" |
69 | 69 | class="img-container-small bg-white card mt-small" |
70 | 70 | :class="[ |
71 | 71 | activeCompanyIndex === i ? 'logo-active border-black border-thin' : '', |
@@ -100,9 +100,6 @@ export default { |
100 | 100 | computed: { |
101 | 101 | activeCompany() { |
102 | 102 | return this.$tm('introduction.companies')[this.activeCompanyIndex] |
103 | | - }, |
104 | | - numberOfCompanies() { |
105 | | - return this.$tm('introduction.companies').length |
106 | 103 | } |
107 | 104 | }, |
108 | 105 | methods: { |
@@ -131,7 +128,7 @@ export default { |
131 | 128 | const j = Math.floor(Math.random() * (i + 1)); |
132 | 129 | [companies[i], companies[j]] = [companies[j], companies[i]] |
133 | 130 | } |
134 | | - this.companiesShuffled = companies |
| 131 | + this.companiesShuffled = [...companies, {}] |
135 | 132 | this.isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches |
136 | 133 | } |
137 | 134 | } |
|
0 commit comments