Skip to content

Commit

Permalink
final-deploy-#3
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgiySergeev committed May 24, 2023
1 parent 1b3c31b commit 0f2a533
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 395 deletions.
14 changes: 12 additions & 2 deletions src/css/order-modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,18 @@
}
}



.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
white-space: nowrap;
clip-path: inset(100%);
clip: rect(0 0 0 0);
overflow: hidden;
}
.input-modal-field {
width: 100%;
height: 40px;
Expand Down
5 changes: 4 additions & 1 deletion src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
@import url('./thanks-mod.css');
@import url('./basket-modal.css');


html {
tab-size: 4;
scroll-behavior: smooth;
}
body {
background-color: #ae1332;
color: #ffffff;
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</footer>

<!-- modal windows -->
<div class="overlay js-overlay-modal"></div>

<load src="partials/order-mod.html" />
<load src="partials/thanks-mod.html" />
<load src="partials/basket-mod.html" />
Expand Down
4 changes: 2 additions & 2 deletions src/js/thanks-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const backdrop = document.querySelector('.overlay');
const openModalBtn = document.querySelector('.contacts-button');
const closeBtns = document.querySelectorAll('.close-btn');
const openSuccessModal = () => {
thankModal.classList.add(MODAL_ACTIVE_CLASS_NAME);
backdrop.classList.add(MODAL_ACTIVE_CLASS_NAME);
thankModal.classList.add(MODAL_ACTIVE_CLASS_NAME);
};
const closeSuccessModal = () => {
thankModal.classList.remove(MODAL_ACTIVE_CLASS_NAME);
Expand All @@ -21,4 +21,4 @@ closeBtns.forEach(btn => {
form.addEventListener('submit', e => {
e.preventDefault();
setTimeout(openSuccessModal, 300);
});
});
Loading

0 comments on commit 0f2a533

Please sign in to comment.