Skip to content

Commit

Permalink
suppressin des dossier inutiles et vides
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentBoyer1976 committed Dec 19, 2024
1 parent 1822b88 commit 0b97835
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 77 deletions.
6 changes: 4 additions & 2 deletions css/photographer.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
6 changes: 4 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ a{
text-decoration: none;
}


img{
overflow-clip-margin: unset
}

header {
display: flex;
Expand Down Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions photographer.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
<h2>Trier par</h2>
<div class="filter" >
<div class="filter__Dropdown">
<button id="filter__Dropdown--BtnJS" class="filter__Dropdown--Btn" type="button" role="button" aria-haspopup="listbox" aria-expanded="false" aria-controls="filter options" aria-label="Sort by">
<button id="filter__Dropdown--BtnJS" class="filter__Dropdown--Btn" type="button" aria-haspopup="listbox" aria-expanded="false" aria-controls="filter options" aria-label="Sort by">
<span id="Selected__FilterJS" class="filter__Dropdown--BtnTitle">Titre</span>
<span class="fa-solid fa-chevron-up" aria-hidden="true"></span>
</button>
<ul class="filter__Dropdown--Ul" aria-hidden="true">
<li class="dropdown__option" role="option">
<li class="dropdown__option" role="listbox">
<button class="dropdown__option--btn" type="button" tabindex="-1" aria-label="Sort by title">Titre</button>
</li>
<li class="dropdown__option" role="option">
<li class="dropdown__option" role="listbox">
<button class="dropdown__option--btn" type="button" tabindex="-1" aria-label="Sort by popularity">Popularité</button>
</li>
<li class="dropdown__option" role="option">
<li class="dropdown__option" role="listbox">
<button class="dropdown__option--btn" type="button" tabindex="-1" aria-label="Sort by date">Date</button>
</li>
</ul>
Expand Down
54 changes: 0 additions & 54 deletions sass/index.scss

This file was deleted.

1 change: 0 additions & 1 deletion sass/indexStyles.css

This file was deleted.

1 change: 0 additions & 1 deletion sass/indexStyles.css.map

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/API/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}
}
}
2 changes: 1 addition & 1 deletion scripts/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/patterns/constructorPattern/photographeData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export default class PhotographerPageMedia {
constructor(photographer, medias) {
this.photographer = photographer;
Expand All @@ -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
? `<img src="${mediaPath}" alt="${media._title}" class="gallery__card--media">`
: `<video class="gallery__card--media" alt="${media._title}">
<source src="${mediaPath}" type="video/mp4">
</video>`;
</video>`;
return`
<section class="gallery__card">
<a class="gallery__card--link" href="#" role="link" data-media="${media._id}" aria-label="Photo">
Expand Down Expand Up @@ -53,7 +55,6 @@ export default class PhotographerPageMedia {

mediaContainer.innerHTML = gallery;
mediaContainer.insertAdjacentHTML('afterend', aside);
mediaContainer.innerHTML = gallery;
return gallery
return gallery;
}
}
6 changes: 3 additions & 3 deletions scripts/utils/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ export function openCloseFilterMenu () {
export function displayMediaWithFilter(mediasTemplate) {
const currentFilter = document.getElementById('Selected__FilterJS');
const allFilters = Array.from(document.querySelectorAll('.dropdown__option--btn'));
console.log("currentFilter", currentFilter, "allFilters", allFilters);

// Trouver le filtre actuellement sélectionné et le masquer
let filterAlreadySelected = allFilters.find(filter => filter.textContent == currentFilter.textContent);
console.log("filterAlreadySelected", filterAlreadySelected);

filterAlreadySelected.style.display = 'none';
// Ajouter des écouteurs d'événements pour chaque filtre
allFilters.forEach(filter => {
filter.addEventListener('click', () => {
// Mettre à jour le texte du filtre actuel
currentFilter.textContent = filter.textContent;
console.log("currentFilter.textContent", currentFilter.textContent);

// Afficher l'ancien filtre sélectionné et masquer le nouveau
if (filterAlreadySelected) filterAlreadySelected.style.display = 'block';
filterAlreadySelected = filter;
Expand Down

0 comments on commit 0b97835

Please sign in to comment.