95 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			95 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
| <!DOCTYPE HTML>
 | |
| <html>
 | |
| <head>
 | |
|   <title>Bite my chin</title>
 | |
|   <meta charset="utf-8">
 | |
|   <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | |
| </head>
 | |
| <body>
 | |
| 
 | |
| <style>
 | |
| * {
 | |
|   margin: 0px;
 | |
|   padding: 0px;
 | |
| }
 | |
| 
 | |
| div#app {
 | |
|   max-width: 400px;
 | |
|   margin-left: auto;
 | |
|   margin-right: auto;
 | |
|   padding: 10px;
 | |
| }
 | |
| 
 | |
| section#intro {
 | |
|   margin-top: 20px;
 | |
|   text-align: left;
 | |
| }
 | |
| 
 | |
| p {
 | |
|   margin-bottom: 10px;
 | |
| }
 | |
| 
 | |
| section#countdown {
 | |
|   width: 100%;
 | |
|   text-align: center;
 | |
| }
 | |
| 
 | |
| @font-face{
 | |
|   font-family: LatinMono;
 | |
|   src: url(https://file.brz9.dev/web/fonts/Latin-Modern-Mono/lmmonolt10-bold.otf);
 | |
|   font-style: normal;
 | |
|   font-weight: 400;
 | |
| }
 | |
| 
 | |
| * {
 | |
|   font-family: LatinMono;
 | |
|   font-size: 1rem;
 | |
|   color: #18181b;
 | |
|   background-color: #faeada;
 | |
| }
 | |
| </style>
 | |
| 
 | |
| <div id="app">
 | |
| 
 | |
|   <section id="intro">
 | |
|     <p>My Dear,</p>
 | |
|     <p></p>
 | |
|     <p>Want to kiss you:</p>
 | |
|   <section id="countdown">
 | |
|     <span class="hcount"></span><span> hours, </span>
 | |
|     <span class="mcount"></span><span> minutes and</span>
 | |
|     <span class="scount"></span><span> seconds.</span>
 | |
|   </section>
 | |
|   <p></p>
 | |
|   <p>Then, we will eat pasta.</p>
 | |
|   <p></p>
 | |
|   <p>Looking forward to iting,</p>
 | |
|   <p>Chchjksdchk</p>
 | |
|   </section>
 | |
| 
 | |
| </div>
 | |
| 
 | |
| 
 | |
| </body>
 | |
| <script>
 | |
| countdown = () => {
 | |
|   const youpiTime = new Date('Apr 06 2022 14:00:00 GMT+0100')
 | |
|   var youpT = youpiTime.getTime()
 | |
|   let parisString = new Date().toLocaleString("en-US", { timeZone: "Europe/Paris" });
 | |
|   let parisTime = new Date(parisString)
 | |
|   let parisT = parisTime.getTime()
 | |
|   let gap = youpT - parisT
 | |
|   secLeft = Math.floor((gap / 1000) % 60)
 | |
|   totalMinLeft = Math.floor(gap / 1000 / 60)
 | |
|   hoursLeft = Math.floor(totalMinLeft / 60)
 | |
|   minLeft = Math.floor(totalMinLeft % 60)
 | |
|   document.querySelector('.hcount').innerText = hoursLeft
 | |
|   document.querySelector('.mcount').innerText = minLeft
 | |
|   document.querySelector('.scount').innerText = secLeft
 | |
| }
 | |
| 
 | |
| setInterval(countdown, 1000)
 | |
| </script>
 | |
| </html>
 | |
| 
 |