Add mobile support

This commit is contained in:
Nikiroy78 2023-06-18 23:47:34 +03:00
parent c293b159fa
commit f5c9989433
8 changed files with 12 additions and 5 deletions

BIN
assets/hello/m/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
assets/hello/m/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
assets/hello/m/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -1,7 +1,7 @@
.carousel > .carousel-inner > .carousel-item > img{
width : 100vh;
height : 94vh;
/* margin-bottom : 2.5%; */
/* padding-bottom : -2.5%; */
}
.bg {

6
assets/main.js Normal file
View File

@ -0,0 +1,6 @@
setInterval(async () => {
const isMainMenu = document.getElementById('main_img1')?.src;
document.getElementById('main_img1').src = window.screen.availWidth / window.screen.availHeight > 1.45 ? "/assets/hello/1.png" : "/assets/hello/m/1.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";
}, 1);

View File

@ -27,5 +27,6 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<!-- Go to root -->
<script>setTimeout(async () => fl.go(window.location.pathname), 50);</script>
<script src="/assets/main.js"></script>
</body>
</html>

View File

@ -8,16 +8,15 @@
</div>
<div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="10000">
<img src="/assets/hello/1.png" class="d-block w-100" alt="...">
<img id="main_img1" src="/assets/hello/1.png" class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5 style="color: white;">Добро пожаловать на мой ресурс</h5>
<p style="color: white;">Это официальный ресурс FullGreaM.</p>
<button onclick="fl.go('/contacts');" type="button" class="btn btn-dark">Мои контакты</button>
<!-- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">Мои контакты</button> -->
</div>
</div>
<div class="carousel-item" data-bs-interval="2000">
<img src="/assets/hello/2.png" class="d-block w-100" alt="...">
<img id="main_img2" src="/assets/hello/2.png" class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5 style="color: white;">О проектах и работах</h5>
<p style="color: white;">Здесь представлены мои проекты, работы с активными и актуальными ссылками на скачивание.</p>
@ -25,7 +24,7 @@
</div>
</div>
<div class="carousel-item">
<img src="/assets/hello/3.png" class="d-block w-100" alt="...">
<img id="main_img3" src="/assets/hello/3.png" class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5 style="color: white;">О прочей информации</h5>
<p style="color: white;">Также здесь представлен (или будет представлен) мой личный блог, а также, блог, касающийся моих проектов или проектов моей команды.</p>

View File

@ -26,5 +26,6 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<!-- Go to root -->
<script>setTimeout(async () => fl.go(window.location.pathname), 50);</script>
<script src="/assets/main.js"></script>
</body>
</html>