-
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 bb505a0
Showing
5 changed files
with
214 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.
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,30 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:[email protected]&family=Press+Start+2P&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" href="style.css"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<section> | ||
<div class="title"> | ||
<p>PIXEL</p> | ||
<p><span>//</span>WAR</p> | ||
</div> | ||
|
||
<div id="countdown"></div> | ||
|
||
<button class="btn-notification"> | ||
<img src="assets/phone.svg" alt="phone-icone"> Me notifier | ||
</button> | ||
</section> | ||
|
||
<p class="wait">En attendant, commencez votre <a href="">Hacker's Journey</a>!</p> | ||
|
||
<script src="script.js"></script> | ||
</body> | ||
</html> |
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,22 @@ | ||
// modifier heure si nécessaire | ||
const endDate = new Date("2024-03-15T20:00:00").getTime(); | ||
|
||
const countdown = setInterval(() => { | ||
const now = new Date().getTime(); | ||
const distance = endDate - now; | ||
|
||
const days = Math.floor(distance / (1000 * 60 * 60 * 24)); | ||
const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); | ||
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); | ||
const seconds = Math.floor((distance % (1000 * 60)) / 1000); | ||
|
||
document.getElementById("countdown").innerHTML = `<p>${days}<span>J</span></p>`; | ||
document.getElementById("countdown").innerHTML += `<p>${hours}<span>H</span></p>`; | ||
document.getElementById("countdown").innerHTML += `<p>${minutes}<span>M</span></p>`; | ||
document.getElementById("countdown").innerHTML += `<p>${seconds}<span>S</span></p>`; | ||
|
||
if (distance < 0) { | ||
clearInterval(countdown); | ||
document.getElementById("countdown").innerHTML ="Le countdown est terminé !"; | ||
} | ||
}, 1000); |
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,102 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: "Press Start 2P", system-ui; | ||
|
||
} | ||
|
||
body { | ||
background-color: #f4f4f4; | ||
background-color: #131518; | ||
color: white; | ||
height: 100vh; | ||
} | ||
|
||
section { | ||
width: 90%; | ||
max-width: 800px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-weight: 700; | ||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
.title { | ||
width: 90%; | ||
max-width: 770px; | ||
font-size: 7em; | ||
margin-bottom: 100px; | ||
} | ||
|
||
#countdown { | ||
display: flex; | ||
font-size: 2em; | ||
margin-bottom: 100px; | ||
} | ||
|
||
#countdown p { | ||
margin: 0 0.5em; | ||
} | ||
|
||
#countdown p span { | ||
margin: 0 0.5em; | ||
opacity: 0.5; | ||
} | ||
|
||
.title p:nth-child(1) { | ||
text-align: left; | ||
} | ||
|
||
.title p:nth-child(2) { | ||
text-align: right; | ||
} | ||
|
||
.btn-notification { | ||
background-image: url(assets/Background.svg); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
color: white; | ||
border: none; | ||
padding: 1.5em; | ||
cursor: pointer; | ||
} | ||
|
||
.wait { | ||
position: fixed; | ||
bottom: 0; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
margin-bottom: 1.5em; | ||
font-size: 0.8em; | ||
text-align: center; | ||
} | ||
|
||
.wait a { | ||
color: #5C5CFF; | ||
text-decoration: none; | ||
} | ||
|
||
@media screen and (max-width: 768px) { | ||
section { | ||
max-width: 90%; | ||
} | ||
|
||
.title { | ||
font-size: 3.5em; | ||
text-align: center; | ||
} | ||
|
||
#countdown { | ||
font-size: 1em; | ||
} | ||
|
||
.wait { | ||
width: 90%; | ||
} | ||
} |