Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Bruno Predot
/
tmdb_test
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Bruno Predot
2025-04-26 10:24:32 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
24fb254b4b3687188f5a3cc8feb56b61c2291ef4
24fb254b
1 parent
e6070fea
Ajout composant BackdropImage.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
9 deletions
components/ui-components/BackdropImage.vue
pages/movies/[id]/index.vue
components/ui-components/BackdropImage.vue
0 → 100644
View file @
24fb254
<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>
...
...
pages/movies/[id]/index.vue
View file @
24fb254
...
...
@@ -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">
...
...
Please
register
or
login
to post a comment