Skip to content

Commit

Permalink
Atualizações javaScript no site do ror
Browse files Browse the repository at this point in the history
  • Loading branch information
EbertonKM committed Nov 13, 2024
1 parent 9fb2328 commit bebd91a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 6 deletions.
4 changes: 2 additions & 2 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ section,

/*Animação de hover scale. Apenas aplicado em telas grandes*/
@media screen and (min-width:991px) {
.hover-scale:hover {
.hover-scale:hover, .hover-scale-survivor:hover {
transform: scale(1.2);
transition: transform 0.2s ease;
}

.hover-scale {
.hover-scale, .hover-scale-survivor {
transition: transform 0.2s ease;
}
}
Expand Down
Binary file added assets/img/backgrounds/background2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/backgrounds/background3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions assets/js/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
$(function() {
var delay = 7;
var currentBackground = 0;
var maxBackground = $('.background').length - 1;

initBackground();
changeBackground();

function initBackground() {
$('.background').hide();
$('.background').eq(currentBackground).show();
}

function changeBackground() {
setInterval(function() {
$('.background').eq(currentBackground).fadeOut(3000);
currentBackground++;
if (currentBackground > maxBackground) {
currentBackground = 0;
}
$('.background').eq(currentBackground).fadeIn(3000)
}, delay * 1000)
}
})
3 changes: 3 additions & 0 deletions assets/js/surviviorsHoverAnimation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$(function() {

})
16 changes: 12 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

<body>
<!--Background da página-->
<img src="assets/img/backgrounds/background3.jpg" alt="background-image" class="background">
<img src="assets/img/backgrounds/background2.jpg" alt="background-image" class="background">
<img src="assets/img/backgrounds/background.jpg" alt="background-image" class="background">

<!--Header com uso do Bootstrap-->
Expand Down Expand Up @@ -120,31 +122,31 @@ <h2 class="titulo bg-fosco">Sobreviventes</h2>
<!--Seleção dos sobreviventes-->
<div class="container-seletor">
<a href="#arti">
<div class="seletor hover-scale bg-fosco">
<div class="seletor hover-scale-survivor bg-fosco">
<img src="assets/img/sobreviventes/arti.webp" alt="Artífice">
<h4>Artífice</h4>
</div>
</a>
</div>
<div class="container-seletor">
<a href="#caca">
<div class="seletor hover-scale bg-fosco">
<div class="seletor hover-scale-survivor bg-fosco">
<img src="assets/img/sobreviventes/caca.webp" alt="Caçadora">
<h4>Caçadora</h4>
</div>
</a>
</div>
<div class="container-seletor">
<a href="#coma">
<div class="seletor hover-scale bg-fosco">
<div class="seletor hover-scale-survivor bg-fosco">
<img src="assets/img/sobreviventes/coma.webp" alt="Comando">
<h4>Comando</h4>
</div>
</a>
</div>
<div class="container-seletor">
<a href="#enge">
<div class="seletor hover-scale bg-fosco">
<div class="seletor hover-scale-survivor bg-fosco">
<img src="assets/img/sobreviventes/enge.webp" alt="Engenheiro">
<h4>Engenheiro</h4>
</div>
Expand Down Expand Up @@ -422,6 +424,12 @@ <h6 class="footer-texto">© Copyright 2012 - 2023 Hopoo Games, LLC</h6>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<!--Link do jQuery-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"
integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!--Link do meu script-->
<script src="assets/js/scripts.js"></script>
</body>

</html>

0 comments on commit bebd91a

Please sign in to comment.