Skip to content

Commit

Permalink
Addons swiper: Fix single addon card width in landscape orientation (o…
Browse files Browse the repository at this point in the history
…penhab#2835)

Signed-off-by: Florian Hotze <dev@florianhotze.com>
  • Loading branch information
florian-h05 authored Oct 26, 2024
1 parent b9edd97 commit 54b96e7
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<template>
<addon-card class="addons-swiper" v-if="addonsList.length === 1" style="width: 66.667%" :addon="addonsList[0]" :install-action-text="installActionText" :headline="headline" @addonButtonClick="addonButtonClick" />
<addon-card class="addons-swiper addon-card-single" v-if="addonsList.length === 1" :addon="addonsList[0]" :install-action-text="installActionText" :headline="headline" @addonButtonClick="addonButtonClick" />
<f7-swiper class="addons-swiper" v-else pagination :params="{ spaceBetween: 10, slidesPerView: slidesPerView }" :key="slidesPerView">
<f7-swiper-slide v-for="addon in addonsList" :key="addon.uid">
<addon-card :key="addon.uid" :addon="addon" :install-action-text="installActionText" :headline="headline" :lazy-logo="false" @addonButtonClick="addonButtonClick" />
</f7-swiper-slide>
</f7-swiper>
</template>

<style lang="stylus">
.addon-card-single
width 66.667%
@media (orientation: landscape)
width 28.571%
</style>

<script>
import AddonCard from '@/components/addons/addon-card.vue'
Expand Down

0 comments on commit 54b96e7

Please sign in to comment.