Skip to content

Commit

Permalink
fix: fix the alignment of the video
Browse files Browse the repository at this point in the history
  • Loading branch information
apsinghdev committed Feb 12, 2025
1 parent 729301c commit 14518ba
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,20 @@
}

const container = document.getElementById("loading-media");
container.style.display = "flex";
container.style.justifyContent = "center";
container.style.alignItems = "center";
container.style.width = "100%";

if (lang === "ja") {
container.innerHTML = `
<div class="media-wrapper" style="width: 100%; max-width: 800px; aspect-ratio: 16/9; position: relative;">
<img src="loading-animation-ja.svg" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain;" alt="Loading animation" />
<div class="media-wrapper" style="width: 100%; aspect-ratio: 16/9; display: flex; justify-content: center; align-items: center;">
<img src="loading-animation-ja.svg" style="width: 100%; height: 100%; object-fit: contain;" alt="Loading animation" />
</div>`;
} else {
container.innerHTML = `
<div class="media-wrapper" style="width: 100%; max-width: 800px; aspect-ratio: 16/9; position: relative;">
<video loop autoplay muted playsinline style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain;">
<div class="media-wrapper" style="width: 100%; aspect-ratio: 16/9; display: flex; justify-content: center; align-items: center;">
<video loop autoplay muted playsinline style="width: 100%; height: 100%; object-fit: contain;">
<source src="loading-animation.webm" type="video/webm">
<source src="loading-animation.mp4" type="video/mp4">
</video>
Expand Down

0 comments on commit 14518ba

Please sign in to comment.