- {[
- { text: 'MiarmaGit', to: 'https://git.miarma.net/Gallardo7761' },
- { text: 'Instagram', to: 'https://instagram.com/gallardoo7761' },
- { text: 'Reddit', to: 'https://reddit.com/u/Gallardo7761' },
- ].map((social) => (
-
- {social.text}
-
- ))}
-
- Mastodon
-
+
);
diff --git a/src/components/HackerCat.jsx b/src/components/HackerCat.jsx
new file mode 100644
index 0000000..d1c1a9c
--- /dev/null
+++ b/src/components/HackerCat.jsx
@@ -0,0 +1,89 @@
+import { motion } from 'framer-motion';
+import { useState, useEffect } from 'react';
+
+const HackerCat = () => {
+ const [pos, setPos] = useState({ x: -100, y: 500 });
+ const [command, setCommand] = useState("");
+ const [isVisible, setIsVisible] = useState(false);
+
+ const linuxCommands = [
+ "sudo rm -rf /",
+ "apt update",
+ "git push --force",
+ "kill -9 -1",
+ "shutdown -h now",
+ "ping 8.8.8.8",
+ "whoami"
+ ];
+
+ useEffect(() => {
+ const spawnCat = () => {
+ if (Math.random() > 0.4) return;
+
+ const windowH = window.innerHeight;
+ const randomY = Math.floor(Math.random() * (windowH - 200)) + 50;
+ const randomCmd = linuxCommands[Math.floor(Math.random() * linuxCommands.length)];
+
+ setPos({ x: -200, y: randomY });
+ setCommand(randomCmd);
+ setIsVisible(true);
+
+ setTimeout(() => setIsVisible(false), 11000);
+ };
+
+ const timer = setInterval(spawnCat, 300000);
+
+ return () => clearInterval(timer);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
+ if (!isVisible) return null;
+
+ return (
+
+
+ $ {command}
+
+
+
+
+ );
+};
+
+export default HackerCat;
\ No newline at end of file
diff --git a/src/components/Header.jsx b/src/components/Header.jsx
index e56d383..81bb91b 100644
--- a/src/components/Header.jsx
+++ b/src/components/Header.jsx
@@ -1,7 +1,7 @@
import { motion } from "framer-motion";
import PropTypes from "prop-types";
import { useState, useEffect, useMemo } from "react";
-import "../css/Header.css";
+import "@/css/Header.css";
const Header = ({ subtitle }) => {
const names = useMemo(() => ["Jose", "Gallardo7761"], []);
@@ -14,6 +14,7 @@ const Header = ({ subtitle }) => {
const baseText = "Hola, soy ";
const fullText = baseText + (isJose ? names[0] : names[1]);
+ // FSM ahh
if (animationState === "writing") {
if (text.length < fullText.length) {
timeout = setTimeout(() => {
@@ -36,15 +37,7 @@ const Header = ({ subtitle }) => {
}
return () => clearTimeout(timeout);
- }, [text, animationState, isJose, names]); // -> Funciona !!! --> edit 08/25: fue mi primera pagina en react, se nota XD
-
- const subtitleWithCode = (
-
- printf("%s", "{subtitle}");
-
- );
-
- const [isHovered, setIsHovered] = useState(false);
+ }, [text, animationState, isJose, names]);
return (
@@ -62,10 +55,8 @@ const Header = ({ subtitle }) => {
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.8, delay: 0.2 }}
- onHoverStart={() => setIsHovered(true)}
- onHoverEnd={() => setIsHovered(false)}
>
- {isHovered ? subtitleWithCode : subtitle}
+ {subtitle}
diff --git a/src/components/Link.jsx b/src/components/Link.jsx
index 14685c4..5a6b9db 100644
--- a/src/components/Link.jsx
+++ b/src/components/Link.jsx
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
-import AbstractLink from './AbstractLink';
+import AbstractLink from '@/components/AbstractLink';
const Link = ({ to, children, isNavbar, className = '', ...props }) => {
return (
diff --git a/src/components/NavBar.jsx b/src/components/NavBar.jsx
index 4ad7058..683d45e 100644
--- a/src/components/NavBar.jsx
+++ b/src/components/NavBar.jsx
@@ -1,6 +1,6 @@
import { motion } from 'framer-motion';
import PropTypes from 'prop-types';
-import '../css/NavBar.css';
+import '@/css/NavBar.css';
const NavBar = ({ children }) => {
const navVariants = {
@@ -20,7 +20,9 @@ const NavBar = ({ children }) => {
aria-expanded="false"
aria-label="Toggle navigation"
>
-