Skip to content

Commit

Permalink
chore: add devDependencies to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
getsu7 committed Sep 27, 2024
1 parent faff062 commit ecfdd24
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 40 deletions.
31 changes: 0 additions & 31 deletions package-lock.json

This file was deleted.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@
"bugs": {
"url": "https://github.com/getsu7/Fisheye/issues"
},
"homepage": "https://github.com/getsu7/Fisheye#readme",
"dependencies": {
"prettier": "^3.3.0"
}
"homepage": "https://github.com/getsu7/Fisheye#readme"
}
2 changes: 1 addition & 1 deletion photographer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</header>
<main id="main">
<div class="photograph-header">
<button class="contact_button" onclick="displayModal()">Contactez-moi</button>
<button class="contact_button">Contactez-moi</button>
</div>
<div class="media-filter">
<label>Trier par</label>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export const init = (e, data) => {
backArrowButton.style.display = 'none';
nextArrowButton.style.display = 'block';
} else if (lightBoxMediaCounter === data.media.length - 1) {
nextArrowButton.style.display = 'none';
backArrowButton.style.display = 'block';
nextArrowButton.style.display = 'none';
} else {
nextArrowButton.style.display = 'block';
backArrowButton.style.display = 'block';
nextArrowButton.style.display = 'block';
}
};

Expand Down
14 changes: 12 additions & 2 deletions src/pages/photographer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ import { usePhotographerTemplate } from '../templates/photographer.js';
const { getHeaderPhotographerDOM, getFooterPhotographerDOM } = usePhotographerTemplate();
import { useMediaFactorie } from '../factories/mediaFactorie.js';
import { orderBy } from '../utils/mediaFilter.js';
import * as contactForm from '../utils/contactForm.js';
const { createMediaCard } = useMediaFactorie();
import * as lightBox from './lightbox.js';

const idPhotographer = parseInt(new URL(document.location).searchParams.get('id'));
let photographer;
let likes;

//add default value on select
const contactButton = document.querySelector('.contact_button');
contactButton.addEventListener('click', contactForm.useContactModal().displayModal);

const mediaFilter = document.querySelector('.media-filter');
mediaFilter.addEventListener('change', (e) => {
photographer.media = orderBy(e.target.value, photographer.media);
Expand Down Expand Up @@ -62,12 +65,19 @@ const init = async () => {
};

init().then(() => {
photographer.media.forEach((obj) => {
Object.defineProperty(obj, 'liked', {
value: false,
writable: true
});
});
const likesButtons = document.querySelectorAll('.media-card__like');
likesButtons.forEach((likeButton) =>
likeButton.addEventListener('click', (e) => {
// console.log(e.target.value);
console.log(e.target);
})
);

openLightbox();
addEventListener('mediaListUpdated', openLightbox);
});

0 comments on commit ecfdd24

Please sign in to comment.