{"id":46,"date":"2020-11-17T15:51:42","date_gmt":"2020-11-17T14:51:42","guid":{"rendered":"http:\/\/diamtam.hombori.org\/diamtam\/?p=46"},"modified":"2022-02-24T08:08:43","modified_gmt":"2022-02-24T07:08:43","slug":"compte-a-rebours-noel","status":"publish","type":"post","link":"https:\/\/diamtam.hombori.org\/diamtam\/2020\/11\/17\/compte-a-rebours-noel\/","title":{"rendered":"COMPTE A REBOURS NO\u00cbL"},"content":{"rendered":"\n<!-- D\u00e9but du compteur -->\n<div id=\"EklaCompteur\" style=\"border: 0px solid #663300; \nwidth: 600px; \ntext-align: center; \nmargin: 0px auto; \npadding: 4px; \n-moz-border-radius: 10px; \n-webkit-border-radius: 10px; \nborder-radius: 10px;\">&nbsp;<\/div>\n<script type=\"text\/JavaScript\">\/\/ <![CDATA[\n\/\/***********************************************************************************************\n\/\/  Compte \u00e0 rebours dans Eklablog\n\/\/  Version 1.1\n\/\/  Auteur : -Thierry-\n\/\/  Blog : http:\/\/gerer-mon-blog.eklablog.fr\/\n\/\/***********************************************************************************************\nvar idtimeEklaCompteur=0;\nfunction EklaDisplayCompteurEklaCompteur() {\n\t\/\/ d\u00e9lais d'affichage\n\tvar delais = 1;\n\t\/\/ Element contenant l'affichage\n\tvar EklaCompteurAffiche=document.getElementById(\"EklaCompteur\");\n\t\/\/ HTML d'affichage\n\tvar html = \"<h2>ENCORE<br> [s] SECONDES<br>AVANT NO\u00cbL !<\/h2>\" ;\n\t\/\/ HTML d'affichage si \u00e9coul\u00e9\n\tvar htmlafter = \"<span style=\\\"color: #663300;\\\">Parti depuis :<\/span><br \/><span style=\\\"color: #b87e49;\\\"><span style=\\\"font-size: 12pt;\\\">[s] s <\/span><\/span>\" ;\n\t\/\/ Date \/ heure courante\n\tvar date1 = new Date();\n\t\/\/ Date \/ heure de fin\n\t\/\/ Attention, le mois commence \u00e0 0 pour janvier\n\tvar date2 = new Date (2022, 11, 25, 7, 24, 8);\n\t\/\/ Nombre de secondes entre les dates\n\tvar nbsec = (date2 - date1) \/ 1000;\n\t\/\/ Nombre de secondes dans une journ\u00e9e\n\tvar nbsecj = 24 * 3600;\n\t\/\/ Pour arr\u00eat compteur si temps \u00e9coul\u00e9 et pas de texte pr\u00e9vu\n\tvar stopcpt=false;\n\t\/\/ Si n\u00e9gatif => temps \u00e9coul\u00e9\n\tif (nbsec <= 0) {\n\t\tnbsec=-nbsec;\n\t\tif (htmlafter!=\"\") \n\t\t\t{ html=htmlafter; }\n\t\telse\n\t\t\t{stopcpt=true;}\n\t}\n\t\/\/ Nombre de jours restants\n\tvar j = Math.floor (nbsec \/ nbsecj);\n\t\/\/ Nombre d'heures restantes\n\tvar h = Math.floor ((nbsec - (j * nbsecj)) \/ 3600);\n\t\/\/ Nombre de minutes restantes\n\tvar m = Math.floor ((nbsec - ((j * nbsecj + h * 3600))) \/ 60);\n\t\/\/ Nombre de secondes restantes\n\tvar s = Math.floor (nbsec);\n\t\/\/ Si pas de texte apr\u00e8s temps \u00e9coul\u00e9 => on met tout \u00e0 z\u00e9ro\n\tif (stopcpt==true) {j=0;h=0;m=0;s=0}\n\t\/\/ Modification du HTML \u00e0 afficher\n\tvar html = html.replace(\"[j]\",j);\n\tvar html = html.replace(\"[h]\",h);\n\tvar html = html.replace(\"[m]\",m);\n\tvar html = html.replace(\"[s]\",s);\n\t\/\/ Affichage\n\tif (EklaCompteurAffiche!=null) {EklaCompteurAffiche.innerHTML = html;}\n\t\/\/ Relance du compteur dans x millisecondes\n\tif (stopcpt==false) {idtimeEklaCompteur=setTimeout (\"EklaDisplayCompteurEklaCompteur();\", 1*1000);}\n}\nEklaDisplayCompteurEklaCompteur();\n\/\/ ]]><\/script>\n<!-- Fin du compteur -->\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;<\/p>\n","protected":false},"author":1,"featured_media":80,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":19,"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":86,"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/posts\/46\/revisions\/86"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/media\/80"}],"wp:attachment":[{"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/diamtam.hombori.org\/diamtam\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}