mirror of
https://github.com/appen-isen/projet-cal.git
synced 2026-01-18 16:47:38 +01:00
push to test
This commit is contained in:
BIN
backend/backend
BIN
backend/backend
Binary file not shown.
@@ -1,2 +1,25 @@
|
||||
27-11-2024;https://vyme.fr
|
||||
01-12-2024;https://vyme.fr
|
||||
07-11-2024;https://vyme.fr
|
||||
02-12-2024;https://vyme.fr
|
||||
03-12-2024;
|
||||
04-12-2024;
|
||||
05-12-2024;
|
||||
06-12-2024;
|
||||
07-12-2024;
|
||||
08-12-2024;
|
||||
09-12-2024;
|
||||
10-12-2024;
|
||||
11-12-2024;
|
||||
12-12-2024;
|
||||
13-12-2024;
|
||||
14-12-2024;
|
||||
15-12-2024;
|
||||
16-12-2024;
|
||||
17-12-2024;
|
||||
18-12-2024;
|
||||
19-12-2024;
|
||||
20-12-2024;
|
||||
21-12-2024;
|
||||
22-12-2024;
|
||||
23-12-2024;
|
||||
24-12-2024;
|
||||
@@ -53,10 +53,10 @@ func getDayAndLink(c *gin.Context) {
|
||||
log.Fatalf("Error reading file: %v", err)
|
||||
}
|
||||
|
||||
link, exists := links[date]
|
||||
if !exists {
|
||||
link/*, exists*/ := links[date]
|
||||
/*if !exists {
|
||||
link = "https://instagram.com/appen_isen"
|
||||
}
|
||||
}*/
|
||||
|
||||
c.JSON(200, LinkAndDate{Link: link, Date: date})
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="grid">
|
||||
<div class="box box-5" id="day-5">5</div>
|
||||
<div class="box box-17" id="day-17">17</div>
|
||||
<div class="box box-27" id="day-27">27</div>
|
||||
<div class="box box-1" id="day-1">1</div>
|
||||
<div class="box box-24" id="day-24">24</div>
|
||||
<div class="box box-12" id="day-12">12</div>
|
||||
<div class="box box-7" id="day-7">7</div>
|
||||
|
||||
@@ -29,27 +29,30 @@ function initCalendar() {
|
||||
|
||||
if (!dayData) return; // Si l'appel API échoue, on ne fait rien
|
||||
|
||||
|
||||
const todayDate = parseInt(dayData.date.split("-")[0], 10); // Extraire le jour de la date (ex : "27")
|
||||
const link = dayData.link;
|
||||
|
||||
if (parseInt(dayNumber, 10) === todayDate) {
|
||||
showModal("🎉 Bravo !", `Voici votre lien du jour : <a href="${link}" target="_blank">${link}</a>`);
|
||||
if (link)
|
||||
showModal(`Voici votre lien du jour : <a href="${link}" target="_blank">${link}</a>`);
|
||||
else
|
||||
showModal("Ce lien n'existe pas. Si cela n'est pas normale, veuillez contacter <a href='https://instagram.com/appen_isen'>Appen sur instagram</a>.");
|
||||
} else {
|
||||
showModal("⏳ Patience...", "Ce n'est pas encore le jour pour ouvrir cette boîte !");
|
||||
showModal("Ce lien n'est pas encore ou plus disponible !");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Fonction pour afficher une modale
|
||||
function showModal(title, message) {
|
||||
function showModal(message) {
|
||||
// Créer la structure HTML de la modale
|
||||
const modal = document.createElement("div");
|
||||
modal.className = "modal";
|
||||
modal.innerHTML = `
|
||||
<div class="modal-content">
|
||||
<span class="close">×</span>
|
||||
<h2>${title}</h2>
|
||||
<p>${message}</p>
|
||||
</div>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user