diff --git a/src/app.css b/src/app.css index 1fe37e1..58b6088 100644 --- a/src/app.css +++ b/src/app.css @@ -214,14 +214,19 @@ box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); - transition: border-color 0.2s ease, box-shadow 0.2s ease; + transition: + border-color 0.3s ease, + box-shadow 0.3s ease, + transform 0.3s ease; } .terminal-window:hover { border-color: hsl(var(--primary) / 0.5); box-shadow: - 0 4px 6px -1px rgb(0 0 0 / 0.1), - 0 2px 4px -2px rgb(0 0 0 / 0.1); + 0 10px 15px -3px rgb(0 0 0 / 0.15), + 0 4px 6px -4px rgb(0 0 0 / 0.1), + 0 0 0 1px hsl(var(--primary) / 0.1); + transform: translateY(-4px) scale(1.02); } /* Terminal title bar */ diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 8ce8b7d..2c0044e 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,6 +1,6 @@ import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; -import { cubicOut } from "svelte/easing"; +import { backOut } from "svelte/easing"; import type { TransitionConfig } from "svelte/transition"; export function cn(...inputs: ClassValue[]) { @@ -17,7 +17,7 @@ type FlyAndScaleParams = { export const flyAndScale = ( node: Element, - params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 } + params: FlyAndScaleParams = { y: -8, x: 0, start: 0.8, duration: 400 } ): TransitionConfig => { const style = getComputedStyle(node); const transform = style.transform === "none" ? "" : style.transform; @@ -46,18 +46,18 @@ export const flyAndScale = ( }; return { - duration: params.duration ?? 200, - delay: 0, + duration: params.duration ?? 400, + delay: params.delay ?? 0, css: (t) => { const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]); const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]); - const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]); + const scale = scaleConversion(t, [0, 1], [params.start ?? 0.8, 1]); return styleToString({ transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`, opacity: t }); }, - easing: cubicOut + easing: backOut }; }; \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 7cebb61..a62e4c0 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -162,7 +162,7 @@ -
+

Interface Système: Az' @@ -178,7 +178,7 @@ {#each dashboardLinks as item, i}
@@ -220,7 +220,7 @@ {#if showTerminal}
@@ -248,7 +248,7 @@ bind:this={cardElements[i]} class="terminal-window absolute {activeWindowIndex === i ? 'active' : ''}" style="z-index: {10 + i}; width: {CARD_WIDTH}px;" - in:flyAndScale|global={{ y: 20, duration: 300, start: 0.98, delay: i * 100 }} + in:flyAndScale|global={{ y: 50, duration: 400, start: 0.75, delay: i * 120 }} use:draggable={{ handleSelector: '.terminal-titlebar', initialPosition: { x: initialPositions[i].x, y: initialPositions[i].y }, @@ -297,7 +297,7 @@ bind:this={terminalElement} class="terminal-window absolute {activeWindowIndex === -1 ? 'active' : ''} w-[90vw] max-w-4xl" style="z-index: 200;" - in:flyAndScale|global={{ y: 20, duration: 500, start: 0.95 }} + in:flyAndScale|global={{ y: 60, duration: 450, start: 0.7 }} use:draggable={{ handleSelector: '.terminal-titlebar', initialPosition: { x: browser ? (window.innerWidth * 0.05) : 50, y: 300 }, diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index dd920f0..7e8b564 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -46,7 +46,7 @@