pull/233/merge
Jleo-cjy 4 months ago committed by GitHub
commit 7ea9d90e44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,7 +20,7 @@ function showMovies(movies) {
main.innerHTML = ''
movies.forEach((movie) => {
const { title, poster_path, vote_average, overview } = movie
const { title, poster_path, vote_average, overview, id } = movie
const movieEl = document.createElement('div')
movieEl.classList.add('movie')
@ -34,6 +34,9 @@ function showMovies(movies) {
<div class="overview">
<h3>Overview</h3>
${overview}
<p style="margin-top: 10px;">
<a href="https://www.themoviedb.org/movie/${id}" target="_blank" class="detail-btn">View Details</a>
</p>
</div>
`
main.appendChild(movieEl)

@ -110,3 +110,18 @@ main {
.movie:hover .overview {
transform: translateY(0);
}
.detail-btn {
display: inline-block;
padding: 6px 12px;
background-color: #007bff;
color: white;
text-decoration: none;
border-radius: 4px;
font-size: 14px;
transition: background-color 0.3s;
}
.detail-btn:hover {
background-color: #0056b3;
}

Loading…
Cancel
Save