small edits on the about, contacts page and js
This commit is contained in:
@@ -141,6 +141,21 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
modalClose()
|
||||
})
|
||||
}
|
||||
const mapsWrapper = document.querySelector('.contacts__maps')
|
||||
if (mapsWrapper) {
|
||||
const mapsBtns = document.querySelectorAll('button.btn__maps')
|
||||
for (const mapsBtn of mapsBtns) {
|
||||
mapsBtn.addEventListener('click', function (e) {
|
||||
const btnMapsData = mapsBtn.dataset.maps
|
||||
const mapsIframe = document.querySelector('.contacts__maps iframe')
|
||||
// mapsIframe.src = btnMapsData
|
||||
mapsIframe.src =
|
||||
'https://yandex.ru/map-widget/v1/?lang=ru_RU&scroll=true&source=constructor-api&um=constructor%' +
|
||||
btnMapsData +
|
||||
''
|
||||
})
|
||||
}
|
||||
}
|
||||
let scrollLinks = document.querySelectorAll('a[href*="#"]')
|
||||
for (let scrollLink of scrollLinks) {
|
||||
scrollLink.addEventListener('click', function (event) {
|
||||
|
||||
Reference in New Issue
Block a user