From c2b75ef2a98456418e8d65afc0f4a2a81fcf9dde Mon Sep 17 00:00:00 2001 From: Jake Kohl Date: Wed, 8 Oct 2025 11:43:34 -0500 Subject: [PATCH] chore: added calc project and fixed button links --- cypress/support/commands/contact.js | 0 src/views/Projects.vue | 51 ++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 cypress/support/commands/contact.js diff --git a/cypress/support/commands/contact.js b/cypress/support/commands/contact.js new file mode 100644 index 0000000..e69de29 diff --git a/src/views/Projects.vue b/src/views/Projects.vue index f39b052..d434aa9 100644 --- a/src/views/Projects.vue +++ b/src/views/Projects.vue @@ -27,7 +27,27 @@ const ongoingProjects = ref([ ], dataTest: 'project-portfolio', images: [], - } + }, + { + title: 'Calculator', + description: 'A simple calculator program built with tinker and pytest', + technologies: ['Python', 'Tinker', 'Pytest'], + skillsLeveraged: [ + 'Object-Oriented Programming', + 'Unit Testing', + 'Debugging', + ], + status: 'In Development', + github: 'https://github.com/jakekohl/calculator-project', + features: [ + 'Simple calculator interface', + 'Basic arithmetic operations', + 'Unit testing with pytest', + 'CI/CD Pipeline using GitHub Actions', + ], + dataTest: 'project-calculator', + images: [], + }, ]); // Completed projects @@ -38,6 +58,27 @@ const completedProjects = ref([ // Computed properties to check if sections have projects const hasOngoingProjects = computed(() => ongoingProjects.value.length > 0); const hasCompletedProjects = computed(() => completedProjects.value.length > 0); + +// Methods for handling external navigation +const openExternalLink = (url) => { + if (url) { + try { + window.open(url, '_blank', 'noopener,noreferrer'); + } catch (error) { + console.error('Failed to open external link:', error); + // Fallback: try to navigate in the same window + window.location.href = url; + } + } +}; + +const openGithubRepo = (githubUrl) => { + openExternalLink(githubUrl); +}; + +const openLiveDemo = (demoUrl) => { + openExternalLink(demoUrl); +}; @@ -253,13 +294,13 @@ const hasCompletedProjects = computed(() => completedProjects.value.length > 0); label="View Code" icon="pi pi-github" outlined - @click="window.open(project.github, '_blank')" + @click="openGithubRepo(project.github)" />