feat(home): navigation and outro animation to settings

This commit is contained in:
2025-11-24 11:17:13 +01:00
parent 5b1839e75c
commit ab2c6f2cc3
9 changed files with 47 additions and 10 deletions

View File

@@ -9,8 +9,9 @@ export const useHomeStore = defineStore("home", {
outro: {
buttonOffsetY: 0,
stage1Opacity: 0,
stage2Opacity: 0,
stage1Opacity: 1,
stage2Opacity: 1,
animateTop: false,
},
isIntro: true,
@@ -54,8 +55,9 @@ export const useHomeStore = defineStore("home", {
);
},
animateOutro(to?: string) {
animateOutro(to: "contact" | "projects" | "settings") {
this.isOutro = true;
this.outro.animateTop = to !== "settings";
const duration = 0.4;
const delay = 0.08;
@@ -74,7 +76,7 @@ export const useHomeStore = defineStore("home", {
ease: "none",
onComplete: () => {
this.isOutro = true;
if (to) navigateTo(to);
navigateTo(`/${to}`);
},
},
);