Skip to content
Snippets Groups Projects
Commit 24e8488b authored by Bilel El Yaagoubi's avatar Bilel El Yaagoubi
Browse files

work continuation

parent 6845cc07
No related branches found
No related tags found
1 merge request!8Movie page
<template> <template>
<table> <div class="child">
<thead>
<th>Titre</th>
<th>Date de sortie</th>
<th>Image</th>
</thead>
<tbody>
<tr v-for="movie in movies" :key="movie.id">
<td>{{ movie.title }}</td>
<td>{{ movie.release_date }}</td>
<td>
<img <img
class="movieImage"
:src="'https://image.tmdb.org/t/p/original/' + movie.poster_path" :src="'https://image.tmdb.org/t/p/original/' + movie.poster_path"
/> />
</td> <h2>{{ movie.title }}</h2>
</tr> <h3>{{ movie.release_date }}</h3>
</tbody> </div>
</table>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
movies: Array, movie: Array,
}, },
}; };
</script> </script>
<style scoped></style> <style scoped>
.movieImage {
width: 50%;
}
.child {
margin-left: auto;
margin-right: auto;
}
table {
border-collapse: collapse;
}
th,
td {
border: 1px solid #000000;
padding: 10px;
}
</style>
<template>
<img
:src="'https://image.tmdb.org/t/p/original/' + posterPath"
hightd="100%"
/>
</template>
<script>
export default {
props: {
posterPath: String,
},
};
</script>
<style scoped></style>
<template>
<img
:src="'https://image.tmdb.org/t/p/original/' + posterPath"
hightd="100%"
/>
</template>
<script>
export default {
props: {
posterPath: String,
},
};
</script>
<style scoped></style>
...@@ -4,22 +4,23 @@ ...@@ -4,22 +4,23 @@
<p class="movie-title"> <p class="movie-title">
{{ moviesInfos.title }} {{ moviesInfos.title }}
</p> </p>
<p> <div>
<img <MoviePoster :posterPath="moviesInfos.poster_path" />
:src="'https://image.tmdb.org/t/p/original/' + moviesInfos.poster_path" <MovieInfos :infos="moviesInfos.poster_path" />
withd="100" </div>
height="300"
/>
</p>
</div> </div>
</template> </template>
<script> <script>
import axios from "axios"; import axios from "axios";
import MoviePoster from "@/components/MoviePoster.vue";
const backendURL = process.env.VUE_APP_BACKEND_BASE_URL; const backendURL = process.env.VUE_APP_BACKEND_BASE_URL;
export default { export default {
name: "Home", name: "Home",
components: {
MoviePoster,
},
data: function () { data: function () {
return { return {
movieId: "", movieId: "",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment