Creator news summary - presentation design
This commit is contained in:
85
src/views/creators/banner/Creatornewssummary.vue
Normal file
85
src/views/creators/banner/Creatornewssummary.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex justify-center mb-2">
|
||||
<v-btn height="42" @click="scrollUp">
|
||||
<v-icon size="40">mdi-arrow-up-drop-circle-outline</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
|
||||
<div class="text-center text-white rounded-t-lg text-xl" :style="{ backgroundColor: creator.colors.bannerTop, letterSpacing: '5px' }">Actualité</div>
|
||||
|
||||
<div class="flex flex-column">
|
||||
<div v-for="(item, index) in visibleCards" :key="index" class="my-1 text-white" :style="{ backgroundColor: creator.colors.bannerTop }">
|
||||
<div class="flex justify-between items-center border-b-2 border-white p-3 mx-2">
|
||||
<p v-if="item.type === 'nouvelle'" class="text-xl" :style="{ letterSpacing: '8px' }">Nouvelle</p>
|
||||
<p v-if="item.type === 'contenu'" class="text-xl" :style="{ letterSpacing: '8px' }">Contenu</p>
|
||||
<p class="text-xs">{{ item.date }}</p>
|
||||
</div>
|
||||
|
||||
<div class="p-3">
|
||||
<div class="text-lg" style="letter-spacing: 2px">{{ item.title }}</div>
|
||||
<p v-if="item.description" class="text-gray-300 text-sm text-justify mt-1 py-1">{{ item.description }}</p>
|
||||
|
||||
<div v-if="item.rating" class="stars flex justify-end">
|
||||
{{ item.rating }} ★
|
||||
</div>
|
||||
|
||||
<img v-if="item.photo" :src="item.photo" class="w-full h-auto my-2" />
|
||||
|
||||
<div class="flex justify-evenly">
|
||||
<v-btn icon variant="plain"><v-icon>mdi-thumb-up</v-icon></v-btn>
|
||||
<v-btn icon variant="plain"><v-icon>mdi-comment-outline</v-icon></v-btn>
|
||||
<v-btn icon variant="plain"><v-icon>mdi-gift-outline</v-icon></v-btn>
|
||||
</div>
|
||||
|
||||
<video v-if="item.video" controls :src="item.video" class="w-full h-auto my-2"></video>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-center mt-2">
|
||||
<v-btn height="42" @click="scrollDown">
|
||||
<v-icon size="40">mdi-arrow-down-drop-circle-outline</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, defineProps } from 'vue';
|
||||
|
||||
// Define props to receive creator
|
||||
const props = defineProps({
|
||||
creator: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
// Simulate JSON data (replace with your actual data)
|
||||
const actualites = ref([
|
||||
{ type: 'nouvelle', title: 'La visite du studio', description: 'Je suis fier de vous montrer les installations sur lesquelles nous avons travaillé si fort.', photo: '/images/usersmedia/HutopyProfile/profilepictures/profileHutopyProfile01.png', video: null, rating: null, date: '2024-09-19' },
|
||||
{ type: 'contenu', title: 'Éditer comme un pro!', description: 'Ceci est la description du contenu.', photo: null, video: null, rating: 4.5, date: '2024-09-18' },
|
||||
{ type: 'nouvelle', title: 'Le studio', description: 'Nous sommes dans les derniers préparatifs, mais demain nous allons vous dévoiler la première partie du studio qui est complétée.', photo: null, video: null, rating: null, date: '2024-09-17' },
|
||||
{ type: 'contenu', title: 'Contenu 2', description: 'Deuxième contenu avec description.', photo: null, video: null, rating: 5.0, date: '2024-09-16' },
|
||||
]);
|
||||
|
||||
// Control card visibility
|
||||
const startIndex = ref(0);
|
||||
const cardsPerPage = 3;
|
||||
|
||||
const endIndex = computed(() => startIndex.value + cardsPerPage);
|
||||
const visibleCards = computed(() => actualites.value.slice(startIndex.value, endIndex.value));
|
||||
|
||||
function scrollDown() {
|
||||
if (endIndex.value < actualites.value.length) {
|
||||
startIndex.value += 2;
|
||||
}
|
||||
}
|
||||
|
||||
function scrollUp() {
|
||||
if (startIndex.value > 0) {
|
||||
startIndex.value -= 2;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -63,16 +63,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="absolute bottom-6 right-24 z-30 shadow-2xl rounded-2xl text-white"
|
||||
<div class="absolute bottom-6 right-24 z-30 shadow-2xl rounded-md text-white"
|
||||
:style="{ backgroundColor: creator.colors.bannerTop}">
|
||||
|
||||
<div class="w-96 h-28 flex flex-col">
|
||||
<!-- Section 3 et 4 - Prend 2/3 de la hauteur -->
|
||||
<div class="flex flex-row flex-grow-[2] min-h-20">
|
||||
<div class="rounded-tl-xl w-1/2 flex items-center justify-center"
|
||||
<div class="rounded-tl-md w-1/2 flex items-center justify-center"
|
||||
:style="{ backgroundColor: creator.colors.bannerBottom, opacity: 0.20 }">
|
||||
</div>
|
||||
<div class="rounded-tr-xl w-1/2 bg-cyan-100 flex items-center justify-center text-xl"
|
||||
<div class="rounded-tr-md w-1/2 bg-cyan-100 flex items-center justify-center text-xl"
|
||||
:style="{ backgroundColor: creator.colors.bannerBottom}">
|
||||
<div class="absolute left-1">
|
||||
<div class="flex flex-row items-center justify-center space-x-5">
|
||||
@@ -105,15 +105,15 @@
|
||||
</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Section 1 - Prend 1/3 de la hauteur -->
|
||||
<div class="flex-grow bg-gray-300 flex items-center justify-center rounded-b-2xl"
|
||||
|
||||
<div class="flex-grow bg-gray-300 flex items-center justify-center rounded-b-md"
|
||||
:style="{ backgroundColor: creator.colors.bannerBottom,opacity: 0.80 }">
|
||||
|
||||
<textarea
|
||||
|
||||
rows="1"
|
||||
placeholder="Message facultatif"
|
||||
class="w-full p-2 border border-gray-300 rounded-b-2xl resize-none"
|
||||
class="w-full p-2 border border-gray-300 rounded-b-md resize-none"
|
||||
style="max-height: 300px; overflow-y: hidden; outline: none;"
|
||||
oninput="this.style.height = ''; this.style.height = Math.min(this.scrollHeight, 300) + 'px'"></textarea>
|
||||
|
||||
@@ -122,61 +122,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="flex flex-row ml-auto space-x-2.5">-->
|
||||
<!-- <donation-button-banner-->
|
||||
<!-- :color-border="creator.colors.menu"-->
|
||||
<!-- :color-accent="creator.colors.accent"-->
|
||||
<!-- :creator-id="creator.id"-->
|
||||
<!-- :creator-name="creator.name"-->
|
||||
<!-- :creator-logo="creator.images.logo"-->
|
||||
<!-- iconColorClass="text-white">-->
|
||||
<!-- </donation-button-banner>-->
|
||||
<!-- <div class="flex flex-column">-->
|
||||
<!-- <!– Bouton abonnement affiché seulement si non abonné –>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- -->
|
||||
|
||||
<!-- <!– Conteneur sticky –>-->
|
||||
<!-- <div v-show="isSticky" class=" sticky-header fixed top-14 left-0 right-0 w-full z-20"-->
|
||||
<!-- :style="{ backgroundColor: creator.colors.bannerBottom || '#A30E79', borderBottom: '5px inset' + (creator.colors.menu || '#000') }">-->
|
||||
<!-- <div class="shadow-3xl flex flex-row items-center py-2 px-2">-->
|
||||
<!-- <div>-->
|
||||
<!-- <img-->
|
||||
<!-- class="max-w-[40px] max-h-[40px] ml-5 rounded-full"-->
|
||||
<!-- :src="creator.images.logo ? creator.images.logo : '/images/placeholders/logo.png'"-->
|
||||
<!-- alt="Profile Picture"-->
|
||||
<!-- :style="{ borderColor: creator.colors.accent || '#A30E79', height: '190px'}"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="ml-5 text-white">-->
|
||||
<!-- <p class="capitalize text-2xl font-bold">{{ creator.name }}</p>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="ml-auto flex flex-row space-x-2.5 mr-3 ">-->
|
||||
<!-- -->
|
||||
<!-- <donation-button-banner-slim -->
|
||||
<!-- class=""-->
|
||||
<!-- :color-border="creator.colors.menu"-->
|
||||
<!-- :color-accent="creator.colors.accent"-->
|
||||
<!-- :creator-id="creator.id"-->
|
||||
<!-- :creator-name="creator.name"-->
|
||||
<!-- :creator-logo="creator.images.logo"-->
|
||||
<!-- >-->
|
||||
<!-- </donation-button-banner-slim>-->
|
||||
|
||||
<!-- <!– Afficher le bouton d'abonnement seulement si l'utilisateur n'est pas abonné –>-->
|
||||
<!-- <subscribe-button-slim-->
|
||||
<!-- v-if="!isSubscribed"-->
|
||||
<!-- :creator="creator"-->
|
||||
<!-- :color-border="creator.colors.menu">-->
|
||||
<!-- </subscribe-button-slim>-->
|
||||
<!-- -->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<div class="rounded-b-2xl min-h-10 px-36 flex flex-col items-center justify-center"
|
||||
|
||||
Reference in New Issue
Block a user