Skip to content

Commit

Permalink
refactor animation folders
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Sep 3, 2022
1 parent 2530b7c commit 792b29b
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 41 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -31,7 +31,7 @@
"prettier-plugin-svelte": "^2.7.0",
"prettier-plugin-tailwindcss": "^0.1.13",
"sass": "^1.54.8",
"svelte": "^3.50.0",
"svelte": "3.49.0",
"svelte-bootstrap-icons": "^2.2.0",
"svelte-check": "^2.9.0",
"svelte-preprocess": "^4.10.7",
Expand Down
52 changes: 26 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -3,7 +3,7 @@
import { cubicOut } from "svelte/easing";
import { draw, fade } from "svelte/transition";
import { bottom, top } from "$components/elements/LogoShape";
import { bottom, top } from "$components/animated/LogoShape";
let showElement = false;
onMount(() => {
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/components/elements/RoundCard.svelte
Expand Up @@ -6,7 +6,6 @@
function logoFromURL(url: string) {
if (url.includes("hackerrank")) return "logos/hackerrank.webp";
if (url.includes("codeforces")) return "logos/codeforces.webp";
return "logos/cms.webp";
Expand Down
15 changes: 6 additions & 9 deletions src/lib/transitions.ts
Expand Up @@ -10,15 +10,12 @@ export function doubleSlide(
delay,
duration,
easing,
css: (t: number) => {
return (
"overflow: hidden;" +
`transform: translateX(${Math.max(0, t - 0.5) * 2 * width_value}px);` +
`width: ${(0.5 - Math.abs(t - 0.5)) * 2 * width_value}px;` +
"background-color: #F13830;" +
"z-index: 2;"
);
},
css: (t: number) =>
"overflow: hidden;" +
`transform: translateX(${Math.max(0, t - 0.5) * 2 * width_value}px);` +
`width: ${(0.5 - Math.abs(t - 0.5)) * 2 * width_value}px;` +
"background-color: #F13830;" +
"z-index: 2;",
};
}

Expand Down
4 changes: 2 additions & 2 deletions src/routes/+page.svelte
@@ -1,6 +1,6 @@
<script lang="ts">
import CncLogo from "$components/elements/CncLogo.svelte";
import CncText from "$components/elements/CncText.svelte";
import CncLogo from "$components/animated/CncLogo.svelte";
import CncText from "$components/animated/CncText.svelte";
</script>

<svelte:head>
Expand Down
3 changes: 2 additions & 1 deletion svelte.config.js
@@ -1,7 +1,8 @@
// @ts-check

import adapter from "@sveltejs/adapter-netlify";
import path from "node:path";

import adapter from "@sveltejs/adapter-netlify";
import preprocess from "svelte-preprocess";

/** @type {import("@sveltejs/kit").Config} */
Expand Down

0 comments on commit 792b29b

Please sign in to comment.