diff --git a/05-lection3/02-modal/index.html b/05-lection3/02-modal/index.html index f54da50..77b0edb 100644 --- a/05-lection3/02-modal/index.html +++ b/05-lection3/02-modal/index.html @@ -7,6 +7,22 @@ Modal + + diff --git a/05-lection3/02-modal/index.js b/05-lection3/02-modal/index.js index c12976f..4856aa6 100644 --- a/05-lection3/02-modal/index.js +++ b/05-lection3/02-modal/index.js @@ -8,12 +8,14 @@ } modalOpen.addEventListener('click', () => { + modalOpen.style.display = 'none'; modal.style.display = 'block'; document.body.overflow = 'hidden'; }); close.addEventListener('click', () => { modal.style.display = 'none'; + modalOpen.style.display = 'block'; document.body.overflow = 'initial'; }); })(); \ No newline at end of file diff --git a/05-lection3/02-modal/modal.css b/05-lection3/02-modal/modal.css index e69de29..8039d11 100644 --- a/05-lection3/02-modal/modal.css +++ b/05-lection3/02-modal/modal.css @@ -0,0 +1,66 @@ +.popup-button { + font-family: 'Roboto'; + font-size: 16px; + font-weight: 500; + height: 48px; + border: none; + border-radius: 8px; + padding-inline: 52px; + text-wrap: nowrap; + cursor: pointer; + transition: all 200ms ease-in-out; +} +.popup-button_primary { + background-color: var(--primary); + color: var(--white); +} +.popup-button_primary:hover { + background-color: #2342C0; +} +.popup { + display: none; + width: 100%; + height: 100vh; + background: rgba(196, 196, 196, 0.5); + position: absolute; + top: 0; + left: 0; +} +.popup__main-block { + max-width: 428px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + padding: 30px 40px; + background: #fff; + border-radius: 8px; +} +.popup__title { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-size: 20px; + line-height: 24px; + color: #334D6E; + margin-bottom: 14px; +} +.popup__text { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-size: 16px; + line-height: 24px; + color: var(--grey-4); +} +.popup__close-button { + background: none; + border: none; + padding: 0; + height: 16px; + position: absolute; + top: 15px; + right: 15px; + cursor: pointer; +} +