Bläddra i källkod

contact page graphic finalization

Olivier Massot 1 år sedan
förälder
incheckning
1e4d3c0514
3 ändrade filer med 190 tillägg och 66 borttagningar
  1. 1 1
      components/Contact/Banner.vue
  2. 77 26
      components/Contact/Form.vue
  3. 112 39
      components/Contact/Map.vue

+ 1 - 1
components/Contact/Banner.vue

@@ -2,7 +2,7 @@
   <LayoutContainer>
   <LayoutContainer>
     <LayoutUITitlePage>
     <LayoutUITitlePage>
       Besoin d'aide ?
       Besoin d'aide ?
-      <template #subtitle>Notre équipe est là pour vous. contactez-nous!. </template>
+      <template #subtitle>Notre équipe est là pour vous. Contactez-nous! </template>
     </LayoutUITitlePage>
     </LayoutUITitlePage>
 
 
     <v-row>
     <v-row>

+ 77 - 26
components/Contact/Form.vue

@@ -10,10 +10,10 @@
     >
     >
       <v-container>
       <v-container>
         <h4>
         <h4>
-          Veuillez remplir le formulaire ci-dessous
+          <span class="line" /> Veuillez remplir le formulaire ci-dessous
         </h4>
         </h4>
 
 
-        <i>Les champs dont le nom est suivi d'une astérisque (*) sont obligatoires</i>
+        <i>Les champs dont le nom est suivi d'un astérisque (*) sont obligatoires</i>
 
 
         <h6>
         <h6>
           Vos coordonnées
           Vos coordonnées
@@ -108,7 +108,7 @@
         </v-row>
         </v-row>
 
 
         <h6>
         <h6>
-          Votre demande concerne
+          Votre demande concerne *
         </h6>
         </h6>
 
 
         <!-- Request type and product concerned  -->
         <!-- Request type and product concerned  -->
@@ -119,18 +119,14 @@
               :items="requestTypes"
               :items="requestTypes"
               item-value="id"
               item-value="id"
               item-title="label"
               item-title="label"
-              label="Votre demande concerne *"
-              outlined
-              dense
+              variant="outlined"
             />
             />
           </v-col>
           </v-col>
 
 
           <v-col cols="12" md="6">
           <v-col cols="12" md="6">
             <v-text-field
             <v-text-field
               v-model="contactRequest.concernedProduct"
               v-model="contactRequest.concernedProduct"
-              label="Le produit concerné"
-              outlined
-              dense
+              label="Produit concerné (facultatif)"
             />
             />
           </v-col>
           </v-col>
         </v-row>
         </v-row>
@@ -140,17 +136,16 @@
         </h6>
         </h6>
 
 
         <!-- Message  -->
         <!-- Message  -->
-        <v-row>
+        <v-row class="mb-8">
           <v-col cols="12">
           <v-col cols="12">
             <v-textarea
             <v-textarea
               v-model="contactRequest.message"
               v-model="contactRequest.message"
               :rules="[validateNonEmptyMessage, validateMessageLength]"
               :rules="[validateNonEmptyMessage, validateMessageLength]"
               label="Votre message*"
               label="Votre message*"
               required
               required
-              outlined
-              dense
               maxlength="400"
               maxlength="400"
             />
             />
+            <span class="remaining-cars-notice">{{ leftCars }} caractères restants</span>
           </v-col>
           </v-col>
         </v-row>
         </v-row>
 
 
@@ -166,18 +161,32 @@
           label="Je souhaite recevoir des communications d'Opentalent par email (promotions, informations logiciel…). Je pourrai me désinscrire à tout moment."
           label="Je souhaite recevoir des communications d'Opentalent par email (promotions, informations logiciel…). Je pourrai me désinscrire à tout moment."
         />
         />
 
 
-        <!-- @see https://github.com/hCaptcha/vue-hcaptcha -->
-        <LayoutCaptcha/>
+        <div class="d-flex flex-row justify-center">
+          <!-- @see https://github.com/hCaptcha/vue-hcaptcha -->
+          <LayoutCaptcha/>
+        </div>
 
 
         <!-- Submit Button -->
         <!-- Submit Button -->
