Skip to content
Snippets Groups Projects

Movie page

3 files
+ 98
3
Compare changes
  • Side-by-side
  • Inline

Files

<template>
<table>
<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 :src= "'https://image.tmdb.org/t/p/original/' + movie.poster_path" /> </td>
</tr>
</tbody>
</table>
<div class="child">
<img
class="movieImage"
:src="'https://image.tmdb.org/t/p/original/' + movie.poster_path"
/>
<h2>{{ movie.title }}</h2>
<h3>{{ movie.release_date }}</h3>
</div>
</template>
<script>
export default {
props: {
movies: Array,
movie: Array,
},
};
</script>
<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>
Loading