Limit categories per instance to 3
This commit is contained in:
parent
a897dca4cc
commit
dfcb2e26db
1 changed files with 7 additions and 1 deletions
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<div class="tag" v-for="category in instance.categories" :key="category">
|
<div class="tag" v-for="category in limitedCategories" :key="category">
|
||||||
{{ translatedThemes[category] }}
|
{{ translatedThemes[category] }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -251,6 +251,12 @@
|
||||||
.map(l => this.translatedLanguages[l])
|
.map(l => this.translatedLanguages[l])
|
||||||
.filter(l => !!l)
|
.filter(l => !!l)
|
||||||
.join(', ')
|
.join(', ')
|
||||||
|
},
|
||||||
|
|
||||||
|
limitedCategories () {
|
||||||
|
if (Array.isArray(this.instance.categories) === false) return []
|
||||||
|
|
||||||
|
return this.instance.categories.slice(0, 3)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue