Ver Fonte

various fixes

olinox14 há 1 ano atrás
pai
commit
42da939e43
4 ficheiros alterados com 38 adições e 42 exclusões
  1. 16 11
      components/BackToTheTop.vue
  2. 13 22
      components/IdCard.vue
  3. 5 5
      lang/en.json
  4. 4 4
      lang/fr.json

+ 16 - 11
components/BackToTheTop.vue

@@ -1,14 +1,17 @@
 <template>
   <div class="pageTop" v-intersect="onTopIntersect"/>
 
-  <v-btn
-      v-if="isVisible"
-      :to="{ path: '', hash: '#top' }"
-      aria-label="Back to the top of the page"
-      class="back-to-the-top"
-  >
-    <v-icon>fas fa-arrow-up</v-icon>
-  </v-btn>
+  <client-only>
+    <v-btn
+        v-if="isVisible"
+        aria-label="Back to the top of the page"
+        :size="48"
+        @click="onClick"
+        class="back-to-the-top"
+    >
+      <v-icon>fas fa-arrow-up</v-icon>
+    </v-btn>
+  </client-only>
 </template>
 
 <script setup lang="ts">
@@ -17,6 +20,10 @@ const isVisible: Ref<boolean> = ref(false)
 const onTopIntersect = (intersect: boolean) => {
   isVisible.value = !intersect
 }
+
+const onClick = () => {
+  window.scrollTo({ top: 0, behavior: 'smooth' });
+}
 </script>
 
 <style scoped lang="scss">
