From 07dbc66b617f4e559073e5e3b5a8652eefc56ef8 Mon Sep 17 00:00:00 2001 From: Josh Patra <30350506+SoPat712@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:01:31 -0400 Subject: [PATCH] placeholder removal #1 --- src/routes/+page.svelte | 148 +++++++++++++++++++++++----------------- 1 file changed, 87 insertions(+), 61 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 1ed85f3..ac0366f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -86,8 +86,7 @@ }, ]; - // Replace the prior fake courses with actual courses from your transcript - // (Pulling only Computer Science + relevant classes; feel free to adjust as you see fit) + // Education Info const education = { university: "Rutgers, The State University of New Jersey - New Brunswick", degree: "Bachelor of Arts in Computer Science and Philosophy", @@ -128,12 +127,6 @@ // Achievements const achievements = [ - { - title: "ACM Programming Contest - 2nd Place", - date: "November 2023", - description: - "Led university team to 2nd place in regional algorithmic competition", - }, { title: "Open Source Contributor - 200+ Commits", date: "2022-Present", @@ -157,15 +150,9 @@ description: "Taught computer science fundamentals to underprivileged students", }, - { - title: "Volunteer Teacher in India", - date: "Summer 2021", - description: - "Taught elementary school children who could not afford educational costs", - }, ]; - // Skills organized by category + // Skills const skills = { languages: [ "Python", @@ -178,23 +165,8 @@ "Dart", "Swift/iOS", ], - frontend: [ - "React", - "Svelte", - "Tailwind CSS", - "HTML/CSS", - "Redux", - "Jest", - "Flutter", - ], - backend: [ - "Node.js", - "Express", - "Django", - "Flask", - "Spring Boot", - "GraphQL", - ], + frontend: ["React", "Svelte", "Tailwind CSS", "HTML/CSS", "Flutter"], + backend: ["Node.js", "Express", "Django", "Flask"], devops: ["Docker", "Kubernetes", "AWS", "CI/CD", "Terraform", "Linux/Unix"], databases: ["PostgreSQL", "MongoDB", "Redis", "MySQL", "SQLite"], tools: ["Git", "VSCode", "Neovim", "Jira"], @@ -202,23 +174,22 @@ }; // Active section for navigation + /** @type {string} */ let activeSection = "home"; - // Navigation handler /** * @param {string} section */ function navigateTo(section) { activeSection = section; - - // Smooth scroll to section const el = document.getElementById(section); if (el) { el.scrollIntoView({ behavior: "smooth" }); } } - // Terminal command execution simulation + // Terminal + /** @type {Array<{command: string, output: string}>} */ let terminalHistory = [ { command: "whoami", output: profile.name }, { @@ -226,11 +197,13 @@ output: "projects education achievements experience skills contact", }, ]; + /** @type {string} */ let currentCommand = ""; + /** @type {HTMLDivElement | null} */ - let terminalContainer; + let terminalContainer = null; /** @type {HTMLInputElement | null} */ - let terminalInput; + let terminalInput = null; onMount(() => { if (terminalInput) { @@ -316,6 +289,33 @@ }, }; } + + // Store user input + let userName = ""; + let userEmail = ""; + let userMessage = ""; + + /** Opens user's default mail client with a prefilled message. */ + function sendMail() { + // Subject can remain the same (or change it as you wish) + const subject = `Portfolio Contact from ${userName}`; + + // Updated body to put name/email on one line, then a blank line, then the message + const body = `Name: ${userName}, Email: ${userEmail}\n\n${userMessage}`; + + // Construct the mailto link + const mailtoUrl = `mailto:joshpatra12@gmail.com?subject=${encodeURIComponent( + subject, + )}&body=${encodeURIComponent(body)}`; + + // Open the mail client + window.location.href = mailtoUrl; + + // Clear form fields if desired + userName = ""; + userEmail = ""; + userMessage = ""; + }
@@ -341,44 +341,58 @@
  • navigateTo("home")} > + home +
  • navigateTo("projects")} > + projects +
  • navigateTo("education")} > + education +
  • navigateTo("achievements")} > + achievements +
  • navigateTo("experience")} > + experience +
  • navigateTo("skills")} > + skills +
  • navigateTo("contact")} > + contact +
  • @@ -441,12 +455,16 @@
    navigateTo("projects")} > + View Projects + navigateTo("contact")} > + Contact Me +
    @@ -474,8 +492,10 @@ {project.name} + {project.name} +

    {project.description}

    @@ -483,9 +503,9 @@

    Tech Stack:

    {#each project.techStack as tech} - {tech} + + {tech} + {/each}
    @@ -683,40 +703,47 @@ Get In Touch
    -

    Email: joshpatra12@gmail.com + joshpatra12@gmail.com +

    GitHub: SoPat712 + SoPat712 +

    LinkedIn: joshpatra + joshpatra +

    +

    Send a Message

    - -
    + + +
    @@ -734,6 +762,7 @@ id="email" class="w-full bg-gray-800 border border-gray-700 text-white p-2 rounded-md focus:outline-none focus:border-green-500" placeholder="Your email" + bind:value={userEmail} />
    @@ -745,6 +774,7 @@ rows="4" class="w-full bg-gray-800 border border-gray-700 text-white p-2 rounded-md focus:outline-none focus:border-green-500" placeholder="Your message" + bind:value={userMessage} >