updated style for contact form
This commit is contained in:
		| @@ -1,91 +1,95 @@ | |||||||
| <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"> | ||||||
|     <div |     <header class="mb-1.5"> | ||||||
|       v-if="hasMessageError" |       <h3 class="text-xl"> | ||||||
|       class="message message_error" |         Formularz kontaktowy | ||||||
|     > |       </h3> | ||||||
|       {{ messageError }} |  | ||||||
|     </div> |  | ||||||
|     <div |  | ||||||
|       v-if="hasMessageOkStatus" |  | ||||||
|       class="message message_ok" |  | ||||||
|     > |  | ||||||
|       {{ messageOk }} |  | ||||||
|     </div> |  | ||||||
|     <header class="container_head"> |  | ||||||
|       Formularz kontaktowy: |  | ||||||
|     </header> |     </header> | ||||||
|     <form |     <form | ||||||
|       id="form-point" |       class="flex flex-col gap-3 justify-start items-start" | ||||||
|       @submit="formSubmit" |       @submit="formSubmit" | ||||||
|     > |     > | ||||||
|       <label |       <div | ||||||
|         class="label-info" |         v-if="hasMessageError" | ||||||
|         :class="{ 'label-error': isEmailError }" |         class="w-full p-2 bg-red-200 text-red-500 text-sm border border-red-300 rounded-md" | ||||||
|         for="email" |  | ||||||
|       > |       > | ||||||
|         E-mail: |         {{ messageError }} | ||||||
|       </label> |       </div> | ||||||
|       <input |       <div | ||||||
|         id="email" |         v-else-if="hasMessageOkStatus" | ||||||
|         v-model="emailValue" |         class="w-full p-2 bg-[#27ae60] text-white text-sm border border-lime-600 rounded-md shadow" | ||||||
|         class="contact_input" |  | ||||||
|         :class="{ 'contact_input-error': isEmailError }" |  | ||||||
|         type="text" |  | ||||||
|         name="email" |  | ||||||
|         placeholder="przemek.kowalski@gmail.com" |  | ||||||
|       > |       > | ||||||
|       <span |         {{ messageOk }} | ||||||
|         v-if="isEmailError" |       </div> | ||||||
|         class="error-message" |       <div class="flex flex-col gap-1 w-full"> | ||||||
|       > |         <label | ||||||
|         E-mail musi być poprawny, np. przemek.kowalski@gmail.com |           class="text-gray-500" | ||||||
|       </span> |           for="message" | ||||||
|       <label |         > | ||||||
|         class="label-info" |           W czym mogę pomóc? | ||||||
|         :class="{ 'label-error': isMessageError }" |         </label> | ||||||
|         for="message" |         <textarea | ||||||
|       > |           id="message" | ||||||
|         Wiadomość: |           v-model="messageValue" | ||||||
|       </label> |           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" | ||||||
|       <textarea |           :class="[ isMessageError ? 'border-red-400 text-red-400 placeholder-red-300' : 'text-gray-900 placeholder-gray-400' ]" | ||||||
|         id="message" |           name="message" | ||||||
|         v-model="messageValue" |           placeholder="Chciałbym zlecić wykonanie strony..." | ||||||
|         class="contact_input" |         /> | ||||||
|         :class="{ 'contact_input-error': isMessageError }" |         <span | ||||||
|         name="message" |           v-if="isMessageError" | ||||||
|         placeholder="Chciałbym zlecić wykonanie strony..." |         > | ||||||
|       /> |           Wiadomość musi zawierać przynajmniej 3 znaki! | ||||||
|       <span |         </span> | ||||||
|         v-if="isMessageError" |       </div> | ||||||
|         class="error-message" |       <div class="flex flex-col gap-1 w-full"> | ||||||
|       > |         <label | ||||||
|         Wiadomość musi zawierać przynajmniej 3 znaki! |           class="text-gray-500" | ||||||
|       </span> |           for="email" | ||||||
|       <label |         > | ||||||
|         class="label-info" |           Jak mam się skontaktować? | ||||||
|         :class="{ 'label-error': isSenderError }" |         </label> | ||||||
|         for="sender" |         <input | ||||||
|       > |           id="email" | ||||||
|         Podpis nadawcy: |           v-model="emailValue" | ||||||
|       </label> |           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" | ||||||
|       <input |           :class="[ isEmailError ? 'border-red-400 text-red-400 placeholder-red-300' : 'text-gray-900 placeholder-gray-400' ]" | ||||||
|         id="sender" |           type="text" | ||||||
|         v-model="senderValue" |           name="email" | ||||||
|         class="contact_input" |           placeholder="Twój adres e-mail" | ||||||
|         :class="{ 'contact_input-error': isSenderError }" |         > | ||||||
|         type="text" |         <span | ||||||
|         name="sender" |           v-if="isEmailError" | ||||||
|         placeholder="np. Przemek Kowalski" |           class="error-message" | ||||||
|       > |         > | ||||||
|       <span |           E-mail musi być poprawny, np. przemek.kowalski@gmail.com | ||||||
|         v-if="isSenderError" |         </span> | ||||||
|         class="error-message" |       </div> | ||||||
|       > |       <div class="flex flex-col gap-1 w-full"> | ||||||
|         Podpis musi zawierać przynajmniej 3 znaki! |         <label | ||||||
|       </span> |           class="text-gray-500" | ||||||
|  |           for="sender" | ||||||
|  |         > | ||||||
|  |           Podpis | ||||||
|  |         </label> | ||||||
|  |         <input | ||||||
|  |           id="sender" | ||||||
|  |           v-model="senderValue" | ||||||
|  |           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="[ isSenderError ? 'border-red-400 text-red-400 placeholder-red-300' : 'text-gray-900 placeholder-gray-400' ]" | ||||||
|  |           type="text" | ||||||
|  |           name="sender" | ||||||
|  |         > | ||||||
|  |         <span | ||||||
|  |           v-if="isSenderError" | ||||||
|  |           class="error-message" | ||||||
|  |         > | ||||||
|  |           Podpis musi zawierać przynajmniej 3 znaki! | ||||||
|  |         </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> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user