Skip to content

Commit 5c477ba

Browse files
committed
Moving pattern
1 parent 3521533 commit 5c477ba

12 files changed

Lines changed: 70 additions & 336 deletions

src/app.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
@theme {
1212
--font-sans: "JetBrains Mono", sans-serif;
1313
--font-hebrew: "Noto Sans Hebrew", sans-serif;
14+
--animate-infinite-pan: infinite-pan 60s linear infinite;
15+
@keyframes infinite-pan {
16+
0% {
17+
pattern-transform: translate(0, 0);
18+
}
19+
100% {
20+
pattern-transform: translate(250px, 250px);
21+
}
22+
}
1423
}
1524
* {
1625
box-sizing: border-box;
@@ -22,6 +31,7 @@ html {
2231
main {
2332
-webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
2433
}
34+
2535
.skill-chip {
2636
@apply rounded-md bg-ctp-surface0 px-4 py-2 font-mono text-ctp-text shadow-md transition-all hover:scale-105 hover:text-ctp-base;
2737
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/lib/components/features/SkillsSection.svelte

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
import WiiContriller from "$lib/icons/ryan-beck-wii-controller.svg?component";
1111
import NESController from "$lib/icons/ryan-beck-nes-controller.svg?component";
1212
import NSFController from "$lib/icons/ryan-beck-n64-controller.svg?component";
13+
// Logos
14+
import GodotLogoLight from "$lib/assets/godot_logo_vertical_color_light.svg?component";
15+
import GodotLogoDark from "$lib/assets/godot_logo_vertical_color_dark.svg?component";
16+
import UnityLogoLight from "$lib/assets/unity-original-wordmark-logo_light.svg?component";
17+
import UnityLogoDark from "$lib/assets/unity-original-wordmark-logo_dark.svg?component";
1318
import { t } from "$lib/stores/language";
1419
1520
const controllerIcons = [
@@ -33,21 +38,19 @@
3338
icons={controllerIcons}
3439
scale={40}
3540
spacing={40}
36-
rotation={-15}>
37-
<div
38-
class="flex flex-wrap items-center justify-center gap-4 p-4">
39-
<SkillIcon
40-
lightSrc="/unity-original-wordmark-logo_light.svg"
41-
darkSrc="/unity-original-wordmark-logo_dark.svg"
42-
alt="Unity Logo" />
41+
rotation={-15} />
42+
<div class="flex flex-wrap items-center justify-center gap-4 p-4">
43+
<SkillIcon
44+
lightIcon={UnityLogoLight}
45+
darkIcon={UnityLogoDark}
46+
alt="Unity Logo"
47+
delay={300} />
4348

44-
<SkillIcon
45-
lightSrc="/godot_logo_vertical_color_light.svg"
46-
darkSrc="/godot_logo_vertical_color_dark.svg"
47-
alt="Godot Logo"
48-
delay={300} />
49-
</div>
50-
</DecoBG>
49+
<SkillIcon
50+
lightIcon={GodotLogoLight}
51+
darkIcon={GodotLogoDark}
52+
alt="Godot Logo" />
53+
</div>
5154
</SkillCard>
5255
<SkillCard title={$t("skills.languages")} theme="green" delay={150}>
5356
<svg

src/lib/components/ui/SVGComponentsPattern.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// --- TYPE DEFINITIONS ---
66
// This is the correct, specific type for a Svelte component generated by an SVG plugin.
77
type SvgComponent = Component<SVGAttributes<SVGSVGElement>>;
8-
98
// --- PROPS ---
109
/** An array of imported Svelte SVG components for the pattern. */
1110
export let icons: SvgComponent[] = [];
@@ -41,6 +40,15 @@
4140
patternUnits="userSpaceOnUse"
4241
width={patternSize}
4342
height={patternSize}>
43+
<animateTransform
44+
attributeType="xml"
45+
attributeName="patternTransform"
46+
type="translate"
47+
from="0 0"
48+
to="{patternSize} {patternSize}"
49+
begin="0"
50+
dur="10s"
51+
repeatCount="indefinite" />
4452
{#each icons as _, i}
4553
<use
4654
href="#pattern-icon-{patternId}-{i}"
Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
<script lang="ts">
22
import { theme } from "$lib/stores/theme";
3+
import type { Component } from "svelte";
4+
import type { SVGAttributes } from "svelte/elements";
35
4-
export let lightSrc: string;
5-
export let darkSrc: string;
6+
type SvgComponent = Component<SVGAttributes<SVGSVGElement>>;
7+
8+
/** The Svelte component for the icon to display in light mode. */
9+
export let lightIcon: SvgComponent;
10+
11+
/** The Svelte component for the icon to display in dark mode. */
12+
export let darkIcon: SvgComponent;
13+
14+
/** The accessible description for the icon. */
615
export let alt: string;
16+
17+
/** An optional animation delay. */
718
export let delay: number = 0;
19+
20+
$: iconToRender = $theme === "light" ? lightIcon : darkIcon;
821
</script>
922

1023
<div
1124
class="group relative flex h-20 w-20 items-center justify-center"
12-
style="animation-delay: {delay}ms">
13-
<img
14-
src={$theme === "light" ? darkSrc : lightSrc}
15-
{alt}
25+
style="animation-delay: {delay}ms"
26+
role="img"
27+
aria-label={alt}>
28+
<svelte:component
29+
this={iconToRender}
1630
class="h-full w-full object-contain transition-all duration-300 animate-in animate-bounce-in group-hover:scale-110 group-hover:drop-shadow-[0_0_10px_theme(colors.ctp.mauve)]" />
1731
</div>

static/ryan-beck-dreamcast-controller.svg

Lines changed: 0 additions & 105 deletions
This file was deleted.

static/ryan-beck-gamecube-controller.svg

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)