-        <v-row class="mt-12">
-          <v-col cols="12">
-            <v-btn type="submit">
-              Envoyer
-            </v-btn>
-          </v-col>
-        </v-row>
+        <div class="d-flex flex-row justify-center my-10">
+          <v-btn
+            type="submit"
+            variant="outlined"
+            :height="54"
+            :width="180"
+            class="submit-btn"
+          >
+            Envoyer
+          </v-btn>
+        </div>
       </v-container>
       </v-container>
+
+      <div class="legal">
+        Les données recueillies par Opentalent sont utilisées pour le traitement de votre demande et pour vous informer sur nos offres.
+        Elles sont destinées aux services Opentalent et à ses sous-traitants pour l’exécution des contrats. Conformément à la loi
+        "Informatique et Libertés du 6 Janvier 1978", vous disposez d’un droit d’accès, de modifications, de rectification et de suppression
+        des données vous concernant. Pour toute demande, adressez-vous à : Opentalent, 217 rue Raoul Follereau, 74300 CLUSES,
+        opentalent.fr s’engage à la confidentialité et à la protection de vos données.
+      </div>
     </v-form>
     </v-form>
 
 
     <div v-else class="confirmation-message d-flex flex-row justify-center">
     <div v-else class="confirmation-message d-flex flex-row justify-center">
@@ -213,6 +222,12 @@ const defaultRequestType = route.query.request ?? 'CONTACT_REQUEST_INFORMATION'
 //@ts-ignore
 //@ts-ignore
 const contactRequest: ContactRequest = reactive(em.newInstance(ContactRequest, { requestType: defaultRequestType }))
 const contactRequest: ContactRequest = reactive(em.newInstance(ContactRequest, { requestType: defaultRequestType }))
 
 
+const maxMessageLength = 2000
+
+const leftCars: ComputedRef<number> = computed(() =>
+  maxMessageLength - (contactRequest.message ? contactRequest.message.length : 0)
+)
+
 // --- Validation ---
 // --- Validation ---
 const validateName = (name: string | null) => !!name || "Le nom est obligatoire";
 const validateName = (name: string | null) => !!name || "Le nom est obligatoire";
 
 
@@ -235,9 +250,8 @@ const validateNonEmptyMessage = (message: string | null) =>
   "Le message ne peut pas être vide";
   "Le message ne peut pas être vide";
 
 
 const validateMessageLength = (message: string | null) =>
 const validateMessageLength = (message: string | null) =>
-  (!!message && message.length <= 400) ||
-  "Le message ne doit pas dépasser 400 caractères";
-
+  (!!message && message.length <= maxMessageLength) ||
+  "Le message ne doit pas dépasser " + maxMessageLength + " caractères";
 
 
 const contactRequestSent: Ref<boolean> = ref(false);
 const contactRequestSent: Ref<boolean> = ref(false);
 
 
@@ -247,7 +261,6 @@ const contactRequestSent: Ref<boolean> = ref(false);
  * This function validates the form and sets the value of a variable to indicate whether the form submission was successful.
  * This function validates the form and sets the value of a variable to indicate whether the form submission was successful.
  *
  *
  * @function
  * @function
- * @name submitForm
  *
  *
  * @returns {void}
  * @returns {void}
  */
  */
