Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
edcarlosrocha authored Apr 18, 2024
0 parents commit cad862f
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 0 deletions.
64 changes: 64 additions & 0 deletions css/estilo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
html, body {
/* 18 */
margin: 0;
padding: 0;
}

#topo {
width: 100%;
height: 50px;
background: rgba(0, 0, 0, 0.514);
position: fixed;
top: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
}

#topo a {
color: white;
text-decoration: none;
margin: 5px;
padding: 5px;
}

#topo a:hover {
color: gold;
border-bottom: 4px solid gold;
text-shadow: 1px 1px 2px orange;
}

.conteudo {
width: 100%;
height: 100vh;
background-size: cover; /* tamanho */
background-position: center;
background-attachment: fixed;
display: flex;
align-items: center;
justify-content: center;
font-size: 4em;
text-shadow: 2px 2px 4px black;
color: white;
}

#div1 {
background-image: url("../img/nature-01.jpg");
}

#div2 {
background-image: url("../img/nature-02.jpg");
}

#div3 {
background-image: url("../img/nature-03.jpg");
}

#div4 {
background-image: url("../img/nature-04.jpg");
}

#div5 {
background-image: url("../img/nature-05.jpg");
}
Binary file added img/nature-01.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 img/nature-02.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 img/nature-03.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 img/nature-04.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 img/nature-05.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Landing Page</title>

<link rel="stylesheet" href="css/estilo.css">

<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
</head>
<body>
<div id="topo">
<a href="#div1" class="link">LINK 1</a>
<a href="#div2" class="link">LINK 2</a>
<a href="#div3" class="link">LINK 3</a>
<a href="#div4" class="link">LINK 4</a>
<a href="#div5" class="link">LINK 5</a>
</div>

<div class="conteudo" id="div1">DIV 1</div>
<div class="conteudo" id="div2">DIV 2</div>
<div class="conteudo" id="div3">DIV 3</div>
<div class="conteudo" id="div4">DIV 4</div>
<div class="conteudo" id="div5">DIV 5</div>

<script src="js/comandos.js"></script>
</body>
</html>
28 changes: 28 additions & 0 deletions js/comandos.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$(function() {
console.log("funcionando..");
});

var topo = $("#topo");

$(window).scroll(function () {
if($(this).scrollTop() > 0) {
topo.css("background-color", "rgba(0, 0, 0, 0.5)");
} else {
topo.css("background-color", "rgba(0, 0, 0, 1)");
}
});

$(".link").click(function (event) {
// Teste;
var target = $(this.hash);
console.log(target);

if (target.length) {
// Evitar que o link funcione!
event.preventDefault();

$("html, body").animate({
scrollTop: target.offset().top
}, 3000);
}
});

0 comments on commit cad862f

Please sign in to comment.