Rennes rebranding
This commit is contained in:
parent
687445e414
commit
3d985e473d
8 changed files with 52 additions and 54 deletions
|
|
@ -34,20 +34,20 @@ lgContainer.addEventListener('lgAfterOpen', () => {
|
|||
|
||||
const downloadUrl = this.getAttribute('href');
|
||||
|
||||
// Affichage de la modale stylisée
|
||||
Swal.fire({
|
||||
title: gettext('Download'),
|
||||
text: gettext("This image is free to download, but permission from the photographer and the people in the photo is required before republishing it on another website. Furthermore, it is good practice to credit L[ENS] and the photographers in any republications."),
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: gettext('Download'),
|
||||
cancelButtonText: gettext('Cancel'),
|
||||
background: '#1a1a1a', // Optionnel : pour matcher le thème sombre de LightGallery
|
||||
color: '#fff'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
// // Affichage de la modale stylisée
|
||||
// Swal.fire({
|
||||
// title: gettext('Download'),
|
||||
// text: gettext("This image is free to download, but permission from the photographer and the people in the photo is required before republishing it on another website. Furthermore, it is good practice to credit L[ENS] and the photographers in any republications."),
|
||||
// icon: 'info',
|
||||
// showCancelButton: true,
|
||||
// confirmButtonColor: '#3085d6',
|
||||
// cancelButtonColor: '#d33',
|
||||
// confirmButtonText: gettext('Download'),
|
||||
// cancelButtonText: gettext('Cancel'),
|
||||
// background: '#1a1a1a', // Optionnel : pour matcher le thème sombre de LightGallery
|
||||
// color: '#fff'
|
||||
// }).then((result) => {
|
||||
// if (result.isConfirmed) {
|
||||
// Si validé, on déclenche le téléchargement
|
||||
const link = document.createElement('a');
|
||||
link.href = downloadUrl;
|
||||
|
|
@ -55,8 +55,8 @@ lgContainer.addEventListener('lgAfterOpen', () => {
|
|||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
}
|
||||
});
|
||||
// }
|
||||
// });
|
||||
}, true); // Utilisation du mode capture pour intercepter avant le script interne
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue