Add alternate source repository links

This commit is contained in:
2026-06-01 10:45:04 -06:00
parent fd0b71dd49
commit da65180426
4 changed files with 47 additions and 2 deletions

18
app.js
View File

@@ -30,11 +30,14 @@ function matchesSearch(project) {
const haystack = [
project.name,
project.description,
project.url,
project.gitUrl,
project.sourceforgeUrl,
project.siteUrl,
project.language,
project.license,
project.tags.join(" ")
].join(" ").toLowerCase();
].filter(Boolean).join(" ").toLowerCase();
return haystack.includes(query);
}
@@ -55,11 +58,22 @@ function actions(project) {
const liveLink = project.siteUrl
? `<a class="project-link live" href="${project.siteUrl}">Launch</a>`
: "";
const selfHostedLink = project.gitUrl
? `<a class="project-link" href="${project.gitUrl}">git.seanstarkey.dev</a>`
: "";
const sourceforgeLink = project.sourceforgeUrl
? `<a class="project-link" href="${project.sourceforgeUrl}">SourceForge</a>`
: "";
const githubLink = project.url
? `<a class="project-link" href="${project.url}">GitHub</a>`
: "";
return `
<span class="project-actions">
${liveLink}
<a class="project-link" href="${project.url}">GitHub</a>
${selfHostedLink}
${sourceforgeLink}
${githubLink}
</span>
`;
}