mirror of
https://github.com/SoPat712/my-portfolio.git
synced 2025-08-21 10:18:45 -04:00
fixes?
This commit is contained in:
@@ -1,18 +1,33 @@
|
||||
import { defineConfig } from "eslint/config";
|
||||
import svelte from "eslint-plugin-svelte";
|
||||
import svelteParser from "svelte-eslint-parser";
|
||||
import { dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
// Define __dirname for ES modules
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ["**/*.svelte"],
|
||||
languageOptions: {
|
||||
parser: svelteParser,
|
||||
parserOptions: {
|
||||
ecmaVersion: 2021,
|
||||
sourceType: "module",
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ["./tsconfig.json"],
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
svelte,
|
||||
},
|
||||
settings: {
|
||||
"svelte3/typescript": require("typescript"),
|
||||
},
|
||||
rules: {
|
||||
// Add or override rules here
|
||||
// Add or override Svelte-specific rules here
|
||||
},
|
||||
},
|
||||
{
|
||||
|
14
package-lock.json
generated
14
package-lock.json
generated
@@ -19,7 +19,7 @@
|
||||
"svelte-check": "^4.0.0",
|
||||
"svelte-eslint-parser": "^1.1.2",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.2.5"
|
||||
}
|
||||
},
|
||||
@@ -1043,9 +1043,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sveltejs/kit": {
|
||||
"version": "2.20.4",
|
||||
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.20.4.tgz",
|
||||
"integrity": "sha512-B3Y1mb1Qjt57zXLVch5tfqsK/ebHe6uYTcFSnGFNwRpId3+fplLgQK6Z2zhDVBezSsPuhDq6Pry+9PA88ocN6Q==",
|
||||
"version": "2.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.20.5.tgz",
|
||||
"integrity": "sha512-zT/97KvVUo19jEGZa972ls7KICjPCB53j54TVxnEFT5VEwL16G+YFqRVwJbfxh7AmS7/Ptr1rKF7Qt4FBMDNlw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3186,9 +3186,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "6.2.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.5.tgz",
|
||||
"integrity": "sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==",
|
||||
"version": "6.2.6",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz",
|
||||
"integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@@ -23,7 +23,7 @@
|
||||
"svelte-check": "^4.0.0",
|
||||
"svelte-eslint-parser": "^1.1.2",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.2.5"
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
|
||||
// Portfolio Data
|
||||
@@ -58,7 +58,7 @@
|
||||
},
|
||||
{
|
||||
name: "BlueBubbles Contribution",
|
||||
link: "https://github.com/BlueBubblesApp/BlueBubbles",
|
||||
link: "https://github.com/BlueBubblesApp/bluebubbles-app",
|
||||
description:
|
||||
"Contributed to BlueBubbles, an open-source project bringing iMessage-like functionality to non-Apple platforms. Focused on UI development and infrastructure improvements.",
|
||||
techStack: ["Android", "Dart/Flutter", "MongoDB"],
|
||||
@@ -182,13 +182,8 @@
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
// Active section for navigation
|
||||
/** @type {string} */
|
||||
let activeSection = "home";
|
||||
|
||||
/**
|
||||
* @param {string} section
|
||||
*/
|
||||
function navigateTo(section) {
|
||||
let activeSection: string = "home";
|
||||
function navigateTo(section: string) {
|
||||
activeSection = section;
|
||||
const el = document.getElementById(section);
|
||||
if (el) {
|
||||
@@ -197,30 +192,32 @@
|
||||
}
|
||||
|
||||
// Terminal
|
||||
/** @type {Array<{command: string, output: string}>} */
|
||||
let terminalHistory = [
|
||||
let terminalHistory: Array<{ command: string; output: string }> = [
|
||||
{ command: "whoami", output: profile.name },
|
||||
{
|
||||
command: "ls -la",
|
||||
output: "projects education achievements experience skills contact",
|
||||
},
|
||||
];
|
||||
/** @type {string} */
|
||||
let currentCommand = "";
|
||||
|
||||
/** @type {HTMLDivElement | null} */
|
||||
let terminalContainer = null;
|
||||
/** @type {HTMLInputElement | null} */
|
||||
let terminalInput = null;
|
||||
let currentCommand: string = "";
|
||||
let terminalContainer: HTMLDivElement | null = null;
|
||||
let terminalInput: HTMLInputElement | null = null;
|
||||
|
||||
// Variables for typewriter effect
|
||||
let typedName = "";
|
||||
let typedRole = "";
|
||||
let bioVisible = false; // controls when the bio fades in
|
||||
let typedName: string = "";
|
||||
let typedRole: string = "";
|
||||
let bioVisible: boolean = false;
|
||||
|
||||
// Typewriter function for the text
|
||||
function typeWriter(text, setter, delay) {
|
||||
return new Promise((resolve) => {
|
||||
/**
|
||||
* A typewriter function that types `text` at the given `delay` and calls
|
||||
* `setter` with the current substring. Returns a Promise that resolves when finished.
|
||||
*/
|
||||
function typeWriter(
|
||||
text: string,
|
||||
setter: (val: string) => void,
|
||||
delay: number,
|
||||
): Promise<void> {
|
||||
return new Promise<void>((resolve: () => void) => {
|
||||
let i = 0;
|
||||
const interval = setInterval(() => {
|
||||
setter(text.slice(0, i + 1));
|
||||
@@ -237,22 +234,23 @@
|
||||
if (terminalInput) {
|
||||
terminalInput.focus();
|
||||
}
|
||||
// Faster typing speed: delay set to 50ms
|
||||
// Type the name (slower speed for dramatic effect)
|
||||
await typeWriter(
|
||||
profile.name,
|
||||
(val) => {
|
||||
(val: string) => {
|
||||
typedName = val;
|
||||
},
|
||||
150,
|
||||
);
|
||||
// Type the role
|
||||
await typeWriter(
|
||||
profile.role,
|
||||
(val) => {
|
||||
(val: string) => {
|
||||
typedRole = val;
|
||||
},
|
||||
50,
|
||||
);
|
||||
// Once typing is done, fade in the bio
|
||||
// Once typing is done, show the bio
|
||||
bioVisible = true;
|
||||
});
|
||||
|
||||
@@ -311,7 +309,6 @@
|
||||
terminalHistory = [...terminalHistory, { command: currentCommand, output }];
|
||||
currentCommand = "";
|
||||
|
||||
// Scroll the terminal to bottom after command execution
|
||||
setTimeout(() => {
|
||||
if (terminalContainer) {
|
||||
terminalContainer.scrollTop = terminalContainer.scrollHeight;
|
||||
@@ -319,20 +316,13 @@
|
||||
}, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {KeyboardEvent} e
|
||||
*/
|
||||
function handleKeyPress(e) {
|
||||
function handleKeyPress(e: KeyboardEvent) {
|
||||
if (e.key === "Enter") {
|
||||
executeCommand();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLDivElement} node
|
||||
* @returns {{ destroy: () => void }}
|
||||
*/
|
||||
function bindTerminalContainer(node) {
|
||||
function bindTerminalContainer(node: HTMLDivElement) {
|
||||
terminalContainer = node;
|
||||
return {
|
||||
destroy() {
|
||||
@@ -341,18 +331,14 @@
|
||||
};
|
||||
}
|
||||
|
||||
// Store user input
|
||||
let userName = "";
|
||||
let userEmail = "";
|
||||
let userMessage = "";
|
||||
|
||||
/** Opens user's default mail client with a prefilled message. */
|
||||
// Store user input for contact form
|
||||
let userName: string = "";
|
||||
let userEmail: string = "";
|
||||
let userMessage: string = "";
|
||||
function sendMail() {
|
||||
const subject = `Portfolio Contact from ${userName}`;
|
||||
const body = `Name: ${userName}, Email: ${userEmail}\n\n${userMessage}`;
|
||||
const mailtoUrl = `mailto:joshpatra12@gmail.com?subject=${encodeURIComponent(
|
||||
subject,
|
||||
)}&body=${encodeURIComponent(body)}`;
|
||||
const mailtoUrl = `mailto:joshpatra12@gmail.com?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
|
||||
window.location.href = mailtoUrl;
|
||||
userName = "";
|
||||
userEmail = "";
|
||||
@@ -450,7 +436,6 @@
|
||||
<div
|
||||
class="bg-black border border-gray-700 rounded-md p-3 font-mono text-sm"
|
||||
>
|
||||
<!-- Terminal container with bind: directive -->
|
||||
<div class="h-48 overflow-y-auto" use:bindTerminalContainer>
|
||||
{#each terminalHistory as entry}
|
||||
<div class="mb-2">
|
||||
@@ -499,11 +484,10 @@
|
||||
<h2 class="text-xl md:text-2xl text-gray-400 mb-6">
|
||||
{typedRole}
|
||||
</h2>
|
||||
<!-- Fade in the bio after typewriting is complete -->
|
||||
<!-- Static bio (no fade in effect) -->
|
||||
<p class="text-gray-300 leading-relaxed mb-8">
|
||||
{profile.bio}
|
||||
</p>
|
||||
|
||||
<div class="flex flex-wrap gap-4">
|
||||
<a
|
||||
href="/Josh_Patra_Resume.pdf"
|
||||
|
Reference in New Issue
Block a user