Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced UI layout & design (Update #101) #102

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions MovieVerse-Frontend/html/actor-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,16 @@ <h2 id="actor-name" class="actor-header"></h2>
document.getElementById('actor-image').addEventListener('click', function() {
const imageUrl = this.src;
const modalHtml = `<div id="image-modal" style="z-index: 10002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center;">
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
document.body.insertAdjacentHTML('beforeend', modalHtml);

document.getElementById('image-modal').addEventListener('click', function(event) {
if (event.target === this) {
this.remove();
}
});
});
</script>

Expand Down
4 changes: 2 additions & 2 deletions MovieVerse-Frontend/html/christopher-nolan.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ <h2 id="search-title"></h2>

<div class="details-container" id="director-details-container">
<!-- Left side for Director Image -->
<div class="director-left">
<div class="director-left" style="overflow: hidden">
<h2 id="director-name" class="director-header"></h2>
<img id="director-image" alt="Loading Director Details..." style="width: 25vw"/>
<img id="director-image" alt="Loading Director Details..." style="width: 25vw; overflow: hidden"/>
</div>

<!-- Right side for Description and Info -->
Expand Down
12 changes: 9 additions & 3 deletions MovieVerse-Frontend/html/company-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,16 @@ <h2 id="company-name" class="company-header"></h2>
document.getElementById('company-logo').addEventListener('click', function() {
const imageUrl = this.src;
const modalHtml = `<div id="image-modal" style="z-index: 10002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center;">
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px; background-color: white">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px; background-color: white">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
document.body.insertAdjacentHTML('beforeend', modalHtml);

document.getElementById('image-modal').addEventListener('click', function(event) {
if (event.target === this) {
this.remove();
}
});
});
</script>

Expand Down
12 changes: 9 additions & 3 deletions MovieVerse-Frontend/html/director-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,16 @@ <h2 id="director-name" class="director-header"></h2>
document.getElementById('director-image').addEventListener('click', function() {
const imageUrl = this.src;
const modalHtml = `<div id="image-modal" style="z-index: 10002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center;">
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
document.body.insertAdjacentHTML('beforeend', modalHtml);

document.getElementById('image-modal').addEventListener('click', function(event) {
if (event.target === this) {
this.remove();
}
});
});
</script>

Expand Down
15 changes: 15 additions & 0 deletions MovieVerse-Frontend/html/inception.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,21 @@
}
}
});

document.getElementById('movie-image').addEventListener('click', function() {
const imageUrl = this.src;
const modalHtml = `<div id="image-modal" style="z-index: 10002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center;">
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
document.body.insertAdjacentHTML('beforeend', modalHtml);

document.getElementById('image-modal').addEventListener('click', function(event) {
if (event.target === this) {
this.remove();
}
});
});
</script>

<script src="https://www.gstatic.com/firebasejs/10.8.0/firebase-app.js"></script>
Expand Down
17 changes: 16 additions & 1 deletion MovieVerse-Frontend/html/leonardo-dicaprio.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

<div class="details-container" id="actor-details-container">
<!-- Left side for Actor Image -->
<div class="actor-left">
<div class="actor-left" style="overflow: hidden">
<h2 id="actor-name" class="actor-header"></h2>
<img id="actor-image" alt="Loading Actor Details..." style="width: 25vw"/>
</div>
Expand Down Expand Up @@ -140,6 +140,21 @@
}
}
});

document.getElementById('actor-image').addEventListener('click', function() {
const imageUrl = this.src;
const modalHtml = `<div id="image-modal" style="z-index: 10002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center;">
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
document.body.insertAdjacentHTML('beforeend', modalHtml);

document.getElementById('image-modal').addEventListener('click', function(event) {
if (event.target === this) {
this.remove();
}
});
});
</script>

<footer>
Expand Down
27 changes: 22 additions & 5 deletions MovieVerse-Frontend/html/movie-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,32 @@ <h3>Add a Comment for This Movie</h3>
document.body.style.backgroundImage = `url('${backgroundImageUrl}')`;
}

let isTrailerOpen = false;

document.getElementById('movie-image').addEventListener('click', function() {
document.getElementById('trailerButton').scrollIntoView({ behavior: 'smooth' });

const imageUrl = this.src;
const modalHtml = `<div id="image-modal" style="z-index: 10002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center;">
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
document.body.insertAdjacentHTML('beforeend', modalHtml);
document.getElementById('trailerButton').scrollIntoView({ behavior: 'smooth' });
document.getElementById('trailerButton').click();

document.getElementById('image-modal').addEventListener('click', function(event) {
if (event.target === this) {
this.remove();
}
});

if (!isTrailerOpen) {
document.getElementById('trailerButton').click();
isTrailerOpen = true;
}
});

document.getElementById('trailerButton').addEventListener('click', function() {
isTrailerOpen = !isTrailerOpen;
});
</script>

Expand Down
12 changes: 8 additions & 4 deletions MovieVerse-Frontend/html/tv-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,16 @@ <h3>Add a Comment for This TV Series</h3>
document.getElementById('movie-image').addEventListener('click', function() {
const imageUrl = this.src;
const modalHtml = `<div id="image-modal" style="z-index: 10002; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center;">
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer;" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
<img src="${imageUrl}" style="max-width: 80%; max-height: 80%; border-radius: 10px;">
<span style="position: absolute; top: 10px; right: 25px; font-size: 40px; cursor: pointer" id="removeBtn" onclick="document.getElementById('image-modal').remove();">&times;</span>
</div>`;
document.body.insertAdjacentHTML('beforeend', modalHtml);
document.getElementById('trailerButton').scrollIntoView({ behavior: 'smooth' });

document.getElementById('image-modal').addEventListener('click', function(event) {
if (event.target === this) {
this.remove();
}
});
});
</script>

Expand Down
Loading