Reworking the layouts to allow for the new design

This commit is contained in:
2024-09-22 00:51:22 -04:00
parent b3fec80607
commit 3cfb3951e3
51 changed files with 819 additions and 872 deletions

View File

@@ -1,29 +1,38 @@
<template>
<div>
<v-infinite-scroll :items="contents"
:onLoad="fetchContents">
<v-infinite-scroll :items="contents"
:onLoad="fetchContents"
class="md:gap-2">
<!-- TODO: the -mt-4 is necessary because the v-infinite-scroll has some 'top' panel offsetting the list -->
<div class="flex flex-column gap-2 -mt-4">
<template v-for="content in contents" :key="content.id">
<component
:is="isSmallScreen ? ContentCardSm : ContentCardNormal"
:content="content"
@content-deleted="onContentDeleted"
></component>
</template>
</div>
<template v-slot:empty>
Il n'y a pas plus de contenus
</template>
<template v-for="content in contents" :key="content.id">
<component
:is="isSmallScreen ? ContentCardSm : ContentCardNormal"
:content="content"
@content-deleted="onContentDeleted"
></component>
</template>
<template v-slot:empty>
Il n'y a pas plus de contenus
</template>
<template v-slot:error>
<v-alert type="error">{{ errorMessage }}</v-alert>
</template>
</v-infinite-scroll>
<template v-slot:error>
<v-alert type="error">{{ errorMessage }}</v-alert>
</template>
</v-infinite-scroll>
</div>
</template>
<style>
</style>
<script setup>
import {useClient} from '@/plugins/api.js';