diff --git a/.prettierrc b/.prettierrc
index 039dd3a..caf5b89 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,4 +1,9 @@
{
- "plugins": ["prettier-plugin-svelte", "prettier-plugin-astro","prettier-plugin-tailwindcss"],
- "tabWidth": 4
+ "plugins": [
+ "prettier-plugin-svelte",
+ "prettier-plugin-astro",
+ "prettier-plugin-tailwindcss"
+ ],
+ "tabWidth": 4,
+ "useTabs": true
}
diff --git a/public/fonts/Antonio-Bold.ttf b/public/fonts/Antonio-Bold.ttf
new file mode 100644
index 0000000..595f1ea
Binary files /dev/null and b/public/fonts/Antonio-Bold.ttf differ
diff --git a/src/components/contact/ContactComponent.astro b/src/components/contact/ContactComponent.astro
new file mode 100644
index 0000000..bb35e62
--- /dev/null
+++ b/src/components/contact/ContactComponent.astro
@@ -0,0 +1,59 @@
+---
+import { Image } from "astro:assets";
+import contactPhoto from "@/components/images/contact_photo.webp";
+import { AnimatedTooltip } from "@/components/ui/AnimatedToolTip";
+---
+
+
-
- Copyright © 2023-{new Date().getFullYear()} RythonDev. All Rights Reserved.
-
+
+
+ Copyright © 2023-{new Date().getFullYear()} RythonDev. All Rights Reserved.
+
diff --git a/src/components/global/NavBar.astro b/src/components/global/NavBar.astro
index 99b3d5c..4536179 100644
--- a/src/components/global/NavBar.astro
+++ b/src/components/global/NavBar.astro
@@ -1,7 +1,7 @@
---
import { HoverNavigation } from "@/components/ui/HoverNavigation";
import { Image } from "astro:assets";
-import pfp from "@/components/images/pfp_new.webp";
+import pfp from "@/components/images/contact_photo_small.webp";
const navLinks = [
{
@@ -28,7 +28,7 @@ const navLinks = [
---
diff --git a/src/components/images/contact_photo.webp b/src/components/images/contact_photo.webp
new file mode 100644
index 0000000..e89c405
Binary files /dev/null and b/src/components/images/contact_photo.webp differ
diff --git a/src/components/images/contact_photo_small.webp b/src/components/images/contact_photo_small.webp
new file mode 100644
index 0000000..13bf3e6
Binary files /dev/null and b/src/components/images/contact_photo_small.webp differ
diff --git a/src/components/ui/AnimatedToolTip.tsx b/src/components/ui/AnimatedToolTip.tsx
new file mode 100644
index 0000000..d50c973
--- /dev/null
+++ b/src/components/ui/AnimatedToolTip.tsx
@@ -0,0 +1,94 @@
+"use client";
+
+import { useState, useRef } from "react";
+import {
+ motion,
+ useTransform,
+ AnimatePresence,
+ useMotionValue,
+ useSpring,
+} from "motion/react";
+import { cn } from "@/lib/utils";
+
+export const AnimatedTooltip = ({
+ className,
+ children,
+ text,
+ href,
+}: {
+ className?: string;
+ children: React.ReactNode;
+ text: string;
+ href?: string;
+}) => {
+ const [hovered, setHovered] = useState
(false);
+ const animationFrameRef = useRef(null);
+
+ const handleMouseMove = (event: any) => {
+ if (animationFrameRef.current) {
+ cancelAnimationFrame(animationFrameRef.current);
+ }
+ };
+
+ return (
+ <>
+ setHovered(true)}
+ onMouseLeave={() => setHovered(false)}
+ >
+
+ {hovered && (
+
+
+
+
+ {text}
+
+
+ )}
+
+ {!href && (
+
+ {children}
+
+ )}
+ {href && (
+
+ {children}
+
+ )}
+
+ >
+ );
+};
diff --git a/src/components/ui/HoverNavigation.tsx b/src/components/ui/HoverNavigation.tsx
index 661511e..eaa00bb 100644
--- a/src/components/ui/HoverNavigation.tsx
+++ b/src/components/ui/HoverNavigation.tsx
@@ -1,136 +1,136 @@
import { cn } from "@/lib/utils";
import {
- AnimatePresence,
- motion,
- useScroll,
- useMotionValueEvent,
+ AnimatePresence,
+ motion,
+ useScroll,
+ useMotionValueEvent,
} from "motion/react";
import { useState } from "react";
export const HoverNavigation = ({
- items,
- className,
+ items,
+ className,
}: {
- items: {
- label: string;
- link: string;
- }[];
- className?: string;
+ items: {
+ label: string;
+ link: string;
+ }[];
+ className?: string;
}) => {
- let [hoveredIndex, setHoveredIndex] = useState(null);
- const { scrollYProgress } = useScroll();
- const [visible, setVisible] = useState(true);
+ let [hoveredIndex, setHoveredIndex] = useState(null);
+ const { scrollYProgress } = useScroll();
+ const [visible, setVisible] = useState(true);
- useMotionValueEvent(scrollYProgress, "change", (current) => {
- // Check if current is not undefined and is a number
- if (typeof current === "number") {
- let direction = current! - scrollYProgress.getPrevious()!;
+ useMotionValueEvent(scrollYProgress, "change", (current) => {
+ // Check if current is not undefined and is a number
+ if (typeof current === "number") {
+ let direction = current! - scrollYProgress.getPrevious()!;
- if (scrollYProgress.get() < 0.05) {
- setVisible(true);
- } else {
- if (direction > 0) {
- setVisible(false);
- } else {
- setVisible(true);
- }
- }
- }
- });
+ if (scrollYProgress.get() < 0.05 && current !== 1) {
+ setVisible(true);
+ } else {
+ if (direction > 0) {
+ setVisible(false);
+ } else {
+ setVisible(true);
+ }
+ }
+ }
+ });
- return (
- <>
-
-
- Available for work
-
-
-
-
- {items.map((item, idx) => (
- setHoveredIndex(idx)}
- onMouseLeave={() => setHoveredIndex(null)}
- >
-
- {hoveredIndex === idx && (
-
- )}
-
- {item.label}
-
- ))}
-
- >
- );
+ return (
+ <>
+
+
+ Available for work
+
+
+
+
+ {items.map((item, idx) => (
+ setHoveredIndex(idx)}
+ onMouseLeave={() => setHoveredIndex(null)}
+ >
+
+ {hoveredIndex === idx && (
+
+ )}
+
+ {item.label}
+
+ ))}
+
+ >
+ );
};
export const NavBarLink = ({
- className,
- children,
+ className,
+ children,
}: {
- className?: string;
- children: React.ReactNode;
+ className?: string;
+ children: React.ReactNode;
}) => {
- return (
-
- {children}
-
- );
+ return (
+
+ {children}
+
+ );
};
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index e97412d..027ee0d 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -51,6 +51,13 @@ import { ClientRouter } from "astro:transitions";
font-style: normal;
}
+ @font-face {
+ font-family: "Antonio";
+ src: url("/fonts/Antonio-Bold.ttf") format("truetype");
+ font-weight: bold;
+ font-style: normal;
+ }
+
/* Montserrat Fonts */
@font-face {
font-family: "Montserrat";
diff --git a/src/pages/contact.astro b/src/pages/contact.astro
index 1bb9cac..7cbed4a 100644
--- a/src/pages/contact.astro
+++ b/src/pages/contact.astro
@@ -1,7 +1,7 @@
---
import NavBar from "../components/global/NavBar.astro";
import Layout from "../layouts/Layout.astro";
-import ContactComponent from "../components/contact/ContactComponent.svelte";
+import ContactComponent from "../components/contact/ContactComponent.astro";
import Card from "../components/global/Card.astro";
import Footer from "../components/global/FooterComponent.astro";
---
@@ -13,26 +13,7 @@ import Footer from "../components/global/FooterComponent.astro";