code to repo
This commit is contained in:
91
index.html
Normal file
91
index.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!-- Feito por ovosimpatico -->
|
||||
<!-- Made by ovosimpatico -->
|
||||
|
||||
<!-- Esse software é licenciado sob a licença AGPLv3. Para mais informações, leia o arquivo LICENSE ou acesse https://www.gnu.org/licenses/agpl-3.0.html -->
|
||||
<!-- This software is licensed under AGPLv3 license. For more information, read LICENSE file or visit https://www.gnu.org/licenses/agpl-3.0.html -->
|
||||
|
||||
<!-- O código fonte desse site está disponível em: -->
|
||||
<!-- The source code of this site is available at: -->
|
||||
<!-- https://git.ovosimpatico.com/ovosimpatico/RPG_Renan -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>RPG</title>
|
||||
<link rel="icon" type="image/x-icon" href="image.png" />
|
||||
<style>
|
||||
body {
|
||||
background-color: black;
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
#contador {
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<img src="image.png" />
|
||||
|
||||
<div id="contador">02:00:00</div>
|
||||
|
||||
<audio id="musica" src="song.mp3" loop></audio>
|
||||
<br />
|
||||
<details>
|
||||
<summary>Controles</summary>
|
||||
<div id="controles">
|
||||
<div>Playback</div>
|
||||
<button onclick="document.getElementById('musica').play()">Play</button>
|
||||
<button onclick="document.getElementById('musica').pause()">
|
||||
Pause
|
||||
</button>
|
||||
<div>Volume</div>
|
||||
<button onclick="diminuirVolume()">- Volume</button>
|
||||
<button onclick="aumentarVolume()">+ Volume</button>
|
||||
<br />
|
||||
<div>Contador</div>
|
||||
<button onclick="resetContador()">Resetar Contador</button>
|
||||
<button onclick="pausarContador()">Pausar Contador</button>
|
||||
</div>
|
||||
</details>
|
||||
<script>
|
||||
let tempo = 7200;
|
||||
let contadorPausado = false;
|
||||
|
||||
function diminuirVolume() {
|
||||
document.getElementById("musica").volume -= 0.1;
|
||||
}
|
||||
|
||||
function aumentarVolume() {
|
||||
document.getElementById("musica").volume += 0.1;
|
||||
}
|
||||
|
||||
function resetContador() {
|
||||
tempo = 7200;
|
||||
}
|
||||
|
||||
function pausarContador() {
|
||||
contadorPausado = !contadorPausado;
|
||||
}
|
||||
|
||||
setInterval(() => {
|
||||
if (!contadorPausado) {
|
||||
let horas = Math.floor(tempo / 3600);
|
||||
let minutos = Math.floor((tempo % 3600) / 60);
|
||||
let segundos = tempo % 60;
|
||||
|
||||
document.getElementById("contador").innerHTML =
|
||||
horas + ":" + minutos + ":" + segundos;
|
||||
tempo--;
|
||||
}
|
||||
}, 1000);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user