Shooting photo
+Pour capturer vos moments les plus précieux et garder un souvenir impérissable. Je me déplace + en Île-de-France pour réaliser vos photos
+diff --git a/assets/images/camera.png b/assets/images/camera.png deleted file mode 100644 index f0552ba3..00000000 Binary files a/assets/images/camera.png and /dev/null differ diff --git a/assets/images/camera.webp b/assets/images/camera.webp new file mode 100644 index 00000000..be2bf3b7 Binary files /dev/null and b/assets/images/camera.webp differ diff --git a/assets/images/gallery/concerts/aaron-paul-wnX-fXzB6Cw-unsplash.jpg b/assets/images/gallery/concerts/aaron-paul-wnX-fXzB6Cw-unsplash.jpg deleted file mode 100644 index d946c8e8..00000000 Binary files a/assets/images/gallery/concerts/aaron-paul-wnX-fXzB6Cw-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/concerts/aaron-paul-wnX-fXzB6Cw-unsplash.webp b/assets/images/gallery/concerts/aaron-paul-wnX-fXzB6Cw-unsplash.webp new file mode 100644 index 00000000..d9a5e88f Binary files /dev/null and b/assets/images/gallery/concerts/aaron-paul-wnX-fXzB6Cw-unsplash.webp differ diff --git a/assets/images/gallery/concerts/austin-neill-hgO1wFPXl3I-unsplash.jpg b/assets/images/gallery/concerts/austin-neill-hgO1wFPXl3I-unsplash.jpg deleted file mode 100644 index 84029f1c..00000000 Binary files a/assets/images/gallery/concerts/austin-neill-hgO1wFPXl3I-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/concerts/austin-neill-hgO1wFPXl3I-unsplash.webp b/assets/images/gallery/concerts/austin-neill-hgO1wFPXl3I-unsplash.webp new file mode 100644 index 00000000..00296941 Binary files /dev/null and b/assets/images/gallery/concerts/austin-neill-hgO1wFPXl3I-unsplash.webp differ diff --git a/assets/images/gallery/entreprise/ali-morshedlou-WMD64tMfc4k-unsplash.jpg b/assets/images/gallery/entreprise/ali-morshedlou-WMD64tMfc4k-unsplash.jpg deleted file mode 100644 index a0fd83fa..00000000 Binary files a/assets/images/gallery/entreprise/ali-morshedlou-WMD64tMfc4k-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/entreprise/ali-morshedlou-WMD64tMfc4k-unsplash.webp b/assets/images/gallery/entreprise/ali-morshedlou-WMD64tMfc4k-unsplash.webp new file mode 100644 index 00000000..f4b4d566 Binary files /dev/null and b/assets/images/gallery/entreprise/ali-morshedlou-WMD64tMfc4k-unsplash.webp differ diff --git a/assets/images/gallery/entreprise/jason-goodman-tHO1_OuKbg0-unsplash.jpg b/assets/images/gallery/entreprise/jason-goodman-tHO1_OuKbg0-unsplash.jpg deleted file mode 100644 index b87ab7c9..00000000 Binary files a/assets/images/gallery/entreprise/jason-goodman-tHO1_OuKbg0-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/entreprise/jason-goodman-tHO1_OuKbg0-unsplash.webp b/assets/images/gallery/entreprise/jason-goodman-tHO1_OuKbg0-unsplash.webp new file mode 100644 index 00000000..8a2af5ab Binary files /dev/null and b/assets/images/gallery/entreprise/jason-goodman-tHO1_OuKbg0-unsplash.webp differ diff --git a/assets/images/gallery/entreprise/mateus-campos-felipe-Fsgzm8N0hIY-unsplash.jpg b/assets/images/gallery/entreprise/mateus-campos-felipe-Fsgzm8N0hIY-unsplash.jpg deleted file mode 100644 index 0901575a..00000000 Binary files a/assets/images/gallery/entreprise/mateus-campos-felipe-Fsgzm8N0hIY-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/entreprise/mateus-campos-felipe-Fsgzm8N0hIY-unsplash.webp b/assets/images/gallery/entreprise/mateus-campos-felipe-Fsgzm8N0hIY-unsplash.webp new file mode 100644 index 00000000..c2790c8d Binary files /dev/null and b/assets/images/gallery/entreprise/mateus-campos-felipe-Fsgzm8N0hIY-unsplash.webp differ diff --git a/assets/images/gallery/mariage/hannah-busing-RvF2R_qMpRk-unsplash.jpg b/assets/images/gallery/mariage/hannah-busing-RvF2R_qMpRk-unsplash.jpg deleted file mode 100644 index b6171083..00000000 Binary files a/assets/images/gallery/mariage/hannah-busing-RvF2R_qMpRk-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/mariage/hannah-busing-RvF2R_qMpRk-unsplash.webp b/assets/images/gallery/mariage/hannah-busing-RvF2R_qMpRk-unsplash.webp new file mode 100644 index 00000000..aa013907 Binary files /dev/null and b/assets/images/gallery/mariage/hannah-busing-RvF2R_qMpRk-unsplash.webp differ diff --git a/assets/images/gallery/mariage/jakob-owens-SiniLJkXhMc-unsplash.jpg b/assets/images/gallery/mariage/jakob-owens-SiniLJkXhMc-unsplash.jpg deleted file mode 100644 index bfd6a4db..00000000 Binary files a/assets/images/gallery/mariage/jakob-owens-SiniLJkXhMc-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/mariage/jakob-owens-SiniLJkXhMc-unsplash.webp b/assets/images/gallery/mariage/jakob-owens-SiniLJkXhMc-unsplash.webp new file mode 100644 index 00000000..a05ab596 Binary files /dev/null and b/assets/images/gallery/mariage/jakob-owens-SiniLJkXhMc-unsplash.webp differ diff --git a/assets/images/gallery/portraits/ade-tunji-rVkhWWZFAtQ-unsplash.jpg b/assets/images/gallery/portraits/ade-tunji-rVkhWWZFAtQ-unsplash.jpg deleted file mode 100644 index a6c1a2c5..00000000 Binary files a/assets/images/gallery/portraits/ade-tunji-rVkhWWZFAtQ-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/portraits/ade-tunji-rVkhWWZFAtQ-unsplash.webp b/assets/images/gallery/portraits/ade-tunji-rVkhWWZFAtQ-unsplash.webp new file mode 100644 index 00000000..cfd8a618 Binary files /dev/null and b/assets/images/gallery/portraits/ade-tunji-rVkhWWZFAtQ-unsplash.webp differ diff --git a/assets/images/gallery/portraits/nino-van-prattenburg--443cl1uR_8-unsplash.jpg b/assets/images/gallery/portraits/nino-van-prattenburg--443cl1uR_8-unsplash.jpg deleted file mode 100644 index 57db1295..00000000 Binary files a/assets/images/gallery/portraits/nino-van-prattenburg--443cl1uR_8-unsplash.jpg and /dev/null differ diff --git a/assets/images/gallery/portraits/nino-van-prattenburg--443cl1uR_8-unsplash.webp b/assets/images/gallery/portraits/nino-van-prattenburg--443cl1uR_8-unsplash.webp new file mode 100644 index 00000000..eb175815 Binary files /dev/null and b/assets/images/gallery/portraits/nino-van-prattenburg--443cl1uR_8-unsplash.webp differ diff --git a/assets/images/nina.png b/assets/images/nina.png deleted file mode 100644 index 05e2a290..00000000 Binary files a/assets/images/nina.png and /dev/null differ diff --git a/assets/images/nina.webp b/assets/images/nina.webp new file mode 100644 index 00000000..b3943c68 Binary files /dev/null and b/assets/images/nina.webp differ diff --git a/assets/images/slider/edward-cisneros-3_h6-1NPDGw-unsplash.jpg b/assets/images/slider/edward-cisneros-3_h6-1NPDGw-unsplash.jpg deleted file mode 100644 index 2c6ecebb..00000000 Binary files a/assets/images/slider/edward-cisneros-3_h6-1NPDGw-unsplash.jpg and /dev/null differ diff --git a/assets/images/slider/edward-cisneros-3_h6-1NPDGw-unsplash.webp b/assets/images/slider/edward-cisneros-3_h6-1NPDGw-unsplash.webp new file mode 100644 index 00000000..4ef9117c Binary files /dev/null and b/assets/images/slider/edward-cisneros-3_h6-1NPDGw-unsplash.webp differ diff --git a/assets/images/slider/nicholas-green-nPz8akkUmDI-unsplash.jpg b/assets/images/slider/nicholas-green-nPz8akkUmDI-unsplash.jpg deleted file mode 100644 index 3e72a388..00000000 Binary files a/assets/images/slider/nicholas-green-nPz8akkUmDI-unsplash.jpg and /dev/null differ diff --git a/assets/images/slider/nicholas-green-nPz8akkUmDI-unsplash.webp b/assets/images/slider/nicholas-green-nPz8akkUmDI-unsplash.webp new file mode 100644 index 00000000..bb13c01c Binary files /dev/null and b/assets/images/slider/nicholas-green-nPz8akkUmDI-unsplash.webp differ diff --git a/assets/images/slider/ryoji-iwata-wUZjnOv7t0g-unsplash.jpg b/assets/images/slider/ryoji-iwata-wUZjnOv7t0g-unsplash.jpg deleted file mode 100644 index 1070c9cf..00000000 Binary files a/assets/images/slider/ryoji-iwata-wUZjnOv7t0g-unsplash.jpg and /dev/null differ diff --git a/assets/images/slider/ryoji-iwata-wUZjnOv7t0g-unsplash.webp b/assets/images/slider/ryoji-iwata-wUZjnOv7t0g-unsplash.webp new file mode 100644 index 00000000..833879c6 Binary files /dev/null and b/assets/images/slider/ryoji-iwata-wUZjnOv7t0g-unsplash.webp differ diff --git a/assets/maugallery.js b/assets/maugallery.js index c5501fec..9852d14a 100644 --- a/assets/maugallery.js +++ b/assets/maugallery.js @@ -1,8 +1,8 @@ -(function($) { - $.fn.mauGallery = function(options) { +(function ($) { + $.fn.mauGallery = function (options) { var options = $.extend($.fn.mauGallery.defaults, options); var tagsCollection = []; - return this.each(function() { + return this.each(function () { $.fn.mauGallery.methods.createRowWrapper($(this)); if (options.lightBox) { $.fn.mauGallery.methods.createLightBox( @@ -15,7 +15,7 @@ $(this) .children(".gallery-item") - .each(function(index) { + .each(function (index) { $.fn.mauGallery.methods.responsiveImageItem($(this)); $.fn.mauGallery.methods.moveItemInRowWrapper($(this)); $.fn.mauGallery.methods.wrapItemInColumn($(this), options.columns); @@ -48,8 +48,8 @@ tagsPosition: "bottom", navigation: true }; - $.fn.mauGallery.listeners = function(options) { - $(".gallery-item").on("click", function() { + $.fn.mauGallery.listeners = function (options) { + $(".gallery-item").on("click", function () { if (options.lightBox && $(this).prop("tagName") === "IMG") { $.fn.mauGallery.methods.openLightBox($(this), options.lightboxId); } else { @@ -121,7 +121,7 @@ }, prevImage() { let activeImage = null; - $("img.gallery-item").each(function() { + $("img.gallery-item").each(function () { if ($(this).attr("src") === $(".lightboxImage").attr("src")) { activeImage = $(this); } @@ -129,13 +129,13 @@ let activeTag = $(".tags-bar span.active-tag").data("images-toggle"); let imagesCollection = []; if (activeTag === "all") { - $(".item-column").each(function() { + $(".item-column").each(function () { if ($(this).children("img").length) { imagesCollection.push($(this).children("img")); } }); } else { - $(".item-column").each(function() { + $(".item-column").each(function () { if ( $(this) .children("img") @@ -145,74 +145,95 @@ } }); } - let index = 0, - next = null; + let index = 0; - $(imagesCollection).each(function(i) { + $(imagesCollection).each(function (i) { if ($(activeImage).attr("src") === $(this).attr("src")) { - index = i ; + index = i; } }); - next = - imagesCollection[index] || - imagesCollection[imagesCollection.length - 1]; - $(".lightboxImage").attr("src", $(next).attr("src")); + /* + CORRECTION APPLIQUÉE ICI + - Les boutons "précédent" et "suivant" de la modale ne permettaient pas + de naviguer correctement entre les images. + - Maintenant : - On calcule l’index de l’image courante. +- Pour PREV : on recule d’une image (si on est au début, on va à la dernière). +- Pour NEXT : on avance d’une image (si on est à la fin, on revient à la première). + */ + + // on recule d’une image + let prevIndex = index - 1; + + // si on est au début, on va à la dernière + if (prevIndex < 0) { + prevIndex = imagesCollection.length - 1; + } + + let prev = imagesCollection[prevIndex]; + + $(".lightboxImage").attr("src", $(prev).attr("src")); }, nextImage() { let activeImage = null; - $("img.gallery-item").each(function() { + + $("img.gallery-item").each(function () { if ($(this).attr("src") === $(".lightboxImage").attr("src")) { activeImage = $(this); } }); + let activeTag = $(".tags-bar span.active-tag").data("images-toggle"); let imagesCollection = []; + if (activeTag === "all") { - $(".item-column").each(function() { + $(".item-column").each(function () { if ($(this).children("img").length) { imagesCollection.push($(this).children("img")); } }); } else { - $(".item-column").each(function() { - if ( - $(this) - .children("img") - .data("gallery-tag") === activeTag - ) { + $(".item-column").each(function () { + if ($(this).children("img").data("gallery-tag") === activeTag) { imagesCollection.push($(this).children("img")); } }); } - let index = 0, - next = null; - $(imagesCollection).each(function(i) { + let index = 0; + + $(imagesCollection).each(function (i) { if ($(activeImage).attr("src") === $(this).attr("src")) { index = i; } }); - next = imagesCollection[index] || imagesCollection[0]; + + // on avance d’une image + let nextIndex = index + 1; + + // si on est à la fin, on revient à la première + if (nextIndex >= imagesCollection.length) { + nextIndex = 0; + } + + let next = imagesCollection[nextIndex]; + $(".lightboxImage").attr("src", $(next).attr("src")); }, createLightBox(gallery, lightboxId, navigation) { - gallery.append(`