Skip to content

Commit

Permalink
Update: Enhanced app functionalities (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed May 26, 2024
1 parent 6ee9f9d commit 0a368ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 3 additions & 0 deletions MovieVerse-Frontend/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ body {
.actor-name, .actor-role {
font-size: 12px;
margin: 0;
word-break: break-word;
white-space: normal;
text-align: center;
}

.director-section {
Expand Down
10 changes: 2 additions & 8 deletions MovieVerse-Frontend/js/movie-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -1133,8 +1133,7 @@ async function populateMovieDetails(movie, imdbRating, rtRating, metascore, awar
if (actor.profile_path) {
actorImage.src = IMGPATH + actor.profile_path;
actorImage.alt = `${actor.name} Profile Picture`;
}
else {
} else {
actorImage.alt = 'Image Not Available';
actorImage.src = '../../images/user-default.png';
actorImage.style.filter = 'grayscale(100%)';
Expand All @@ -1149,16 +1148,12 @@ async function populateMovieDetails(movie, imdbRating, rtRating, metascore, awar
const actorName = document.createElement('p');
actorName.classList.add('actor-name');
actorName.textContent = actor.name;
actorName.style.wordWrap = 'break-word';
actorDetails.appendChild(actorName);

const character = actor.character ? ` (${actor.character})` : '';
const actorRole = document.createElement('p');
actorRole.classList.add('actor-role');
actorRole.style.fontSize = '11px';
actorRole.textContent = character;
actorRole.style.fontStyle = 'italic';
actorRole.style.wordWrap = 'break-word';
actorDetails.appendChild(actorRole);

castItem.appendChild(actorDetails);
Expand All @@ -1167,8 +1162,7 @@ async function populateMovieDetails(movie, imdbRating, rtRating, metascore, awar
});

castSection.appendChild(castList);
}
else {
} else {
castSection.appendChild(document.createTextNode('None available.'));
}

Expand Down

0 comments on commit 0a368ea

Please sign in to comment.