updated style for contact form
This commit is contained in:
parent
a4fe5e4efc
commit
61b8ad6380
@ -1,39 +1,62 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contact_container">
|
<div class="contact_container bg-neutral-100 rounded-md border border-gray-200 max-w-[500px] p-2 shadow">
|
||||||
|
<header class="mb-1.5">
|
||||||
|
<h3 class="text-xl">
|
||||||
|
Formularz kontaktowy
|
||||||
|
</h3>
|
||||||
|
</header>
|
||||||
|
<form
|
||||||
|
class="flex flex-col gap-3 justify-start items-start"
|
||||||
|
@submit="formSubmit"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
v-if="hasMessageError"
|
v-if="hasMessageError"
|
||||||
class="message message_error"
|
class="w-full p-2 bg-red-200 text-red-500 text-sm border border-red-300 rounded-md"
|
||||||
>
|
>
|
||||||
{{ messageError }}
|
{{ messageError }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="hasMessageOkStatus"
|
v-else-if="hasMessageOkStatus"
|
||||||
class="message message_ok"
|
class="w-full p-2 bg-[#27ae60] text-white text-sm border border-lime-600 rounded-md shadow"
|
||||||
>
|
>
|
||||||
{{ messageOk }}
|
{{ messageOk }}
|
||||||
</div>
|
</div>
|
||||||
<header class="container_head">
|
<div class="flex flex-col gap-1 w-full">
|
||||||
Formularz kontaktowy:
|
|
||||||
</header>
|
|
||||||
<form
|
|
||||||
id="form-point"
|
|
||||||
@submit="formSubmit"
|
|
||||||
>
|
|
||||||
<label
|
<label
|
||||||
class="label-info"
|
class="text-gray-500"
|
||||||
:class="{ 'label-error': isEmailError }"
|
for="message"
|
||||||
|
>
|
||||||
|
W czym mogę pomóc?
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
id="message"
|
||||||
|
v-model="messageValue"
|
||||||
|
class="w-full max-w-full min-h-[150px] px-2.5 py-2 border-b-2 border-neutral-300 rounded-md focus:border-neutral-400 hover:border-neutral-500 outline-none"
|
||||||
|
:class="[ isMessageError ? 'border-red-400 text-red-400 placeholder-red-300' : 'text-gray-900 placeholder-gray-400' ]"
|
||||||
|
name="message"
|
||||||
|
placeholder="Chciałbym zlecić wykonanie strony..."
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
v-if="isMessageError"
|
||||||
|
>
|
||||||
|
Wiadomość musi zawierać przynajmniej 3 znaki!
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col gap-1 w-full">
|
||||||
|
<label
|
||||||
|
class="text-gray-500"
|
||||||
for="email"
|
for="email"
|
||||||
>
|
>
|
||||||
E-mail:
|
Jak mam się skontaktować?
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
id="email"
|
id="email"
|
||||||
v-model="emailValue"
|
v-model="emailValue"
|
||||||
class="contact_input"
|
class="w-full px-2.5 py-2 border-b-2 border-neutral-300 rounded-md focus:border-neutral-400 hover:border-neutral-500 outline-none"
|
||||||
:class="{ 'contact_input-error': isEmailError }"
|
:class="[ isEmailError ? 'border-red-400 text-red-400 placeholder-red-300' : 'text-gray-900 placeholder-gray-400' ]"
|
||||||
type="text"
|
type="text"
|
||||||
name="email"
|
name="email"
|
||||||
placeholder="przemek.kowalski@gmail.com"
|
placeholder="Twój adres e-mail"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="isEmailError"
|
v-if="isEmailError"
|
||||||
@ -41,42 +64,21 @@
|
|||||||
>
|
>
|
||||||
E-mail musi być poprawny, np. przemek.kowalski@gmail.com
|
E-mail musi być poprawny, np. przemek.kowalski@gmail.com
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col gap-1 w-full">
|
||||||
<label
|
<label
|
||||||
class="label-info"
|
class="text-gray-500"
|
||||||
:class="{ 'label-error': isMessageError }"
|
|
||||||
for="message"
|
|
||||||
>
|
|
||||||
Wiadomość:
|
|
||||||
</label>
|
|
||||||
<textarea
|
|
||||||
id="message"
|
|
||||||
v-model="messageValue"
|
|
||||||
class="contact_input"
|
|
||||||
:class="{ 'contact_input-error': isMessageError }"
|
|
||||||
name="message"
|
|
||||||
placeholder="Chciałbym zlecić wykonanie strony..."
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-if="isMessageError"
|
|
||||||
class="error-message"
|
|
||||||
>
|
|
||||||
Wiadomość musi zawierać przynajmniej 3 znaki!
|
|
||||||
</span>
|
|
||||||
<label
|
|
||||||
class="label-info"
|
|
||||||
:class="{ 'label-error': isSenderError }"
|
|
||||||
for="sender"
|
for="sender"
|
||||||
>
|
>
|
||||||
Podpis nadawcy:
|
Podpis
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
id="sender"
|
id="sender"
|
||||||
v-model="senderValue"
|
v-model="senderValue"
|
||||||
class="contact_input"
|
class="w-full px-2.5 py-2 border-b-2 border-neutral-300 rounded-md focus:border-neutral-400 hover:border-neutral-500 outline-none"
|
||||||
:class="{ 'contact_input-error': isSenderError }"
|
:class="[ isSenderError ? 'border-red-400 text-red-400 placeholder-red-300' : 'text-gray-900 placeholder-gray-400' ]"
|
||||||
type="text"
|
type="text"
|
||||||
name="sender"
|
name="sender"
|
||||||
placeholder="np. Przemek Kowalski"
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="isSenderError"
|
v-if="isSenderError"
|
||||||
@ -84,8 +86,10 @@
|
|||||||
>
|
>
|
||||||
Podpis musi zawierać przynajmniej 3 znaki!
|
Podpis musi zawierać przynajmniej 3 znaki!
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
<BaseButton
|
<BaseButton
|
||||||
is-reverse
|
is-reverse
|
||||||
|
class="py-1 w-full"
|
||||||
:disabled="isButtonDisabled"
|
:disabled="isButtonDisabled"
|
||||||
>
|
>
|
||||||
Wyślij
|
Wyślij
|
||||||
@ -207,32 +211,14 @@ function formSubmit(event) {
|
|||||||
|
|
||||||
.contact_container {
|
.contact_container {
|
||||||
flex-basis: 500px;
|
flex-basis: 500px;
|
||||||
|
|
||||||
#form-point {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 97%;
|
|
||||||
margin: 0 20px 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.container_head {
|
|
||||||
padding: 10px;
|
|
||||||
line-height: 1.6em;
|
|
||||||
font-size: 1.3em;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact_container {
|
.contact_container {
|
||||||
.label-info {
|
/* .label-info {
|
||||||
width: 97%;
|
width: 97%;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
color: #7a7a7a;
|
color: #7a7a7a;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.error-message {
|
.error-message {
|
||||||
width: 97%;
|
width: 97%;
|
||||||
@ -240,7 +226,7 @@ function formSubmit(event) {
|
|||||||
color: #d44950;
|
color: #d44950;
|
||||||
}
|
}
|
||||||
|
|
||||||
input, textarea {
|
/* input, textarea {
|
||||||
width: 97%;
|
width: 97%;
|
||||||
max-width: 97%;
|
max-width: 97%;
|
||||||
border: 0;
|
border: 0;
|
||||||
@ -251,7 +237,7 @@ function formSubmit(event) {
|
|||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact_input::placeholder {
|
.contact_input::placeholder {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contact_info">
|
<div class="contact_info bg-neutral-100 rounded-md border border-gray-200 max-w-[500px] shadow">
|
||||||
<header class="info_head">
|
<header class="info_head">
|
||||||
Inne formy kontaktu:
|
Inne formy kontaktu:
|
||||||
</header>
|
</header>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="contact">
|
<section class="py-6">
|
||||||
<div class="container">
|
<div class="flex items-start justify-center mx-auto gap-5">
|
||||||
<MailContact />
|
<MailContact />
|
||||||
<OtherContact />
|
<OtherContact />
|
||||||
</div>
|
</div>
|
||||||
@ -29,7 +29,7 @@ onMounted(() => {
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "scss/media";
|
@import "scss/media";
|
||||||
|
|
||||||
.contact {
|
/* .contact {
|
||||||
padding: 25px 0;
|
padding: 25px 0;
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@ -41,9 +41,6 @@ onMounted(() => {
|
|||||||
.contact_container, .contact_info {
|
.contact_container, .contact_info {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
background-color: #eaeaea;
|
|
||||||
border: 2px solid #dadada;
|
|
||||||
border-radius: 2px;
|
|
||||||
box-shadow: 0 0 5px rgba(0, 0, 0, .2);
|
box-shadow: 0 0 5px rgba(0, 0, 0, .2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,5 +66,5 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user