added autoscroll for contact form
This commit is contained in:
parent
1d9d84484d
commit
f4dc87d841
@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<div class="contact_container w-full bg-neutral-100 rounded-md border border-gray-200 md:max-w-[500px] p-2 shadow">
|
||||
<div
|
||||
id="contact-form"
|
||||
class="contact_container w-full bg-neutral-100 rounded-md border border-gray-200 md:max-w-[500px] p-2 shadow"
|
||||
>
|
||||
<header class="mb-1.5">
|
||||
<h3 class="text-xl">
|
||||
Formularz kontaktowy
|
||||
@ -204,6 +207,14 @@ function formSubmit(event) {
|
||||
buttonDisabled.value = false
|
||||
})
|
||||
}
|
||||
|
||||
scrollTo('#contact-form')
|
||||
}
|
||||
|
||||
function scrollTo(id) {
|
||||
document.querySelector(id).scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<section class="px-3 py-6">
|
||||
<div class="flex flex-col md:flex-row items-start justify-center mx-auto gap-5">
|
||||
<MailContact />
|
||||
<OtherContact />
|
||||
</div>
|
||||
<section class="flex flex-col px-3 py-6 md:flex-row items-start justify-center mx-auto gap-5">
|
||||
<MailContact />
|
||||
<OtherContact />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user