diff --git a/movie_details/movie_details.css b/movie_details/movie_details.css index 0977233..b419a02 100644 --- a/movie_details/movie_details.css +++ b/movie_details/movie_details.css @@ -50,26 +50,33 @@ main } - -button -{ +.btn { margin-top: 5%; - border-radius: 1.2rem; - width: 20%; - padding: 1rem; - font-family: fantasy; - font-size: 1.5vw; - + width: 14%; + font-weight: 800; + height: 45px; + font-family: 'poppins', sans-serif; + font-size: 1.2vw; + text-transform: uppercase; + letter-spacing: 1.5px; + color: #000; + background-color: #fff; + border: none; + border-radius: 1.1rem; + box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1); + transition: all 0.3s ease 0s; cursor: pointer; - background-color: #f4f3ff; - transition: background-color 0.3s ease; -} + } -button:hover { - color: white; - background-color: rgb(7, 14, 42); +.btn:hover { + background-color: #2a9aa2; + box-shadow: 0px 5px 20px rgba(91, 162, 167, 0.73); + color: #fff; + transform: translateY(-7px); } + + h1 { font-family: Poppins; diff --git a/movie_details/movie_details.html b/movie_details/movie_details.html index c2cfa29..b36fe3c 100644 --- a/movie_details/movie_details.html +++ b/movie_details/movie_details.html @@ -99,15 +99,16 @@
diff --git a/movie_details/movie_details.js b/movie_details/movie_details.js index de12643..fb30b20 100644 --- a/movie_details/movie_details.js +++ b/movie_details/movie_details.js @@ -1,3 +1,4 @@ +let ImdbId; function getParameterByName(name, url) { if (!url) url = window.location.href; @@ -16,6 +17,26 @@ function switchEmbed(embedUrl) { iframe.src = embedUrl; } +const movieId = getParameterByName('id'); +const apiKey = '68e094699525b18a70bab2f86b1fa706'; +const extidsUrl = `https://api.themoviedb.org/3/movie/${movieId}/external_ids?api_key=${apiKey}`; +async function getImdbIdAndEmbed(embedUrl) +{ + await fetch(extidsUrl) + .then(response => response.json()) + .then(data => { + console.log(data.imdb_id); + + embedUrl=embedUrl+data.imdb_id; + console.log(embedUrl); + const iframe = document.getElementById('movieIframe'); + iframe.src = embedUrl; + + + }) + } + + document.addEventListener("DOMContentLoaded", function() { // Fetch movie details using movie ID from URL parameter @@ -25,6 +46,10 @@ document.addEventListener("DOMContentLoaded", function() { const castUrl = `https://api.themoviedb.org/3/movie/${movieId}/credits?api_key=${apiKey}`; const videosUrl = `https://api.themoviedb.org/3/movie/${movieId}/videos?api_key=${apiKey}`; + + + + function fetchCastDetails() { fetch(castUrl) .then(response => response.json()) diff --git a/series_details/series_details.js b/series_details/series_details.js index 5a90f48..c9f81ed 100644 --- a/series_details/series_details.js +++ b/series_details/series_details.js @@ -25,7 +25,7 @@ document.addEventListener("DOMContentLoaded", function() { const seriesDetailsUrl = `https://api.themoviedb.org/3/tv/${seriesId}?api_key=${apiKey}`; const castUrl = `https://api.themoviedb.org/3/tv/${seriesId}/credits?api_key=${apiKey}`; const videosUrl = `https://api.themoviedb.org/3/tv/${seriesId}/videos?api_key=${apiKey}`; - const seasonsUrl = `https://api.themoviedb.org/3/tv/${seriesId}/seasons?api_key=${apiKey}`; + //const seasonsUrl = `https://api.themoviedb.org/3/tv/${seriesId}/seasons?api_key=${apiKey}`; function fetchCastDetails() { fetch(castUrl)