From ecdcc4664c6ccfa16d2394e38a124d87518e6e80 Mon Sep 17 00:00:00 2001 From: Boyer laurent <154669613+LaurentBoyer1976@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:44:18 +0100 Subject: [PATCH] suppression des dossier inutiles et vides --- .../.DS_Store | Bin .../EllieRoseWilkens.jpg | Bin .../MarcelNikolic.jpg | Bin .../MimiKeel.jpg | Bin .../NabeelBradford.jpg | Bin .../RhodeDubois.jpg | Bin .../TracyGalindo.jpg | Bin css/photographer.css | 6 +- css/style.css | 6 +- photographer.html | 8 +-- sass/index.scss | 54 ------------------ sass/indexStyles.css | 1 - sass/indexStyles.css.map | 1 - scripts/API/api.js | 6 +- scripts/pages/index.js | 2 +- .../constructorPattern/photographeData.js | 2 +- .../photographerPageMediaFactory.js | 11 ++-- scripts/utils/filter.js | 6 +- 18 files changed, 26 insertions(+), 77 deletions(-) rename assets/images/FishEye_Photos/Sample_Photos/{Photographers ID Photos => Photographers_ID_Photos}/.DS_Store (100%) rename assets/images/FishEye_Photos/Sample_Photos/{Photographers ID Photos => Photographers_ID_Photos}/EllieRoseWilkens.jpg (100%) rename assets/images/FishEye_Photos/Sample_Photos/{Photographers ID Photos => Photographers_ID_Photos}/MarcelNikolic.jpg (100%) rename assets/images/FishEye_Photos/Sample_Photos/{Photographers ID Photos => Photographers_ID_Photos}/MimiKeel.jpg (100%) rename assets/images/FishEye_Photos/Sample_Photos/{Photographers ID Photos => Photographers_ID_Photos}/NabeelBradford.jpg (100%) rename assets/images/FishEye_Photos/Sample_Photos/{Photographers ID Photos => Photographers_ID_Photos}/RhodeDubois.jpg (100%) rename assets/images/FishEye_Photos/Sample_Photos/{Photographers ID Photos => Photographers_ID_Photos}/TracyGalindo.jpg (100%) delete mode 100644 sass/index.scss delete mode 100644 sass/indexStyles.css delete mode 100644 sass/indexStyles.css.map diff --git a/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/.DS_Store b/assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/.DS_Store similarity index 100% rename from assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/.DS_Store rename to assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/.DS_Store diff --git a/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/EllieRoseWilkens.jpg b/assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/EllieRoseWilkens.jpg similarity index 100% rename from assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/EllieRoseWilkens.jpg rename to assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/EllieRoseWilkens.jpg diff --git a/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/MarcelNikolic.jpg b/assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/MarcelNikolic.jpg similarity index 100% rename from assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/MarcelNikolic.jpg rename to assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/MarcelNikolic.jpg diff --git a/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/MimiKeel.jpg b/assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/MimiKeel.jpg similarity index 100% rename from assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/MimiKeel.jpg rename to assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/MimiKeel.jpg diff --git a/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/NabeelBradford.jpg b/assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/NabeelBradford.jpg similarity index 100% rename from assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/NabeelBradford.jpg rename to assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/NabeelBradford.jpg diff --git a/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/RhodeDubois.jpg b/assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/RhodeDubois.jpg similarity index 100% rename from assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/RhodeDubois.jpg rename to assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/RhodeDubois.jpg diff --git a/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/TracyGalindo.jpg b/assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/TracyGalindo.jpg similarity index 100% rename from assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/TracyGalindo.jpg rename to assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/TracyGalindo.jpg diff --git a/css/photographer.css b/css/photographer.css index 41603175ba6..31744d2865e 100644 --- a/css/photographer.css +++ b/css/photographer.css @@ -4,7 +4,9 @@ box-sizing: border-box; font-family: 'DM Sans', sans-serif; } - +img{ + overflow-clip-margin: unset +} .Fisheye__header{ height: 135px; position: relative; @@ -64,7 +66,7 @@ max-height: 200px; max-width: 200px; object-fit: cover; - clip-path: circle(29% at 50% 50%); + clip-path: circle(36% at 50% 50%); object-position: center; transform: scale(1.4); } diff --git a/css/style.css b/css/style.css index d434aec6027..961b9c583d5 100644 --- a/css/style.css +++ b/css/style.css @@ -8,7 +8,9 @@ a{ text-decoration: none; } - +img{ + overflow-clip-margin: unset +} header { display: flex; @@ -69,7 +71,7 @@ h1 { height: 200px; width: 200px; object-fit: cover; - clip-path: circle(29% at 50% 50%); + clip-path: circle(36% at 50% 50%); object-position: center; transform: scale(1.4); } diff --git a/photographer.html b/photographer.html index 621cb93132f..22bf7b3bd1f 100644 --- a/photographer.html +++ b/photographer.html @@ -25,18 +25,18 @@

Trier par

- diff --git a/sass/index.scss b/sass/index.scss deleted file mode 100644 index 6714aa6e760..00000000000 --- a/sass/index.scss +++ /dev/null @@ -1,54 +0,0 @@ -@import url("photographer.css"); - -body { - font-family: "DM Sans", sans-serif; - margin: 0; -} - - -header { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - height: 90px; -} - -h1 { - color: #901C1C; - margin-right: 100px; -} - -.logo { - height: 50px; - margin-left: 100px; -} - -.photographer { - display: grid; - grid-template-columns: 1fr 1fr 1fr; - gap: 70px; - margin-top: 100px; -} - -.photographer section { - justify-self: center; - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; -} - -.photographer section h2 { - color: #D3573C; - font-size: 36px; -} - -.photographer section img { - height: 200px; - width: 200px; - object-fit: cover; - clip-path: circle(50% at 50% 50%); - object-position: center; - transform: scale(1.4); -} \ No newline at end of file diff --git a/sass/indexStyles.css b/sass/indexStyles.css deleted file mode 100644 index ab4343acd5a..00000000000 --- a/sass/indexStyles.css +++ /dev/null @@ -1 +0,0 @@ -/*# sourceMappingURL=indexStyles.css.map */ \ No newline at end of file diff --git a/sass/indexStyles.css.map b/sass/indexStyles.css.map deleted file mode 100644 index 117e19231dc..00000000000 --- a/sass/indexStyles.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"indexStyles.css"} \ No newline at end of file diff --git a/scripts/API/api.js b/scripts/API/api.js index 582bccd1b5d..0a65ef89250 100644 --- a/scripts/API/api.js +++ b/scripts/API/api.js @@ -22,11 +22,11 @@ export default class Api { } else { // Gérer les réponses non-JSON de manière appropriée console.error("Le serveur a renvoyé des données non-JSON:", response.status, await response.text()); - return null; // Ou lancez une erreur, ou gérez-la d'une autre manière + return null; // retourne une valeur null. } } catch (err) { console.error("Erreur lors de la récupération des données:", err); - return null; // ou lancez une erreur + return null; // retourne une valeur null. } } -} \ No newline at end of file +} \ No newline at end of file diff --git a/scripts/pages/index.js b/scripts/pages/index.js index 1114b053c76..1f118856b94 100644 --- a/scripts/pages/index.js +++ b/scripts/pages/index.js @@ -16,7 +16,7 @@ const photographerApi = new Api("../../data/photographers.json"); async function init () { const photographersData = await photographerApi.get(); const photographers =photographersData.photographers; - + photographers .map(photographer => new PhotographeData(photographer)) .forEach(async photographer => { diff --git a/scripts/patterns/constructorPattern/photographeData.js b/scripts/patterns/constructorPattern/photographeData.js index 787e5a11531..522a6b937d6 100644 --- a/scripts/patterns/constructorPattern/photographeData.js +++ b/scripts/patterns/constructorPattern/photographeData.js @@ -24,7 +24,7 @@ export default class PhotographeData { * @returns */ formatPortraitPath(portrait){ - return `./assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/${portrait}`; + return `./assets/images/FishEye_Photos/Sample_Photos/Photographers_ID_Photos/${portrait}`; } } diff --git a/scripts/patterns/factoriesPattern/photographerPageMediaFactory.js b/scripts/patterns/factoriesPattern/photographerPageMediaFactory.js index 7859500d535..758998f60ea 100644 --- a/scripts/patterns/factoriesPattern/photographerPageMediaFactory.js +++ b/scripts/patterns/factoriesPattern/photographerPageMediaFactory.js @@ -1,4 +1,3 @@ - export default class PhotographerPageMedia { constructor(photographer, medias) { this.photographer = photographer; @@ -14,15 +13,18 @@ export default class PhotographerPageMedia { const gallery = ` ${this.medias.map(media => { const photographerNameFormatted = this.photographer._name.replace(/-/g, ' '); + const photographerNameEncoded = encodeURIComponent(photographerNameFormatted); + const mediaPath = media._image ? `/assets/images/FishEye_Photos/Sample_Photos/${photographerNameEncoded}/${encodeURIComponent(media._image)}` - : `/assets/images/FishEye_Photos/Sample_Photos/${photographerNameEncoded}/${encodeURIComponent(media._video)}`; + : `/assets/images/FishEye_Photos/Sample_Photos/${photographerNameEncoded}/${encodeURIComponent(media._video)}`; + const mediaElement = media._image ? `${media._title}` : ``; + `; return`