Skip to content

Commit

Permalink
script para identificar o ano automaticamente
Browse files Browse the repository at this point in the history
  • Loading branch information
professorjosedeassis committed Apr 10, 2024
1 parent 7d630aa commit 6bb0ce0
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
2 changes: 1 addition & 1 deletion and.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h1>Operadores lógicos</h1>
</div>

<footer>
<p>©2022 - Professor José de Assis</p>
<p>&#169;<span id="copyrightYear"></span> - <a href="https://joseassis.com.br/" target="_blank">Professor José de Assis</a></p>
</footer>
<script src="logica.js"></script>
</body>
Expand Down
78 changes: 37 additions & 41 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,42 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width,
initial-scale=1.0"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="description" content="Simulador de operadores lógicos" />
<title>Operadores lógicos.</title>
<link rel="icon" href="img/favicon.png" />
<link rel="stylesheet" href="style.css" />
</head>

<body id="operators">
<header>
<h1>Operadores lógicos</h1>
<nav>
<ul>
<li><a href="index.html" id="op">Home</a></li>
<li><a href="and.html" id="p1">AND</a></li>
<li><a href="or.html" id="p2">OR</a></li>
<li><a href="not.html" id="p3">NOT</a></li>
<li>
<a
href="https://github.com/professorjosedeassis/logical-operators"
target="_blank"
>GitHub</a
>
</li>
</ul>
</nav>
</header>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,
initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="description" content="Simulador de operadores lógicos" />
<title>Operadores lógicos.</title>
<link rel="icon" href="img/favicon.png" />
<link rel="stylesheet" href="style.css" />
</head>

<div class="Content">
<img src="img/on.jpg" alt="lâmpada" id="lamp" onclick="sw(3)" />
</div>
<body id="operators"> >
<header>
<h1>Operadores lógicos</h1>
<nav>
<ul>
<li><a href="index.html" id="op">Home</a></li>
<li><a href="and.html" id="p1">AND</a></li>
<li><a href="or.html" id="p2">OR</a></li>
<li><a href="not.html" id="p3">NOT</a></li>
<li>
<a href="https://github.com/professorjosedeassis/logical-operators" target="_blank">GitHub</a>
</li>
</ul>
</nav>
</header>

<footer>
<p>©2022 - Professor José de Assis</p>
</footer>
<script src="logica.js"></script>
</body>
</html>
<div class="Content">
<img src="img/on.jpg" alt="lâmpada" id="lamp" onclick="sw(3)" />
</div>

<footer>
<p>&#169;<span id="copyrightYear"></span> - <a href="https://joseassis.com.br/" target="_blank">Professor José de
Assis</a></p>
</footer>
<script src="logica.js"></script>
</body>

</html>
5 changes: 5 additions & 0 deletions logica.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ function sw(receive) {
}
}
}

// Atualizar automaticamente o ano (footer - copyright)
let ano = document.getElementById("copyrightYear")
let anoAtual = new Date().getFullYear()
ano.textContent = anoAtual
2 changes: 1 addition & 1 deletion not.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1>Operadores lógicos</h1>
</div>

<footer>
<p>©2022 - Professor José de Assis</p>
<p>&#169;<span id="copyrightYear"></span> - <a href="https://joseassis.com.br/" target="_blank">Professor José de Assis</a></p>
</footer>
<script src="logica.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion or.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h1>Operadores lógicos</h1>
</div>

<footer>
<p>©2022 - Professor José de Assis</p>
<p>&#169;<span id="copyrightYear"></span> - <a href="https://joseassis.com.br/" target="_blank">Professor José de Assis</a></p>
</footer>
<script src="logica.js"></script>
</body>
Expand Down
9 changes: 7 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,14 @@ footer {
width: 100%;
background-color: #cc470d;
color: #fff;
padding: 5px 0px;
text-align: center;
padding: 5px 0px;
font-size: 0.85em;
text-align: center;
}

footer a {
text-decoration: none;
color: #fff;
}

#sw1 {
Expand Down

0 comments on commit 6bb0ce0

Please sign in to comment.