diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..c7d51a90 Binary files /dev/null and b/.DS_Store differ diff --git a/index.html b/index.html index 1e3d8e74..71d56440 100644 --- a/index.html +++ b/index.html @@ -54,6 +54,9 @@

Оставайтесь на связи

Оставьте ваши контакты и мы свяжемся с вами сегодня!

+
diff --git a/js/app.js b/js/app.js index 2a0f916d..f7336fee 100644 --- a/js/app.js +++ b/js/app.js @@ -1,3 +1,9 @@ (async () => { - // TODO: add custom logic here + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(position => { + const coordsEl = document.querySelector('#user-coords'); + coordsEl.textContent = `${position.coords.latitude}, ${position.coords.longitude}` + coordsEl.parentElement.classList.remove('invisible'); + }); + } })(); \ No newline at end of file