@@ -273,20 +286,58 @@ const submit = async (): Promise<void> => {
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
+
 .v-form {
 .v-form {
   max-width: 1400px;
   max-width: 1400px;
   margin: 0 auto;
   margin: 0 auto;
 
 
   h4 {
   h4 {
+    display: flex;
+    flex-direction: row;
     font-size: 40px;
     font-size: 40px;
     line-height: 95px;
     line-height: 95px;
     margin-bottom: 1rem;
     margin-bottom: 1rem;
+    align-items: center;
+    font-weight: 100;
+
+    .line {
+      display: block;
+      height: 1px;
+      width: 64px;
+      min-width: 64px;
+      border-top: solid 1px var(--on-neutral-color);
+      margin-right: 18px;
+    }
   }
   }
 
 
   h6 {
   h6 {
     margin-top: 32px;
     margin-top: 32px;
-    font-size: 20px;
+    font-size: 16px;
     margin-bottom: 1rem;
     margin-bottom: 1rem;
+    text-transform: uppercase;
+    font-weight: 600;
+    letter-spacing: 0.1em;
+  }
+
+  .v-select {
+    .v-field {
+      border-radius: 0;
+    }
+  }
+
+  .remaining-cars-notice {
+    font-size: 13px;
+    font-weight: 550;
+    opacity: 0.6;
+  }
+
+  .submit-btn {
+    border-radius: 0;
+    font-weight: 600;
+  }
+
+  .legal {
+    opacity: 0.7;
   }
   }
 }
 }
 
 

+ 112 - 39
components/Contact/Map.vue

@@ -1,43 +1,77 @@
 <template>
 <template>
-  <div class="map-container">
-    <l-map
-      ref="map"
-      :zoom="15"
-      :center="location"
-      :options="{scrollWheelZoom: false}"
-    >
-      <l-tile-layer
-        url="https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png"
-        layer-type="base"
-        name="OpenStreetMap"
-        attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>'
-      />
-
-      <l-marker
-        :icon="icon"
-        :lat-lng="location"
-      >
-        <l-popup>
-          <v-row>
-            <v-col cols="4" class="d-flex align-center">
-              <v-img src="/images/Opentalent_Griffe.png"/>
-            </v-col>
-            <v-col cols="8">
-              <div>
-                OPENTALENT
-              </div>
-              <div>
-                217, rue Raoul Follereau
-              </div>
-              <div>
-                74300 - Cluses
-              </div>
-            </v-col>
-          </v-row>
-        </l-popup>
-      </l-marker>
-    </l-map>
-  </div>
+<LayoutContainer>
+    <h4>
+      <span class="line" /> Contactez-nous
+    </h4>
+
+    <v-row>
+      <v-col cols="6">
+        <div class="map-container">
+          <l-map
+            ref="map"
+            :zoom="15"
+            :center="location"
+            :options="{scrollWheelZoom: false}"
+          >
+            <l-tile-layer
+              url="https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png"
+              layer-type="base"
+              name="OpenStreetMap"
+              attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>'
+            />
+
+            <l-marker
+              :icon="icon"
+              :lat-lng="location"
+            >
+              <l-popup>
+                <v-row>
+                  <v-col cols="4" class="d-flex align-center">
+                    <v-img src="/images/Opentalent_Griffe.png"/>
+                  </v-col>
+                  <v-col cols="8">
+                    <div>
+                      OPENTALENT
+                    </div>
+                    <div>
+                      217, rue Raoul Follereau
+                    </div>
+                    <div>
+                      74300 - Cluses
+                    </div>
+                  </v-col>
+                </v-row>
+              </l-popup>
+            </l-marker>
+          </l-map>
+        </div>
+      </v-col>
+
+      <v-col class="infos">
+        <div class="name mb-8">
+          Opentalent
+        </div>
+
+        <div class="d-flex flex-row align-center mb-8">
+          <v-icon icon="fa fa-map-marker-alt" />
+          <span>
+            217 rue Raoul Follereau<br/>
+            74300 CLUSES
+          </span>
+        </div>
+
+        <div class="d-flex flex-row mb-4">
+          <v-icon icon="fa fa-phone" />
+          09.72.12.60.17
+        </div>
+
+        <div class="d-flex flex-row mb-4">
+          <v-icon icon="far fa-envelope" />
+          contact@opentalent.fr
+        </div>
+      </v-col>
+    </v-row>
+  </LayoutContainer>
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
@@ -57,10 +91,49 @@ const icon = L.icon({
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
+
+h4 {
+  display: flex;
+  flex-direction: row;
+  font-size: 40px;
+  line-height: 95px;
+  align-items: center;
+  font-weight: 100;
+  margin: 0 auto 1rem auto;
+  max-width: 1400px;
+
+  .line {
+    display: block;
+    height: 1px;
+    width: 64px;
+    min-width: 64px;
+    border-top: solid 1px var(--on-neutral-color);
+    margin-right: 18px;
+  }
+}
+
+
 .map-container {
 .map-container {
   height: 500px;
   height: 500px;
   width: 100%;
   width: 100%;
   margin-left: auto;
   margin-left: auto;
   margin-right: auto;
   margin-right: auto;
 }
 }
+
+.infos {
+  padding: 48px 36px;
+  font-size: 21px;
+  font-weight: 300;
+
+  .name {
+    font-size: 36px;
+    text-transform: uppercase;
+    font-weight: 600;
+  }
+
+  .v-icon {
+    margin-right: 16px;
+    opacity: 0.6;
+  }
+}
 </style>
 </style>