+
-
+
-
+
diff --git a/src/components/framer/framerTextAnimate.tsx b/src/components/framer/framerTextAnimate.tsx
index bab058f..cb80ef3 100644
--- a/src/components/framer/framerTextAnimate.tsx
+++ b/src/components/framer/framerTextAnimate.tsx
@@ -1,10 +1,10 @@
"use client";
import { animate, motion, useMotionValue, useTransform } from "framer-motion";
-import { Special_Elite } from "next/font/google";
-import React, { useEffect } from "react";
+import { Courier_Prime } from "next/font/google";
+import React, { useEffect, useState } from "react";
-const special_elite = Special_Elite({ weight: "400", subsets: ["latin"] });
+const special_elite = Courier_Prime({ weight: "400", subsets: ["latin"] });
type props = {
children: string;
@@ -17,16 +17,29 @@ const FramerTextAnimate = ({ children, styles, duration, delay }: props) => {
const count = useMotionValue(0);
const baseText = children as string;
+ const [durationInternal, setDurationInternal] = useState(duration);
+
const rounded = useTransform(count, (latest) => Math.round(latest));
const displayText = useTransform(rounded, (latest) =>
baseText.slice(0, latest)
);
+ // Skip the animation on mouse press
+ useEffect(() => {
+ const handleClick = (event: MouseEvent) => {
+ setDurationInternal(0.5);
+ };
+ document.addEventListener("click", handleClick);
+ return () => {
+ document.removeEventListener("click", handleClick);
+ };
+ }, []);
+
useEffect(() => {
// Delay the animation start
const delayTimeout = setTimeout(() => {
const controls = animate(count, baseText.length, {
- duration: duration,
+ duration: durationInternal,
ease: "easeInOut",
});
return () => controls.stop();
@@ -34,11 +47,19 @@ const FramerTextAnimate = ({ children, styles, duration, delay }: props) => {
// Clear the timeout on unmount to prevent memory leaks
return () => clearTimeout(delayTimeout);
- }, []);
+ }, [durationInternal]);
+
+ const handleUserInput = () => {
+ setDurationInternal(0);
+ console.log("test");
+ };
return (
<>
-
+
{displayText}
>
diff --git a/src/components/stars.tsx b/src/components/stars.tsx
index 152aed4..02deafc 100644
--- a/src/components/stars.tsx
+++ b/src/components/stars.tsx
@@ -35,7 +35,7 @@ export default function Stars(props: any) {
{meshArray.map((el) => {
return (
-
+
);
diff --git a/tailwind.config.js b/tailwind.config.js
index 5e402f1..8f89923 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -14,7 +14,22 @@ module.exports = {
extend: {
textShadow: {
DEFAULT:
- "0 0 10px #fff, 0 0 20px #fff, 0 0 30px #23d400, 0 0 40px #00a30e, 0 0 50px #0a7c00, 0 0 60px #0b5e00, 0 0 70px #00440b",
+ "0 0 10px #fff, 0 0 20px #fff, 0 0 30px #00440b, 0 0 40px #00440b, 0 0 50px #0a7c00, 0 0 60px #00440b, 0 0 70px #00440b",
+ },
+ colors: {
+ "stachowiak-green": {
+ 50: "#eeffef",
+ 100: "#d8ffdc",
+ 200: "#b4febb",
+ 300: "#79fc87",
+ 400: "#38f04c",
+ 500: "#0ed926",
+ 600: "#05b419",
+ 700: "#088d18",
+ 800: "#0c6f19",
+ 900: "#0c5b17",
+ 950: "#00440b", //stachowiak-green
+ },
},
},
},