Skip to content

Commit

Permalink
Update:Authors page increase size to fill width with 2 per row #1026
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Feb 3, 2024
1 parent f5ec247 commit bb117ab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pages/bookshelf/authors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div id="bookshelf" class="w-full h-full p-4 overflow-y-auto">
<div class="flex flex-wrap justify-center">
<template v-for="author in authors">
<cards-author-card :key="author.id" :author="author" :width="96" :height="120" class="p-2" />
<cards-author-card :key="author.id" :author="author" :width="cardWidth" :height="cardHeight" class="p-2" />
</template>
</div>
</div>
Expand All @@ -16,16 +16,21 @@ export default {
return {
loading: true,
authors: [],
loadedLibraryId: null
loadedLibraryId: null,
cardWidth: 200
}
},
computed: {
currentLibraryId() {
return this.$store.state.libraries.currentLibraryId
},
cardHeight() {
return this.cardWidth * 1.25
}
},
methods: {
async init() {
this.cardWidth = (window.innerWidth - 64) / 2
if (!this.currentLibraryId) {
return
}
Expand Down

0 comments on commit bb117ab

Please sign in to comment.