summaryrefslogtreecommitdiff
path: root/docs/showcases/Showcases.vue
blob: 86a17bfc9c52eb29e22555b713c23745831cf4c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script setup lang="ts">
import showcases from './showcases'
import Showcase from './Showcase.vue'
</script>

<template>
    <div class="Showcases">
        <template v-for="(showcase, index) in showcases" :key="index">
            <div v-if="Array.isArray(showcase)" class="row">
                <div v-for="(elem, elemIndex) in showcase" :key="elemIndex" class="item"
                    :class="`grid-${showcase.length}`">
                    <Showcase v-bind="elem" />
                </div>
            </div>
            <Showcase v-else v-bind="showcase" />
        </template>
    </div>
</template>

<style scoped>
.Showcases {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.row {
    display: flex;
    gap: 24px;
}

/* TODO: responsiveness on mobile */
.item.grid-2 {
    width: calc(100% / 2);
}

.item.grid-3 {
    width: calc(100% / 3);
}

.item.grid-4 {
    width: calc(100% / 4);
}
</style>