feat(assets): ajout de nouvelles images et mise à jour des niveaux de compétences

- Ajout des images pour Bootstrap, PostgreSQL, Ruby et Ruby on Rails
- Ajout des images pour Tailwind CSS
- Mise à jour des niveaux de compétences pour plusieurs technologies dans le fichier techstack.ts
- Amélioration du comportement de défilement dans le routeur pour une navigation plus fluide
This commit is contained in:
Mr¤KayJayDee
2025-06-22 15:14:18 +02:00
parent cc7368b550
commit 14f5fbb262
7 changed files with 77 additions and 49 deletions

View File

@@ -1,4 +1,5 @@
import { createRouter, createWebHistory } from 'vue-router'
import { nextTick } from 'vue'
import HomePage from '../views/HomePage.vue'
const router = createRouter({
@@ -30,18 +31,39 @@ const router = createRouter({
component: () => import('../views/ContactPage.vue')
}
],
scrollBehavior() {
// Always scroll to top for consistent navigation
return { top: 0 }
scrollBehavior(to, from, savedPosition) {
// If there's a saved position (back/forward navigation), use it
if (savedPosition) {
return savedPosition
}
// If navigating to a hash anchor, scroll to that element
if (to.hash) {
return {
el: to.hash,
behavior: 'smooth'
}
}
// For all other navigation, scroll to top
return {
top: 0,
behavior: 'smooth'
}
}
})
// Force scroll to top on every navigation
// Additional scroll to top handler for better compatibility
router.afterEach(() => {
// Use nextTick to ensure DOM is updated
setTimeout(() => {
window.scrollTo(0, 0)
}, 0)
// Use nextTick to ensure the DOM is fully updated
nextTick(() => {
// Smooth scroll to top
window.scrollTo({
top: 0,
left: 0,
behavior: 'smooth'
})
})
})
export default router