Hey everyone, I am bit confused with the syntax on the bric builder. Maybe I am over thinking it.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#remaining-text {
font-size: 24px;
font-weight: bold;
color: red;
}
.counter{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<div class="counter">
<p>ONLY</p>
<p id="remaining-text"> 25 </p>
<p>LEFT</p>
</div>
<script>let remaining = 25;
function decrementRemaining() {
remaining--;
document.getElementById("remaining-text").innerHTML = `Only ${remaining} left`;
if (remaining <= 0) {
console.log("All gone!");
}
}
setInterval(decrementRemaining, 600000); // 600000 milliseconds = 10 minutes
</script>
</body>
</html>
I want to be able to turn this into a bric. and have the user be able to set the timing. as well as maybe the styling.