convert gif to webp for first frame on main page
This commit is contained in:
parent
2f507fd77e
commit
25c7dc7d22
BIN
assets/hello/1.webp
Normal file
BIN
assets/hello/1.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 MiB |
Binary file not shown.
Before Width: | Height: | Size: 3.4 MiB |
BIN
assets/hello/m/1.webp
Normal file
BIN
assets/hello/m/1.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 MiB |
@ -62,7 +62,7 @@ setInterval(async () => {
|
|||||||
// setTimeout(async () => {
|
// setTimeout(async () => {
|
||||||
const navbarHeight = +(document.getElementById("navbar-main")?.offsetHeight);
|
const navbarHeight = +(document.getElementById("navbar-main")?.offsetHeight);
|
||||||
if (!mainMenuErrorHandled && location.pathname == "/" && document.getElementById('main_img1')?.src) {
|
if (!mainMenuErrorHandled && location.pathname == "/" && document.getElementById('main_img1')?.src) {
|
||||||
document.getElementById('main_img1').src = window.screen.availWidth / window.screen.availHeight > 1.45 ? "/assets/hello/1.gif" : "/assets/hello/m/1.gif";
|
document.getElementById('main_img1').src = window.screen.availWidth / window.screen.availHeight > 1.45 ? "/assets/hello/1.webp" : "/assets/hello/m/1.webp";
|
||||||
document.getElementById('main_img2').src = window.screen.availWidth / window.screen.availHeight > 1.45 ? "/assets/hello/2.png" : "/assets/hello/m/2.png";
|
document.getElementById('main_img2').src = window.screen.availWidth / window.screen.availHeight > 1.45 ? "/assets/hello/2.png" : "/assets/hello/m/2.png";
|
||||||
document.getElementById('main_img3').src = window.screen.availWidth / window.screen.availHeight > 1.45 ? "/assets/hello/3.png" : "/assets/hello/m/3.png";
|
document.getElementById('main_img3').src = window.screen.availWidth / window.screen.availHeight > 1.45 ? "/assets/hello/3.png" : "/assets/hello/m/3.png";
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ setInterval(async () => {
|
|||||||
mainMenuErrorHandled = true;
|
mainMenuErrorHandled = true;
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
fl.goJust('/main-mobile', false);
|
fl.goJust('/main-mobile', false);
|
||||||
document.getElementsByTagName('body')[0].style.backgroundImage = 'url("/assets/hello/m/1.gif")';
|
document.getElementsByTagName('body')[0].style.backgroundImage = 'url("/assets/hello/m/1.webp")';
|
||||||
}, 150);
|
}, 150);
|
||||||
}
|
}
|
||||||
else if (mainMenuErrorHandled && window.screen.availWidth >= 768 && location.pathname == "/") { // Вернуть нормальную версию вёрстки
|
else if (mainMenuErrorHandled && window.screen.availWidth >= 768 && location.pathname == "/") { // Вернуть нормальную версию вёрстки
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="carousel-inner">
|
<div class="carousel-inner">
|
||||||
<div class="carousel-item active" data-bs-interval="10000">
|
<div class="carousel-item active" data-bs-interval="10000">
|
||||||
<img id="main_img1" src="/assets/hello/1.gif" class="d-block w-100" alt="...">
|
<img id="main_img1" src="/assets/hello/1.webp" class="d-block w-100" alt="...">
|
||||||
<div class="carousel-caption d-none d-md-block">
|
<div class="carousel-caption d-none d-md-block">
|
||||||
<h5 style="color: white;">Добро пожаловать на мой ресурс</h5>
|
<h5 style="color: white;">Добро пожаловать на мой ресурс</h5>
|
||||||
<p style="color: white;">Это официальный ресурс FullGreaM.</p>
|
<p style="color: white;">Это официальный ресурс FullGreaM.</p>
|
||||||
|
Reference in New Issue
Block a user