Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
51 changes: 46 additions & 5 deletions src/views/Projects.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>

Check warning on line 1 in src/views/Projects.vue

View workflow job for this annotation

GitHub Actions / lint

Component name "Projects" should always be multi-word
import { ref, computed } from 'vue';

// Ongoing projects (In Development, Planning, etc.)
Expand Down Expand Up @@ -27,7 +27,27 @@
],
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
Expand All @@ -38,6 +58,27 @@
// 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);
};
</script>

<template>
Expand Down Expand Up @@ -146,14 +187,14 @@
icon="pi pi-github"
outlined
data-test="project-code-button"
@click="window.open(project.github, '_blank')"
@click="openGithubRepo(project.github)"
/>
<PrimeButton
v-if="project.demo"
label="Live Demo"
icon="pi pi-external-link"
data-test="project-demo-button"
@click="window.open(project.demo, '_blank')"
@click="openLiveDemo(project.demo)"
/>
</div>
</template>
Expand Down Expand Up @@ -253,13 +294,13 @@
label="View Code"
icon="pi pi-github"
outlined
@click="window.open(project.github, '_blank')"
@click="openGithubRepo(project.github)"
/>
<PrimeButton
v-if="project.demo"
label="Live Demo"
icon="pi pi-external-link"
@click="window.open(project.demo, '_blank')"
@click="openLiveDemo(project.demo)"
/>
</div>
</template>
Expand Down
Loading