Bruno Predot

Ajout composant BackdropImage.

<script lang="ts" setup>
//#region --Props--.
defineProps({
src: {
type: String,
required: true,
nullable: false,
},
title: {
type: String,
required: true,
nullable: false,
},
});
//#endregion
//#region --Declaration--.
const w: Window = window;
//#endregion
</script>
<template>
<section class="absolute inset-0 h-[500px] overflow-hidden z-0">
<v-img
v-if="src"
:alt="title"
:src="`https://image.tmdb.org/t/p/original${src}`"
:width="w.screen.width"
aspect-ratio="16/9"
class="w-full h-full object-cover opacity-30"
cover
max-height="500"
/>
</section>
</template>
<style scoped></style>
... ...
... ... @@ -125,15 +125,7 @@ onMounted(() => {
<!-- Contenu du film -->
<div v-else-if="movie" class="relative">
<!-- Backdrop image -->
<div class="absolute inset-0 h-[500px] overflow-hidden z-0">
<div class="absolute inset-0 bg-gradient-to-b from-transparent to-gray-900" />
<img
v-if="movie.backdrop_path"
:alt="movie.title"
:src="`https://image.tmdb.org/t/p/original${movie.backdrop_path}`"
class="w-full h-full object-cover opacity-30"
/>
</div>
<ui-components-backdrop-image v-if="movie.backdrop_path" :src="movie.poster_path" :title="movie.title" />
<!-- Contenu principal -->
<div class="container mx-auto px-4 py-8 relative z-10 pt-20">
... ...