feat(projects): add project scope
This commit is contained in:
@@ -30,55 +30,53 @@ export const useContactStore = defineStore("contact", {
|
||||
animateIntro() {
|
||||
this.isIntro = true;
|
||||
|
||||
const start = 2;
|
||||
const timeline = gsap.timeline({
|
||||
onComplete: () => {
|
||||
this.isIntro = false;
|
||||
},
|
||||
});
|
||||
|
||||
gsap.fromTo(
|
||||
this.intro,
|
||||
{
|
||||
stage1Opacity: 0,
|
||||
titleY: SCREEN_HEIGHT,
|
||||
},
|
||||
{
|
||||
stage1Opacity: 1,
|
||||
titleY: SCREEN_HEIGHT - 23,
|
||||
duration: 0.1,
|
||||
delay: start,
|
||||
ease: "none",
|
||||
},
|
||||
);
|
||||
|
||||
gsap.fromTo(
|
||||
this.intro,
|
||||
{
|
||||
stage2Opacity: 0,
|
||||
},
|
||||
{
|
||||
stage2Opacity: 1,
|
||||
duration: 0.1,
|
||||
delay: start + 0.15,
|
||||
ease: "none",
|
||||
},
|
||||
);
|
||||
|
||||
gsap.fromTo(
|
||||
this.intro,
|
||||
{
|
||||
stage3Opacity: 0,
|
||||
topBarY: -20,
|
||||
bottomBarY: SCREEN_HEIGHT - 4,
|
||||
},
|
||||
{
|
||||
stage3Opacity: 1,
|
||||
topBarY: 0,
|
||||
bottomBarY: SCREEN_HEIGHT - 24,
|
||||
duration: 0.1,
|
||||
delay: start + 0.15 + 0.15,
|
||||
ease: "none",
|
||||
onComplete: () => {
|
||||
this.isIntro = false;
|
||||
timeline
|
||||
.fromTo(
|
||||
this.intro,
|
||||
{
|
||||
stage1Opacity: 0,
|
||||
titleY: SCREEN_HEIGHT,
|
||||
},
|
||||
},
|
||||
);
|
||||
{
|
||||
stage1Opacity: 1,
|
||||
titleY: SCREEN_HEIGHT - 23,
|
||||
duration: 0.1,
|
||||
ease: "none",
|
||||
},
|
||||
2,
|
||||
)
|
||||
.fromTo(
|
||||
this.intro,
|
||||
{ stage2Opacity: 0 },
|
||||
{
|
||||
stage2Opacity: 1,
|
||||
duration: 0.1,
|
||||
ease: "none",
|
||||
},
|
||||
2.15,
|
||||
)
|
||||
.fromTo(
|
||||
this.intro,
|
||||
{
|
||||
stage3Opacity: 0,
|
||||
topBarY: -20,
|
||||
bottomBarY: SCREEN_HEIGHT - 4,
|
||||
},
|
||||
{
|
||||
stage3Opacity: 1,
|
||||
topBarY: 0,
|
||||
bottomBarY: SCREEN_HEIGHT - 24,
|
||||
duration: 0.1,
|
||||
ease: "none",
|
||||
},
|
||||
2.3,
|
||||
);
|
||||
},
|
||||
|
||||
pushNotification(content: string) {
|
||||
@@ -94,49 +92,46 @@ export const useContactStore = defineStore("contact", {
|
||||
animateOutro() {
|
||||
this.isOutro = true;
|
||||
|
||||
gsap.fromTo(
|
||||
this.outro,
|
||||
{
|
||||
stage1Opacity: 1,
|
||||
const timeline = gsap.timeline({
|
||||
onComplete: () => {
|
||||
setTimeout(() => {
|
||||
this.isOutro = false;
|
||||
navigateTo("/");
|
||||
}, 2000);
|
||||
},
|
||||
{
|
||||
stage1Opacity: 0,
|
||||
duration: 0.2,
|
||||
ease: "none",
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
gsap.fromTo(
|
||||
this.outro,
|
||||
{
|
||||
stage2Opacity: 1,
|
||||
},
|
||||
{
|
||||
stage2Opacity: 0,
|
||||
duration: 0.25,
|
||||
delay: 0.25,
|
||||
ease: "none",
|
||||
},
|
||||
);
|
||||
|
||||
gsap.fromTo(
|
||||
this.outro,
|
||||
{
|
||||
stage3Opacity: 1,
|
||||
},
|
||||
{
|
||||
stage3Opacity: 0,
|
||||
duration: 0.3,
|
||||
delay: 0.5,
|
||||
ease: "none",
|
||||
onComplete: () => {
|
||||
setTimeout(() => {
|
||||
this.isOutro = false;
|
||||
navigateTo("/");
|
||||
}, 2000);
|
||||
timeline
|
||||
.fromTo(
|
||||
this.outro,
|
||||
{ stage1Opacity: 1 },
|
||||
{
|
||||
stage1Opacity: 0,
|
||||
duration: 0.2,
|
||||
ease: "none",
|
||||
},
|
||||
},
|
||||
);
|
||||
0,
|
||||
)
|
||||
.fromTo(
|
||||
this.outro,
|
||||
{ stage2Opacity: 1 },
|
||||
{
|
||||
stage2Opacity: 0,
|
||||
duration: 0.25,
|
||||
ease: "none",
|
||||
},
|
||||
0.25,
|
||||
)
|
||||
.fromTo(
|
||||
this.outro,
|
||||
{ stage3Opacity: 1 },
|
||||
{
|
||||
stage3Opacity: 0,
|
||||
duration: 0.3,
|
||||
ease: "none",
|
||||
},
|
||||
0.5,
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -24,74 +24,72 @@ export const useHomeStore = defineStore("home", {
|
||||
|
||||
this.isIntro = true;
|
||||
|
||||
const start = 0.5;
|
||||
const duration = 0.5;
|
||||
const delay = 0.35;
|
||||
const timeline = gsap.timeline({
|
||||
onComplete: () => {
|
||||
this.isIntro = false;
|
||||
if (!appStore.booted) appStore.booted = true;
|
||||
},
|
||||
});
|
||||
|
||||
gsap.fromTo(
|
||||
this.intro,
|
||||
{ stage1Opacity: 0 },
|
||||
{
|
||||
stage1Opacity: 1,
|
||||
duration,
|
||||
delay: start,
|
||||
ease: "none",
|
||||
onComplete: () => {
|
||||
this.isIntro = false;
|
||||
if (!appStore.booted) appStore.booted = true;
|
||||
timeline
|
||||
.fromTo(
|
||||
this.intro,
|
||||
{ stage1Opacity: 0 },
|
||||
{
|
||||
stage1Opacity: 1,
|
||||
duration: 0.5,
|
||||
ease: "none",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
gsap.fromTo(
|
||||
this.intro,
|
||||
{ statusBarY: -20 },
|
||||
{
|
||||
statusBarY: 0,
|
||||
duration: duration - delay,
|
||||
delay: start + delay,
|
||||
ease: "none",
|
||||
},
|
||||
);
|
||||
0.5,
|
||||
)
|
||||
.fromTo(
|
||||
this.intro,
|
||||
{ statusBarY: -20 },
|
||||
{
|
||||
statusBarY: 0,
|
||||
duration: 0.15,
|
||||
ease: "none",
|
||||
},
|
||||
0.85,
|
||||
);
|
||||
},
|
||||
|
||||
animateOutro(to: "contact" | "projects" | "settings") {
|
||||
this.isOutro = true;
|
||||
this.outro.animateTop = to !== "settings";
|
||||
|
||||
const duration = 0.4;
|
||||
const delay = 0.08;
|
||||
|
||||
gsap.fromTo(
|
||||
this.outro,
|
||||
{
|
||||
buttonOffsetY: 0,
|
||||
stage1Opacity: 1,
|
||||
const timeline = gsap.timeline({
|
||||
onComplete: () => {
|
||||
this.isOutro = true;
|
||||
navigateTo(`/${to}`);
|
||||
},
|
||||
{
|
||||
buttonOffsetY: -200,
|
||||
stage1Opacity: 0,
|
||||
duration,
|
||||
delay,
|
||||
ease: "none",
|
||||
onComplete: () => {
|
||||
this.isOutro = true;
|
||||
navigateTo(`/${to}`);
|
||||
});
|
||||
|
||||
timeline
|
||||
.fromTo(
|
||||
this.outro,
|
||||
{ stage2Opacity: 1 },
|
||||
{
|
||||
stage2Opacity: 0,
|
||||
duration: 0.16,
|
||||
ease: "none",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
gsap.fromTo(
|
||||
this.outro,
|
||||
{
|
||||
stage2Opacity: 1,
|
||||
},
|
||||
{
|
||||
stage2Opacity: 0,
|
||||
ease: "none",
|
||||
duration: duration / 2 - delay,
|
||||
},
|
||||
);
|
||||
0,
|
||||
)
|
||||
.fromTo(
|
||||
this.outro,
|
||||
{
|
||||
buttonOffsetY: 0,
|
||||
stage1Opacity: 1,
|
||||
},
|
||||
{
|
||||
buttonOffsetY: -200,
|
||||
stage1Opacity: 0,
|
||||
duration: 0.4,
|
||||
ease: "none",
|
||||
},
|
||||
0.08,
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -66,6 +66,7 @@ export const useProjectsStore = defineStore("projects", {
|
||||
preview: string;
|
||||
url: string | null;
|
||||
technologies: string[];
|
||||
scope: "hobby" | "work";
|
||||
body: MarkdownBody;
|
||||
}[],
|
||||
currentProject: 0,
|
||||
@@ -92,6 +93,7 @@ export const useProjectsStore = defineStore("projects", {
|
||||
preview: `/images/projects/${id}/preview.webp`,
|
||||
url: project.url,
|
||||
technologies: project.technologies,
|
||||
scope: project.scope,
|
||||
body: simplifyMarkdownAST(project.body),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user