diff --git a/src/js/movie-gallery.js b/src/js/movie-gallery.js
index 32c6ed1..7d3ccef 100644
--- a/src/js/movie-gallery.js
+++ b/src/js/movie-gallery.js
@@ -1,7 +1,5 @@
import {
fetchTrendingMovies,
- getMovieInfo,
- getSearchMovies,
hideLoadingAnimationWithDelay,
showLoadingAnimation,
} from './API-requests.js';
@@ -9,7 +7,6 @@ import genreList from './genre-list.js';
import { createPagination } from '../index.js';
import {
movieGalleryPosterDimension,
- MOVIE__POSTERS__URL,
updateMovieGalleryPosterDimension,
updateMoviePosterUrl,
} from './movie-poster-data.js';
@@ -100,21 +97,15 @@ export async function renderInfo(movies) {
movieList.innerHTML = '';
movies.map(movie => {
- const card = document.createElement('div');
+ const card = document.createElement('ul');
card.setAttribute('data', movie.id);
card.classList.add('movie-card');
- card.innerHTML = `${moviePosterFn(movie)}
-
- -
- ${movie.title}
-
- -
- ${getGenres(genreList, movie.genre_ids)}
-
- -
- ${new Date(movie.release_date).getFullYear()}
-
-
`;
+ card.innerHTML = `
+ ${moviePosterFn(movie)}
+ ${movie.title}
+ ${getGenres(genreList, movie.genre_ids)}
+ ${new Date(movie.release_date).getFullYear()}
+ `;
movieList.appendChild(card);
});
hideLoadingAnimationWithDelay(500);
diff --git a/src/js/movie-modal.js b/src/js/movie-modal.js
index 57ca3c3..dd6e1c8 100644
--- a/src/js/movie-modal.js
+++ b/src/js/movie-modal.js
@@ -29,7 +29,7 @@ let checkArrary = -1;
let checkclass;
movieGallery.addEventListener('click', e => {
//get movie id
- const parent = e.target.closest('div');
+ const parent = e.target.closest('ul');
const movieId = parent.getAttribute('data');
mylibID = movieId;
// show modal after html is rendered. Image is rendering after
@@ -39,7 +39,7 @@ movieGallery.addEventListener('click', e => {
myLibaryGallery.addEventListener('click', e => {
//get movie id
- console.log('image clicked')
+ // console.log('image clicked')
const parent = e.target.closest('div');
const movieId = parent.getAttribute('data');
mylibID = movieId;
diff --git a/src/partials/card-gallery.html b/src/partials/card-gallery.html
index 7223d15..585863f 100644
--- a/src/partials/card-gallery.html
+++ b/src/partials/card-gallery.html
@@ -1,2 +1,2 @@
-
-
+