@@ -32,9 +39,7 @@ const onTopIntersect = (intersect: boolean) => {
   right: 5%;
   bottom: 58px;
   z-index: 100;
-  height: 48px !important;
-  width: 48px;
-  border-radius: 32px;
+  border-radius: 24px;
   background: rgb(var(--v-theme-primary));
   color: rgb(var(--v-theme-on-primary));
 

+ 13 - 22
components/IdCard.vue

@@ -24,7 +24,6 @@
 
       <AltchaValidation
         v-if="showCaptcha"
-        @verified="onVerified"
       />
     </div>
 
@@ -50,40 +49,32 @@
 import type { Ref } from '@vue/reactivity'
 import type { ComputedRef } from 'vue'
 
+interface IdCardData {
+  photo: string,
+  age: number,
+  place: string,
+  status: string
+}
+
 const appStore = useAppStore()
 
+const { altchaPayload } = storeToRefs(appStore)
+
 const downloadRequested: Ref<boolean> = ref(false)
 
 const showCaptcha: ComputedRef<boolean> = computed(() => {
   return downloadRequested.value && !appStore.altchaPayload
 })
 
-interface IdCardData {
-  photo: string,
-  age: number,
-  place: string,
-  status: string
-}
-
 const idCardData: Ref<IdCardData | null> = ref(null)
 
 const onClick = () => {
-  if (appStore.altchaPayload) {
-    submit()
-  } else {
-    downloadRequested.value = true
-  }
+  downloadRequested.value = true
 }
 
-const onVerified = () => {
-  if (!downloadRequested.value) {
-    return
-  }
-  downloadRequested.value = false
-  setTimeout(() => {
-    submit()
-  }, 100)
-}
+watch(() => appStore.altchaPayload, () => {
+  submit()
+}, { immediate: false })
 
 const submit = async () => {
   const url = 'https://api.ogene.fr/api/id-card?payload=' + (appStore.altchaPayload ?? '');

+ 5 - 5
lang/en.json

@@ -4,10 +4,10 @@
   "x_years": "{years} years",
   "id_age": "{years} years old",
   "Civil partnership, 3 children": "Civil partnership, 3 children",
-  "intro_short": "Trained as an engineer, fullstack developer, with managerial, system and Product Owner experience.",
-  "intro_part_1": "Since 2011, my professional journey has allowed me to develop very varied skills from a technical point of view : development, system administration, security, QA and continuous integration, database management, search engines..., but also from a managerial point of view : supervision, tutoring, agile management, collective intelligence, meeting animation.",
-  "intro_part_2": "I have been led to work with various services : water services, waste management, rural works, conservatories and music schools, telecom networks.",
-  "intro_part_3": "I place great importance on the development of a team spirit, continuous improvement, and the realization of a thorough, tested, documented work.",
+  "intro_short": "Trained as an engineer and having worked as a full-stack developer for 13 years, I also have solid experience in the fields of management, system administration, and Product Ownership.",
+  "intro_part_1": "Since 2011, my professional journey has allowed me to develop a wide range of skills, both technically: development, system administration, security, QA and continuous integration, database management, search engines..., and from a managerial perspective: supervision, mentoring, agile management, collective intelligence, meeting facilitation.",
+  "intro_part_2": "My assignments have led me to work with various types of services: water services, waste management, rural works, conservatories and music schools, telecom networks.",
+  "intro_part_3": "I place high importance on developing a team spirit, continuous improvement, and the achievement of well-rounded, tested, and documented work.",
   "intro_part_4": "I currently maintain the open source libraries <a href='https://github.com/olinox14/path-php' target='_blank'>Path-PHP</a> and <a href='https://github.com/olinox14/xdice' target='_blank'>xdice</a>, and I'm the author of the (unmaintained) <a href='https://github.com/olinox14/FullMd' target='_blank'>FullMD</a> library.",
   "find_me_on": "Find me on",
   "download_pdf": "PDF Version",
@@ -45,5 +45,5 @@
   "email_must_be_valid": "Email adress shall be valid",
   "message_must_be_valid": "Message is too short (10 characters minimum)",
   "captcha_must_be_validated": "Catcha shall be validated",
-  "captcha_already_verified": "Captcha already verified."
+  "captcha_already_verified": "Captcha verified."
 }

+ 4 - 4
lang/fr.json

@@ -4,10 +4,10 @@
   "x_years": "{years} ans",
   "id_age": "{years} ans",
   "Civil partnership, 3 children": "Pacsé, 3 enfants",
-  "intro_short": "Ingénieur de formation et développeur fullstack, j'ai aussi une expérience sérieuse dans les domaines du management, de l'administration système et du PO.",
+  "intro_short": "Ingénieur de formation, développeur fullstack depuis 13 ans, j'ai par ailleurs une expérience sérieuse dans les domaines du management, de l'administration système et du PO.",
   "intro_part_1": "Depuis 2011, mon parcours professionnel m'a permis de développer des compétences très variées, tant d'un point de vue technique : développement, administration système, sécurité, QA et intégration continue, gestion de bases de données, moteurs de recherche..., que d'un point de vue managérial : encadrement, tutorat, management agile, intelligence collective, animation de réunion.",
-  "intro_part_2": "J'ai été amené à travailler avec des services de natures diverses : services des eaux, gestion des déchets, travaux ruraux, conservatoires et écoles de musique, réseaux telecom.",
-  "intro_part_3": "J'accorde beaucoup d'importance au développement d'un esprit d'équipe, à l'amélioration continue, et à la réalisation d'un travail abouti, testé, documenté.",
+  "intro_part_2": "Mes missions m’ont amené à travailler avec des services de natures diverses : services des eaux, gestion des déchets, travaux ruraux, conservatoires et écoles de musique, réseaux telecom.",
+  "intro_part_3": "J'accorde beaucoup d'importance au développement d'un esprit d'équipe, à l'amélioration continue, et à la réalisation d'un travail abouti, testé, et documenté.",
   "intro_part_4": "Je maintiens actuellement les librairies opensource <a href='https://github.com/olinox14/path-php' target='_blank'>Path-PHP</a> et <a href='https://github.com/olinox14/xdice' target='_blank'>xdice</a>, et suis l'auteur de la librairie (non-maintenue) <a href='https://github.com/olinox14/FullMd' target='_blank'>FullMD</a>.",
   "find_me_on": "Retrouvez moi sur",
   "download_pdf": "Version PDF",
@@ -45,5 +45,5 @@
   "email_must_be_valid": "L'adresse e-mail doit être valide",
   "message_must_be_valid": "Le message est trop court (10 caractères minimum)",
   "captcha_must_be_validated": "Le Captcha doit être validé",
-  "captcha_already_verified": "Captcha déja vérifié."
+  "captcha_already_verified": "Captcha vérifié."
 }