Skip to content

Commit

Permalink
all is fixed supposedly
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayotopia04 committed Jan 28, 2024
1 parent 78a7556 commit 0abe0ff
Show file tree
Hide file tree
Showing 16 changed files with 365 additions and 351 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "parcel-project-template",
"version": "2.0.0",
"description": "",
"homepage": "https://johncleece.github.io/team-project",
"homepage": "https://mayotopia04.github.io/TheWatchSpot",
"scripts": {
"start": "parcel src/*.html",
"build": "parcel build src/*.html --public-url /team-project/"
"build": "parcel build src/*.html --public-url /TheWatchSpot/"
},
"repository": {
"type": "git",
Expand All @@ -19,7 +19,7 @@
},
"dependencies": {
"modern-normalize": "^1.1.0",
"swiper": "^10.2.0"
"swiper": "^10.3.1"
},
"devDependencies": {
"@parcel/transformer-sass": "^2.6.0",
Expand Down
34 changes: 7 additions & 27 deletions src/images/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions src/images/the-watch-logo.svg

This file was deleted.

6 changes: 1 addition & 5 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@
href="https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,400;1,600&display=swap"
rel="stylesheet"
/>

<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
/>

<link rel="icon" type="images/icon" href="./images/the-watch-logo.svg" />

<link rel="stylesheet" href="./sass/index.scss" />
<script src="https://cdn.jsdelivr.net/npm/swiper@10/swiper-element-bundle.min.js"></script>
<title>The Watch Spot</title>
Expand All @@ -33,7 +29,7 @@

<script src="./js/catalog-modal.js"></script>
<script src="./js/slider.js"></script>
<script src="./js/sale.js"></script>
<script src="./js/index.js"></script>
<script src="./js/sale.js"></script>
</body>
</html>
26 changes: 20 additions & 6 deletions src/js/sale.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
function displayImage(imageSrc) {
var imageContainer = document.getElementById('imagecontainer');
const imageContainer = document.getElementById('imagecontainer');
const imageElements = document.querySelectorAll('.sale-watch-preview');
// const imageSelected = document.querySelector(`.imageselected-${imageSrc}`);

// const imageActive = document.querySelector('.activeimage');



// Create a new image element
var img = document.createElement('img');
img.src = imageSrc;
img.alt = 'Selected Image';
imageElements.forEach(element => {
element.classList.remove('activeimage');
});
imageElements[imageSrc].classList.add('activeimage');


// imageActive.classList.remove('activeimage');
// imageSelected.classList.toggle('activeimage');


// Clear the contents of the image container
imageContainer.innerHTML = '';

// Append the selected image to the container
imageContainer.appendChild(img);

}
Loading

0 comments on commit 0abe0ff

Please sign in to comment.