Browse Source

remove the contact-me inner link for a scroll directive

olinox14 1 năm trước cách đây
mục cha
commit
035ffa6426
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      pages/index.vue

+ 5 - 1
pages/index.vue

@@ -50,7 +50,7 @@
     <div class="banner-buttons">
       <DownloadPdfBtn />
 
-      <v-btn variant="outlined" to="#contact" :active="false">
+      <v-btn variant="outlined" :active="false" @click="onContactMeClick">
         {{$t('contact_me')}}
       </v-btn>
     </div>
@@ -125,6 +125,10 @@ const CURRENT_YEAR = new Date().getFullYear();
 const XP_YEARS = CURRENT_YEAR - START_YEAR
 
 const showLongIntro: Ref<boolean> = ref(false)
+
+const onContactMeClick = () => {
+  window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' });
+}
 </script>
 
 <style scoped lang="scss">