-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d852ef0
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="description" content="A simple mobile-friendly webpage with a countdown timer"> | ||
<title>Your Page Title</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-image: url('MIDTOWN.jpg'); /* Add your image URL here */ | ||
background-size: cover; /* Ensure the image covers the whole page */ | ||
background-position: center; /* Center the image */ | ||
|
||
color: #333; | ||
} | ||
header { | ||
background: #007bff; | ||
color: #fff; | ||
padding: 10px 20px; | ||
text-align: center; | ||
} | ||
main { | ||
padding: 20px; | ||
text-align: center; | ||
} | ||
footer { | ||
text-align: center; | ||
padding: 10px; | ||
background: #007bff; | ||
color: #fff; | ||
position: relative; | ||
bottom: 0; | ||
width: 100%; | ||
} | ||
.countdown { | ||
font-size: 2em; | ||
margin: 20px 0; | ||
color: #48C128; /* Countdown text color */ | ||
} | ||
@media (max-width: 600px) { | ||
body { | ||
padding: 10px; | ||
} | ||
} | ||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
|
||
<main> | ||
<h2>TU BENEFICIO CADUCA EN</h2> | ||
<div class="countdown" id="countdown">05:00</div> | ||
</main> | ||
|
||
|
||
|
||
<script> | ||
let timeLeft = 300; // 5 minutes in seconds | ||
const countdownElement = document.getElementById('countdown'); | ||
|
||
function updateCountdown() { | ||
const minutes = Math.floor(timeLeft / 60); | ||
const seconds = timeLeft % 60; | ||
|
||
countdownElement.textContent = | ||
`${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`; | ||
|
||
if (timeLeft > 0) { | ||
timeLeft--; | ||
} else { | ||
timeLeft = 300; // Reset to 5 minutes | ||
} | ||
} | ||
|
||
setInterval(updateCountdown, 1000); | ||
</script> | ||
|
||
</body> | ||
</html> |