2022-06-10 01:41:26 +02:00
< ? php
ob_start (); // Start reading html
2023-04-20 20:33:46 +02:00
2022-06-10 01:41:26 +02:00
?>
< main >
2023-04-20 20:33:46 +02:00
< script >
/*
Script du decompte avant la semaine d ' accueil .
*/
// avis aux futurs devs, changez la date ici :)
var target_date = Math . floor ( Date . parse ( " 15-Sep-2023 00:00:00 " ) / 1000 )
2023-04-22 14:22:56 +02:00
// le coef d'aggrandissement de l'image de la taupe
var coef = 1
2023-04-20 20:33:46 +02:00
function set_timer (){
// recupere la date actuelle
var date_now = Math . floor ( Date . now () / 1000 );
// savants calculs à base de division de timestamps UNIX en secondes
var delta_seconds = target_date - date_now ;
var delta_days = Math . floor ( delta_seconds / ( 60 * 60 * 24 ));
var delta_hours = Math . floor (( delta_seconds % ( 60 * 60 * 24 )) / ( 60 * 60 ));
var delta_minutes = Math . floor (( delta_seconds % ( 60 * 60 )) / 60 );
delta_seconds = delta_seconds % 60 ;
// on met tout dans le div du decompte
document . getElementById ( " decompte " ) . innerText = " J - "
+ delta_days + " j "
+ delta_hours + " h "
+ delta_minutes + " min "
+ delta_seconds + " s " ;
2023-04-22 14:22:56 +02:00
var taupe_img = document . getElementById ( " taupe " );
taupe_img . width = 12 * coef ;
taupe_img . height = 8 * coef ;
taupe_img . style = " top : " + 1000 - 100 * coef + " ; " ;
coef = coef + 1 ;
2023-04-20 20:33:46 +02:00
// récursion chaque seconde
setTimeout ( set_timer , 1000 );
}
// assigne la fonction qui gère le timer au chargement de la page
window . onload = set_timer ;
</ script >
2022-06-10 01:41:26 +02:00
< div id = " msg_acc " >
< p >
2023-04-20 20:33:46 +02:00
/! \ Page en construction , revenez plus tard /! \ < br >
( Taper un dev ne le fera pas aller plus vite ... sauf s ' il est soudoyé )
2022-06-10 01:41:26 +02:00
</ p >
2023-04-20 20:33:46 +02:00
< div id = " decompte " >
</ div >
2022-06-10 01:41:26 +02:00
</ div >
2023-04-20 20:33:46 +02:00
2023-04-22 14:22:56 +02:00
< img id = " taupe " src = " assets/img/bonjoir.jpg " >
2023-04-20 20:33:46 +02:00
2022-06-10 01:41:26 +02:00
</ main >
< ? php
2023-01-22 12:46:06 +01:00
$infopage = [ " " , " En construction " , ob_get_clean (), " " , " index " , " Page en Construction " ]; //relativepath, pagetitle, pagecontent, pagescript, pagename | cf structure/template.php ligne 2 à 6
2022-06-10 01:41:26 +02:00
include ( " structure/template.php " );
?>