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 7f091ef
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 44 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Page non trouvée</title>
<meta charset="utf-8" />
<meta http-equiv="refresh" content="5;url=FishEye/index.html" />
<!-- <meta http-equiv="refresh" content="5;url=FishEye/index.html" />-->
</head>
<body>
<h1>Page non trouvée</h1>
Expand Down
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
3 changes: 0 additions & 3 deletions src/api/photographerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export const usePhotographerService = () => {
};

const getPhotographerById = (idPhotographer, photographers) => {
if (!photographers.find((photographer) => photographer.id === idPhotographer)) {
window.location.href = '../../404.html';
}
return photographers.find((photographer) => photographer.id === idPhotographer);
};

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
15 changes: 13 additions & 2 deletions src/pages/photographer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ 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'));
console.log(idPhotographer);
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 +66,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 7f091ef

Please sign in to comment.