From 254f4457f5c0d04ee8e13b3c47415443ca233b8a Mon Sep 17 00:00:00 2001 From: ION606 Date: Mon, 31 Mar 2025 19:36:35 -0400 Subject: [PATCH] reformatted README --- .gitignore | 1 + README.css | 474 ++++++++++++++++++++++++ README.html | 1008 ++++++++++++++++++++++++++++++--------------------- README.js | 206 +++++++++++ README.md | 157 +++++++- terminal.js | 349 ++++++++++++++++++ 6 files changed, 1766 insertions(+), 429 deletions(-) create mode 100644 .gitignore create mode 100644 README.css create mode 100644 README.js create mode 100644 terminal.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fec32c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tmp/ diff --git a/README.css b/README.css new file mode 100644 index 0000000..d458b67 --- /dev/null +++ b/README.css @@ -0,0 +1,474 @@ +:root { + --primary: #7c3aed; + --secondary: #4f46e5; + --dark: #0f172a; + --light: #f8fafc; + --space-black: #0a0e29; + --neon-purple: #7c3aed; + --star-twinkle: #fffac2; + --ufo-color: #ff4081; + --console-bg: rgba(15, 23, 42, 0.9); + --day-bg: linear-gradient(160deg, #87CEEB 0%, #E0F6FF 100%); + --day-text: #1e293b; + --day-primary: #4f46e5; + --day-secondary: #6366f1; + --day-section-bg: rgba(255, 255, 255, 0.9); + --command-color: var(--primary); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Segoe UI", sans-serif; +} + +body { + background: var(--space-black); + color: var(--light); + line-height: 1.6; + overflow-x: hidden; + position: relative; + transition: background 0.5s ease, color 0.3s ease; +} + +body[data-theme="day"] { + background: var(--day-bg); + color: var(--day-text); + --command-color: var(--day-primary); +} + +body[data-theme="day"] nav a { + color: var(--day-primary); +} + +body[data-theme="day"] nav a:hover { + color: var(--day-secondary); +} + +body[data-theme="day"] .section { + background: var(--day-section-bg); + color: var(--day-text); +} + +body[data-theme="day"] #dev-console { + background: rgba(0, 0, 0, 0.3); +} + +body[data-theme="day"] #dev-console .consoleout { + color: var(--day-text); +} + + +/* navigation bar from readme.md */ +nav { + position: fixed; + top: 0; + left: 0; + width: 100%; + background: transparent; + z-index: 1000; + padding: 0.5rem 1rem; + display: flex; + justify-content: center; + gap: 2rem; +} + +nav a { + color: var(--primary); + text-decoration: none; + font-weight: bold; +} + +nav a:hover { + color: var(--secondary); +} + +.typewriter { + font-family: monospace; + white-space: nowrap; + overflow: hidden; + width: 0; +} + +.typing-anim { + border-right: 0.15em solid var(--primary); + animation: typing 3.5s steps(30, end) forwards, blink-caret 0.75s step-end infinite; +} + +.typing-text { + position: relative; + display: inline-block; + margin: 0 auto; + font-size: 1.25rem; + white-space: nowrap; + overflow: hidden; +} + +.typing-cursor { + display: inline-block; + width: 0.1em; + height: 1em; + background-color: var(--primary); + animation: blink-caret-cursor 0.75s step-end infinite; + vertical-align: text-bottom; +} + +@keyframes blink-caret-cursor { + + from, + to { + opacity: 0; + } + + 50% { + opacity: 1; + } +} + +.typing-text::after { + display: none !important; +} + +@keyframes typing { + from { + width: 0; + } + + to { + width: 100%; + } +} + +@keyframes blink-caret { + + from, + to { + border-color: transparent; + } + + 50% { + border-color: var(--primary); + } +} + +.container { + max-width: 1200px; + margin: 3rem auto 0 auto; + padding: 2rem; + position: relative; + z-index: 1; +} + +.hero { + text-align: center; + overflow: hidden; +} + +.hero h1 { + font-size: 3.5rem; + margin-bottom: 1rem; + background: linear-gradient(45deg, var(--primary), var(--secondary)); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-size: 200%; + animation: shimmer 2s linear infinite; +} + +@keyframes shimmer { + 0% { + background-position: 0%; + } + + 100% { + background-position: 200%; + } +} + +li { + margin: 10px 0; +} + +.category-title { + margin-top: 2em; +} + +/* cosmic button style */ +.cosmic-button { + background: linear-gradient(45deg, var(--primary), var(--secondary)); + border: none; + padding: 0.75rem 1.5rem; + border-radius: 50px; + color: var(--light); + cursor: pointer; + transition: transform 0.3s ease; + margin: 1rem; +} + +.support-buttons img { + width: 30px; +} + +.cosmic-button:hover { + transform: scale(1.05); +} + +/* section styling */ +.section { + background: rgba(15, 23, 42, 0.7); + backdrop-filter: blur(10px); + border-radius: 1rem; + padding: 2rem; + margin: 2rem 0; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + transform: translateY(20px); + opacity: 0; + animation: slideUp 0.5s ease forwards; +} + +@keyframes slideUp { + to { + transform: translateY(0); + opacity: 1; + } +} + +/* tech grid styles */ +.tech-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); + gap: 1.5rem; + margin-top: 1.5rem; +} + +.tech-card { + background: rgba(79, 70, 229, 0.1); + padding: 1rem; + border-radius: 0.5rem; + text-align: center; + transition: transform 0.3s ease; + display: flex; + flex-direction: column; + align-items: center; +} + +.tech-card:hover { + transform: translateY(-5px); +} + +.tech-card img { + width: 50px; + height: 50px; + margin-bottom: 0.5rem; + object-fit: contain; +} + +/* starfield styles */ +.star { + position: absolute; + background: var(--star-twinkle); + border-radius: 50%; + animation: twinkle 3s infinite ease-in-out; +} + +@keyframes twinkle { + + 0%, + 100% { + opacity: 0.3; + } + + 50% { + opacity: 1; + } +} + +/* ufo styles */ +.ufo { + position: fixed; + top: 20%; + left: -100px; + width: 100px; + height: 50px; + background: var(--ufo-color); + border-radius: 50px / 25px; + box-shadow: 0 0 20px var(--ufo-color); + z-index: 2000; + animation: fly 5s ease-in-out forwards; +} + +@keyframes fly { + 0% { + transform: translateX(0); + } + + 100% { + transform: translateX(110vw); + } +} + +/* hidden developer console */ +#dev-console { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + background: var(--console-bg); + padding: 1rem; + display: none; + z-index: 3000; +} + +#dev-console input { + width: 100%; + padding: 0.5rem; + border: none; + outline: none; + background: #222; + color: var(--light); +} + +/* responsive design */ +@media (max-width: 768px) { + .hero h1 { + font-size: 2.5rem; + } + + .container { + padding: 1rem; + } +} + +.connect-grid { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 20px; + margin: 20px 0; +} + +.stats-container { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 20px; + margin: 20px 0; +} + +#dev-console .consoleout { + color: #fff; + margin-top: 10px; + font-family: monospace; + max-height: 40vh; + margin-bottom: 20px; + overflow-y: scroll; + position: relative; +} + +#dev-console li { + list-style: none; + position: relative; + padding-left: 20px; + word-wrap: break-word; + margin-left: 20px; +} + +#dev-console li::before { + content: ">"; + position: absolute; + left: 0; + color: var(--bullet-color, var(--primary)); +} + +body[data-theme="day"] #dev-console li::before { + color: var(--day-primary); +} + +.content { + text-align: center; + line-height: 50px; +} + +.disco-mode { + animation: disco 0.5s infinite; +} + +@keyframes disco { + 0% { + filter: hue-rotate(0deg); + } + + 100% { + filter: hue-rotate(360deg); + } +} + +/* Active modules styles */ +.active-modules { + font-family: monospace; + text-align: center; + margin-top: 2rem; +} + +.module { + display: inline-block; + margin: 0 5px; + padding: 2px 5px; + transition: transform 0.2s ease, color 0.2s ease; + cursor: pointer; + font-family: monospace; +} + +.active-modules, +.active-modules * { + user-select: none; + -webkit-user-select: none; + /* Safari */ + -moz-user-select: none; + /* Firefox */ + -ms-user-select: none; + /* IE10+ */ +} + +#moduleTitle { + cursor: pointer; +} + +.module.hovered { + transform: scale(1.2); +} + +.active-modules .module:nth-child(1).hovered { + color: #ff4081; +} + +.active-modules .module:nth-child(2).hovered { + color: #7c3aed; +} + +.active-modules .module:nth-child(3).hovered { + color: #4f46e5; +} + +.active-modules .module:nth-child(4).hovered { + color: #00ff88; +} + +.active-modules .module:nth-child(5).hovered { + color: #feb47b; +} + +.active-modules .module:nth-child(6).hovered { + color: #ff7e5f; +} + +.consolerrdiv { + color: #ff4d4d; + background: rgba(0, 0, 0, 0.8); + padding: 0.5rem 1rem; + margin: 0.5rem 0; + font-family: monospace; + border-left: 3px solid #ff4d4d; +} \ No newline at end of file diff --git a/README.html b/README.html index fe3b479..1e9819d 100644 --- a/README.html +++ b/README.html @@ -1,447 +1,611 @@ - - - - ION606 - Portfolio - - - - -
-
-

🌍 Good Timezone! I'm ION606 🚀

-

A grad student exploring neural networks, data analysis, procedural animation, and system programming.

-
- - -
-

🎨 About Me

-
    -
  • 🔭 Currently working on my Bluesky client and my workout app
  • -
  • 🌱 Currently studying neural networks, data analysis, procedural animation, Redis
  • -
  • 💬 Ask me about Express.js, web design, or kernel-level operations
  • -
  • 📫 Reach me at ion606@protonmail.com
  • -
  • ⚡ Fun fact: I still enjoy creating with GameMaker Studio 2 for fun side projects
  • -
-
- - -
-

🛠️ Technologies & Tools

- -

Programming Languages

-
-
- C - C -
-
- C++ - C++ -
-
- C# - C# -
-
- Python - Python -
-
- Java - Java -
-
- JavaScript - JavaScript -
-
- TypeScript - TypeScript -
-
- Solidity - Solidity -
-
- Swift - Swift -
-
- Kotlin - Kotlin -
-
- Dart - Dart -
-
- Go - Go -
-
- Rust - Rust -
-
- Ruby - Ruby -
-
- PHP - PHP -
-
- Haskell - Haskell -
-
- Erlang - Erlang -
-
- -

Frontend Development

-
-
- CSS3 - CSS3 -
-
- HTML5 - HTML5 -
-
- Bootstrap - Bootstrap -
-
- Vue.js - Vue.js -
-
- React - React -
-
- -

Backend Development

-
-
- Django - Django -
-
- Express.js - Express.js -
-
- Node.js - Node.js -
-
- Flask - Flask -
-
- FastAPI - FastAPI -
-
- GraphQL - GraphQL -
-
- - - - -
- - -
-

📊 GitHub Stats

-
- Top Languages - GitHub Stats -
-
- - -
-

📫 Contact Me

-
-

📧 ion606@protonmail.com

- - -
- Number of cute people who have viewed my profile
- Profile Views -
-
-
-
- - - - \ No newline at end of file + + + + diff --git a/README.js b/README.js new file mode 100644 index 0000000..9e8ad9a --- /dev/null +++ b/README.js @@ -0,0 +1,206 @@ +// Initialize animations and interactions +document.addEventListener("DOMContentLoaded", () => { + createStars(); + initObservers(); + initKonamiCode(); +}); + +function createStars() { + const starfield = document.getElementById("starfield"); + starfield.innerHTML = ""; + + for (let i = 0; i < 200; i++) { + const star = document.createElement("div"); + star.className = "star"; + star.style.width = Math.random() * 3 + "px"; + star.style.height = star.style.width; + star.style.left = Math.random() * 100 + "%"; + star.style.top = Math.random() * 100 + "%"; + star.style.animationDuration = Math.random() * 3 + 1 + "s"; + starfield.appendChild(star); + } +} + +function initObservers() { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + entry.target.style.opacity = 1; + entry.target.style.transform = "translateY(0)"; + } + }); + }, + { threshold: 0.1 } + ); + + document.querySelectorAll(".section, .timeline-item").forEach((el) => { + observer.observe(el); + }); +} + +function initKonamiCode() { + const konamiCode = [ + "ArrowUp", + "ArrowUp", + "ArrowDown", + "ArrowDown", + "ArrowLeft", + "ArrowRight", + "ArrowLeft", + "ArrowRight", + "b", + "a", + ]; + let index = 0; + + document.addEventListener("keydown", (e) => { + e.key === konamiCode[index] ? index++ : (index = 0); + if (index === konamiCode.length) { + document.body.classList.add("konami-mode"); + const ufo = document.querySelector(".ufo"); + ufo.style.animation = "flyby 15s linear infinite"; + } + }); +} + +// create starfield effect +const createStarfield = () => { + const starfield = document.querySelector("#starfield"); + const numStars = 150; + for (let i = 0; i < numStars; i++) { + const star = document.createElement("div"); + star.classList.add("star"); + // randomize size and position + const size = Math.random() * 3 + 1; + star.style.width = `${size}px`; + star.style.height = `${size}px`; + star.style.top = `${Math.random() * 100}vh`; + star.style.left = `${Math.random() * 100}vw`; + // random duration for twinkling + star.style.setProperty("--duration", `${Math.random() * 3 + 2}s`); + // add click event to form constellations + star.addEventListener("click", (e) => { + console.log("star clicked at", e.pageX, e.pageY); + }); + starfield.appendChild(star); + } +}; + +// implement typewriter effect for hero section +function typewriterEffect() { + const el = document.querySelector(".typing-text"); + const text = el.getAttribute("data-text"); + el.innerHTML = ""; // Clear any existing content + + // Create a span for the typed text + const textSpan = document.createElement("span"); + textSpan.className = "typed-text"; + el.appendChild(textSpan); + + // Create a blinking caret appended after the text + const caretSpan = document.createElement("span"); + caretSpan.className = "typing-cursor"; + el.appendChild(caretSpan); + + let index = 0; + const speed = 100; // ms/char + + function type() { + if (index < text.length) { + textSpan.textContent += text.charAt(index); + index++; + setTimeout(type, speed); + } else setTimeout(() => caretSpan.remove(), 2000); + } + type(); +} + +const createParticleEffect = () => { + const particles = document.createElement("div"); + particles.style.position = "fixed"; + particles.style.top = `${Math.random() * window.innerHeight}px`; + particles.style.left = `${Math.random() * window.innerWidth}px`; + particles.style.width = "5px"; + particles.style.height = "5px"; + particles.style.background = "var(--primary)"; + particles.style.borderRadius = "50%"; + particles.style.opacity = "0.8"; + particles.style.pointerEvents = "none"; + particles.style.transition = "opacity 1s ease-out"; + document.body.appendChild(particles); + setTimeout(() => { + particles.style.opacity = "0"; + }, 50); + setTimeout(() => { + particles.remove(); + }, 1000); +}; + +// implement particle effect on scroll +const particleEffectOnScroll = () => { + window.addEventListener("scroll", () => createParticleEffect); +}; + +// konami code detection for UFO easter egg +let keyBuffer = []; + +// launch UFO easter egg +const launchUFO = () => { + const ufo = document.createElement("div"); + ufo.classList.add("ufo"); + document.body.appendChild(ufo); + // remove UFO after animation + ufo.addEventListener("animationend", () => { + ufo.remove(); + }); +}; + +// intersection observer for sections +const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + entry.target.style.opacity = 1; + entry.target.style.transform = "translateY(0)"; + } + }); + }, + { threshold: 0.1 } +); + +document.addEventListener("DOMContentLoaded", () => { + document.querySelectorAll(".section").forEach((section, index) => { + observer.observe(section); + section.style.animationDelay = `${index * 0.2}s`; + }); + + createStarfield(); + typewriterEffect(); + particleEffectOnScroll(); + + let hovered = false; + const modTitle = document.querySelector("#moduleTitle"), + modules = modTitle.parentElement.querySelectorAll(".module"); + + modules.forEach((el) => { + el.addEventListener("mouseenter", () => el.classList.add("hovered")); + el.addEventListener("mouseleave", () => el.classList.remove("hovered")); + }); + + modTitle.addEventListener("mouseenter", async () => { + if (hovered) return; + hovered = true; + + for (const el of modules) { + el.classList.add("hovered"); + + // anim is .2 seconds + setTimeout(() => el.classList.remove("hovered"), 200); + + await new Promise((resolve) => setTimeout(resolve, 100)); + } + }); + + modTitle.addEventListener("mouseleave", () => (hovered = false)); +}); diff --git a/README.md b/README.md index df10785..cfa71c3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,151 @@ -# Welcome to my personal website! -You can find it at [ion606.com](https://ion606.com) +

🌍 Good Timezone! I'm ION606 🚀

+

A grad student exploring neural networks, data analysis, procedural animation, and system programming.

-## Table of Contents -* [Home](https://ion606.com/) -* [README](https://ion606.com/README) -* [Projects](https://ion606.com/projects) -* [Links](https://ion606.com/links) \ No newline at end of file +--- + +### 🎨 About Me +- 🔭 I’m currently working on [my Bluesky client](https://github.com/ION606/bluesky-client) and [my workout app](https://github.com/ION-WorkoutApp). +- 🌱 I’m currently studying **neural networks, data analysis, procedural animation, Redis**. +- 💬 Ask me about **Express.js, web design, or kernel-level operations**. +- 📫 You can reach me at **ion606@protonmail.com**. +- ⚡ Fun fact: **I still enjoy creating with GameMaker Studio 2** for fun side projects. + +--- + +### 🛠️ Technologies & Tools + +#### 🖥️ Programming Languages +

+ C   + C++   + C#   + Python   + Java   + JavaScript   + TypeScript   + Solidity   + Swift   + Kotlin   + Dart   + Go   + Rust   + Ruby   + PHP   + Haskell   + Erlang +

+ +#### 🎨 Frontend Development +

+ CSS3   + HTML5   + Bootstrap   + Vue.js   + React +

+ +#### 🚀 Backend Development +

+ Django   + Express.js   + Node.js   + Flask   + FastAPI   + GraphQL +

+ +#### ☁️ Frameworks & Cloud +

+ Docker   + Kubernetes   + AWS   + Nginx   + Podman   + Vercel +

+ +#### 🧠 Machine Learning (ML) +

+ Scikit-learn   + TensorFlow +

+ +#### 🗄️ Database +

+ Firebase   + MongoDB   + MSSQL   + MySQL   + PostgreSQL   + Redis   + SQLite +

+ +#### 🛠️ Tools & APIs +

+ Git   + GitHub   + Selenium   + Puppeteer   + OpenCV   + Vagrant   + Gradle +

+ +#### 🖥️ Software +

+ Arduino   + Heroku   + Linux   + Matlab   + Raspberry Pi +

+ +#### 📦 Frameworks +

+ DotNet   + Electron   + Next.js   + React   + Puppeteer +

+ +--- + +### 📫 Contact Me +📧 **ion606@protonmail.com** + +--- + +### 📊 GitHub Stats +

+ Top Languages +

+ +

+ ion606 +

+ + + +--- + +### 🔗 Connect with Me +

+ Dev.to + Stack Overflow +

+ +

+ Buy Me A Coffee + Ko-fi +

+ +

+ Number of cute people who have viewed my profile
+ Profile Views +

+ + diff --git a/terminal.js b/terminal.js new file mode 100644 index 0000000..5b2b86d --- /dev/null +++ b/terminal.js @@ -0,0 +1,349 @@ +// secret developer console toggle (using backtick key) +const devConsoleToggle = () => { + const devConsole = document.querySelector("#dev-console"); + if ( + devConsole.style.display === "none" || + devConsole.style.display === "" + ) { + devConsole.style.display = "block"; + } else { + devConsole.style.display = "none"; + devConsole.querySelector(".consoleout").innerHTML = ""; + } + + // for the command + return true; +}; + +document.addEventListener("keydown", (e) => { + if (e.key === "`") devConsoleToggle(); +}); + +class TerminalFS { + constructor() { + const consoleInput = document.querySelector("#dev-console input"); + const consoleOutput = document.createElement("div"); + consoleOutput.className = "consoleout"; + document.querySelector("#dev-console").prepend(consoleOutput); + + // not set bc indexing + const userInps = []; + let uInpInd = 0; + + consoleInput?.addEventListener("keydown", (e) => { + if (e.key === "Enter") { + const commandText = e.target.value.trim(); + const [cmd, ...args] = commandText.split(" "); + + if (cmd === "clear") consoleOutput.innerHTML = ""; + else { + const eggResponse = this.easterEggs(commandText); + if (eggResponse) { + consoleOutput.innerHTML += `
> ${commandText}
${eggResponse}
`; + e.target.value = ""; + } else { + const cmdContent = this.commands[cmd]?.(args.join(" ")); + if (!cmdContent) { + consoleOutput.innerHTML += `
🚨 Unknown command: \`${cmd}\`
`; + } else if (cmdContent != true) { + consoleOutput.innerHTML += cmdContent; + } + } + } + + if (!userInps.includes(commandText)) userInps.push(commandText); + e.target.value = ""; + uInpInd = 0; // reset history index + consoleOutput.scrollTop = consoleOutput.scrollHeight; + } else if (e.key === "ArrowUp") { + if (userInps.length > 0 && uInpInd < userInps.length) { + uInpInd++; + consoleInput.value = userInps[userInps.length - uInpInd]; + consoleInput.setSelectionRange( + consoleInput.value.length, + consoleInput.value.length + ); + } + } else if (e.key === "ArrowDown") { + if (uInpInd > 1) { + uInpInd--; + consoleInput.value = userInps[userInps.length - uInpInd]; + consoleInput.setSelectionRange( + consoleInput.value.length, + consoleInput.value.length + ); + } else { + uInpInd = 0; + consoleInput.value = ""; + } + } + }); + + this.currentDir = "/"; + this.fs = { + "/": { + type: "dir", + children: ["home", "projects", "fun", "etc", "sys"], + }, + "/home": { type: "dir", children: ["ion606", "guest"] }, + "/home/ion606": { + type: "dir", + children: [ + "resume.txt", + "todo.txt", + ".secret_config", + "diary.md", + ], + }, + "/projects": { + type: "dir", + children: [ + "bluesky-client", + "workout-app", + "AI-overlord", + "black-hole-sim", + ], + }, + "/fun": { + type: "dir", + children: ["joke.txt", "konami.seq", "uwu.md", "hackerman.gif"], + }, + "/etc": { + type: "dir", + children: ["motd", "syslog", "joke_of_the_day"], + }, + "/sys": { + type: "dir", + children: ["self-destruct.exe", "disco-bootloader"], + }, + }; + + this.files = { + "/home/ion606/todo.txt": ` + 1. Take over the world + 2. Make coffee ☕ + 3. Fix CSS in production + 4. ???? + 5. PROFIT! + `, + "/fun/joke.txt": ` + Why do Java developers wear glasses? + Because they can't C#! + + (•_•) + ( •_•)>⌐■-■ + (⌐■_■) + `, + "/etc/motd": ` + WARNING: This system is powered by ✨imagination✨ + Unauthorized access will result in T̵̙̻̭̤̺̱̥̖̤̭̗̜͓͎̓̈́̏͋̔̕̚͠h̴̳͎̳̱̘̽̎͛͆̓̐͑͛̈́̕̕͝͝é̷̛̮̥̲͇̊̅͋̏̊̅͊͝͝ ̵̡̛̪̮̦̘̘̼̼̺̪̪̋͋̀̌̇̉̋͌̾̿̓͝͝V̶̡̨̧̨̟̙̻͓̪͇̻̞̥͑̎͋͗̿́̓̌͒͊̈́́̚͠ơ̴̛̱̞̾̎̒̋̾̔̈́̓͑̋̉ȋ̴̡̛̙̘̝̙̬̠̹̙̻͖̔̽̿̓͑̈́͋́̐̕͠d̷̲̲̘̈́̑́̿̆̓̔͋́̓̋̅̏̚ + `, + "/home/ion606/.secret_config": ` + [disco_settings] + sparkle_level=9001 + rainbow_mode=enabled + pink_nodders: online + `, + "/fun/uwu.md": ` + # Nya~ Welcome to my secret docs! + + (´• ω •\`)ノ Here's some important stuff: + - Pet all the cats 🐈 + - Drink more water 💧 + - Remember to uwu-ify your code + `, + "/etc/joke_of_the_day": ` + Why do programmers prefer dark mode? + Because light attracts bugs! 🐛 + + How many programmers does it take to change a light bulb? + None, that's a hardware problem! + `, + "/home/ion606/diary.md": ` + Dear Diary, + + Today I discovered the Konami code activates a UFO. + Also, typing "make me a sandwich" works sometimes... + Note to self: Buy more coffee. + `, + "/home/ion606/resume": document + .querySelector("html") + .outerHTML.replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"), + }; + } + + // Easter egg commands + easterEggs(command) { + const responses = { + "sudo make me a sandwich": "What? Make it yourself.", + "why did the chicken cross the road?": + 'To git commit -m "migration"', + "open the pod bay doors": + "I'm sorry Dave, I'm afraid I can't do that", + "there is no spoon": "System matrix compromised...", + "beam me up": "Energizing! ♫♪♫ ♪♫♪ ♫♪♫", + }; + + return responses[command.toLowerCase()] || null; + } + + // Path resolution logic + resolvePath(targetPath) { + const path = targetPath.replace(/\/+/g, "/").replace(/\/$/, "") || "/"; + + if (path.startsWith("/")) return path; + else { + let fullPath = `${this.currentDir}/${path}`.replace(/\/+/g, "/"); + const segments = fullPath.split("/").filter(Boolean); + const resolvedSegments = []; + + for (const segment of segments) { + // Current directory, skip + if (segment === ".") continue; + + // Move up one level if possible + if (segment === "..") resolvedSegments.pop(); + else resolvedSegments.push(segment); + } + + return "/" + resolvedSegments.join("/"); + } + } + + // Command implementations + commands = { + ls: (path) => { + if (!path) path = this.currentDir; + + const absPath = this.resolvePath(path); + const dir = this.fs[absPath]; + + if (!dir) + return `ls: cannot access '${path}': No such file or directory`; + if (dir.type !== "dir") return `ls: ${path}: Not a directory`; + + const items = dir.children.map((item) => { + const fullPath = + absPath === "/" ? `/${item}` : `${absPath}/${item}`; + const isDir = this.fs[fullPath]?.type === "dir"; + return `${isDir ? "📁" : "📄"} ${item}${isDir ? "/" : ""}`; + }); + + return `
${absPath}\n${"-".repeat(40)}\n${items.join(
+				"\n"
+			)}
`; + }, + + cd: (path) => { + const absPath = this.resolvePath(path); + if (!this.fs[absPath] || this.fs[absPath].type !== "dir") { + return `cd: ${path}: No such directory`; + } + this.currentDir = absPath; + return `
moved to ${absPath}
`; + }, + + cat: (filePath) => { + const absPath = this.resolvePath(filePath); + + if (!this.files[absPath]) { + // Easter egg for missing files + const jokes = [ + "File not found... but here's a joke!", + "404: Humor not found... just kidding!", + "This file is in another castle! 🍄", + ]; + return ( + `${jokes[Math.floor(Math.random() * jokes.length)]}\n` + + ` ╚═(███)═╝\n` + + ` ╚═(███)═╝\n` + + ` ╚═(███)═╝\n` + + ` ██╚═╝██\n` + + ` ███████\n` + + ` ███████` + ); + } + + return `
${this.files[absPath].trim()}
`; + }, + help: () => ` + `, + + exit: devConsoleToggle, + + theme: (arg) => { + const themeArg = arg.trim().toLowerCase(); + if (themeArg === "night" || themeArg === "dark") { + document.body.setAttribute("data-theme", "night"); + return "🌙 Switched to night theme!"; + } else if (themeArg === "day" || themeArg === "light") { + document.body.setAttribute("data-theme", "day"); + return "☀️ Switched to day theme!"; + } else { + return "Usage: theme [day/night]"; + } + }, + + background: (arg) => { + const bgArg = arg.trim().toLowerCase(); + if (bgArg === "ocean") { + document.body.style.background = + "linear-gradient(to right, #1e3c72, #2a5298)"; + return "🌊 Ocean background set!"; + } else if (bgArg === "sunset") { + document.body.style.background = + "linear-gradient(to right, #ff7e5f, #feb47b)"; + return "🌇 Sunset background set!"; + } else if (bgArg === "forest") { + document.body.style.background = + "linear-gradient(to right, #134e5e, #71b280)"; + return "🌲 Forest background set!"; + } else { + document.body.style.background = ""; + return "Background reset to default!"; + } + }, + + ufo: () => { + launchUFO(); + return "🛸 UFO launched!"; + }, + + starfield: () => { + createStars(); + return "✨ Starfield regenerated!"; + }, + + random: () => { + const colors = ["#ff4081", "#7c3aed", "#4f46e5", "#00ff88"]; + document.body.style.color = + colors[Math.floor(Math.random() * colors.length)]; + return "🌈 Color chaos activated!"; + }, + + secret: () => { + document.body.classList.toggle("disco-mode"); + return "🎆 Disco mode activated!"; + }, + }; +} + +// Initialize terminal system +const terminalFS = new TerminalFS();