Movie Cards
Lucy Shimmers and the Prince of Peace (2020)
⭐ User Score | G
Second chances start when a hardened criminal crosses paths with a precocious little girl who is helped by an angel to change hearts during the holiday season.
Genre: Drama, Family
Country: US
Release Date: 10/19/2020
Runtime: 1h 27m
★
★
★
★
★
▶ Watch Now
// ⭐ Star Rating Logic (Reusable)
function initStarRating(containerId, outputId) {
const stars = document.querySelectorAll(`#${containerId} .star`);
const output = document.getElementById(outputId);
let selectedRating = 0;
stars.forEach(star => {
star.addEventListener("mouseover", () => {
resetStars();
highlightStars(star.dataset.value);
});
star.addEventListener("mouseout", () => {
resetStars();
if (selectedRating > 0) highlightStars(selectedRating);
});
star.addEventListener("click", () => {
selectedRating = star.dataset.value;
output.innerHTML = `You rated this: ${selectedRating} / 5 ★`;
});
});
function highlightStars(count) {
for (let i = 0; i < count; i++) {
stars[i].classList.add("selected");
}
}
function resetStars() {
stars.forEach(star => star.classList.remove("selected"));
}
}
// Initialize each card separately
initStarRating("starRating-anna", "ratingOutput-anna");
initStarRating("starRating-anora", "ratingOutput-anora");
initStarRating("starRating-kiss", "ratingOutput-kiss");
initStarRating("starRating-lucy", "ratingOutput-lucy");
initStarRating("starRating-front", "ratingOutput-front");