Skip to content

Commit 75eaad2

Browse files
Brett-S-OWBLKuemmel
authored andcommitted
Widen the main layout area and display 3 cards on screen > 1400px (#2547)
1 parent 67ef601 commit 75eaad2

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

packages/modules/web_themes/koala/source/src/components/BaseCarousel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const animated = ref<boolean>(true);
4848
* Group the items in chunks of 2 for large screens and 1 for small screens.
4949
*/
5050
const groupedItems = computed(() => {
51-
const groupSize = $q.screen.width > 800 ? 2 : 1;
51+
const groupSize = $q.screen.width > 1400 ? 3 : $q.screen.width > 800 ? 2 : 1;
5252
return props.items.reduce((resultArray, item, index) => {
5353
const chunkIndex = Math.floor(index / groupSize);
5454
if (!resultArray[chunkIndex]) {

packages/modules/web_themes/koala/source/src/layouts/MainLayout.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,23 @@
116116
</q-drawer>
117117

118118
<!-- Page container that takes the remaining height -->
119-
<q-page-container class="column flex centered-container">
119+
<q-page-container
120+
:class="[
121+
'column',
122+
'flex',
123+
{
124+
'centered-container': !isLargeScreen,
125+
'centered-container-large': isLargeScreen,
126+
},
127+
]"
128+
>
120129
<router-view />
121130
</q-page-container>
122131
</q-layout>
123132
</template>
124133

125134
<script setup lang="ts">
126-
import { ref, onMounted } from 'vue';
135+
import { ref, computed, onMounted } from 'vue';
127136
import { useQuasar } from 'quasar';
128137
const $q = useQuasar();
129138
@@ -133,6 +142,7 @@ defineOptions({
133142
134143
const drawer = ref(false);
135144
const themeMode = ref('auto');
145+
const isLargeScreen = computed(() => $q.screen.width > 1400);
136146
137147
const setTheme = (mode: 'light' | 'dark' | 'auto') => {
138148
themeMode.value = mode;
@@ -163,4 +173,10 @@ onMounted(() => {
163173
margin-left: auto;
164174
margin-right: auto;
165175
}
176+
177+
.centered-container-large {
178+
max-width: 1400px;
179+
margin-left: auto;
180+
margin-right: auto;
181+
}
166182
</style>

0 commit comments

Comments
 (0)