Add alternate source repository links
This commit is contained in:
16
README.md
16
README.md
@@ -15,4 +15,20 @@ To add a live project link, add `siteUrl` to any project in `projects.js`:
|
|||||||
siteUrl: "https://seanstarkey.dev/Hallowdeep/"
|
siteUrl: "https://seanstarkey.dev/Hallowdeep/"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To link a project to a self-hosted git repository, add `gitUrl`:
|
||||||
|
|
||||||
|
```js
|
||||||
|
gitUrl: "https://git.seanstarkey.dev/Hallowdeep"
|
||||||
|
```
|
||||||
|
|
||||||
|
Projects can keep their existing `url` GitHub link, use only `gitUrl`, or include both.
|
||||||
|
|
||||||
|
To link a project to SourceForge, add `sourceforgeUrl`:
|
||||||
|
|
||||||
|
```js
|
||||||
|
sourceforgeUrl: "https://sourceforge.net/projects/project-name/"
|
||||||
|
```
|
||||||
|
|
||||||
|
SourceForge projects can also omit `url` if there is no GitHub mirror.
|
||||||
|
|
||||||
Open `index.html` directly in a browser or deploy the whole directory to any static host.
|
Open `index.html` directly in a browser or deploy the whole directory to any static host.
|
||||||
|
|||||||
18
app.js
18
app.js
@@ -30,11 +30,14 @@ function matchesSearch(project) {
|
|||||||
const haystack = [
|
const haystack = [
|
||||||
project.name,
|
project.name,
|
||||||
project.description,
|
project.description,
|
||||||
|
project.url,
|
||||||
|
project.gitUrl,
|
||||||
|
project.sourceforgeUrl,
|
||||||
project.siteUrl,
|
project.siteUrl,
|
||||||
project.language,
|
project.language,
|
||||||
project.license,
|
project.license,
|
||||||
project.tags.join(" ")
|
project.tags.join(" ")
|
||||||
].join(" ").toLowerCase();
|
].filter(Boolean).join(" ").toLowerCase();
|
||||||
|
|
||||||
return haystack.includes(query);
|
return haystack.includes(query);
|
||||||
}
|
}
|
||||||
@@ -55,11 +58,22 @@ function actions(project) {
|
|||||||
const liveLink = project.siteUrl
|
const liveLink = project.siteUrl
|
||||||
? `<a class="project-link live" href="${project.siteUrl}">Launch</a>`
|
? `<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 `
|
return `
|
||||||
<span class="project-actions">
|
<span class="project-actions">
|
||||||
${liveLink}
|
${liveLink}
|
||||||
<a class="project-link" href="${project.url}">GitHub</a>
|
${selfHostedLink}
|
||||||
|
${sourceforgeLink}
|
||||||
|
${githubLink}
|
||||||
</span>
|
</span>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ npm run explore</pre>
|
|||||||
<button class="filter" type="button" data-filter="C++">C++</button>
|
<button class="filter" type="button" data-filter="C++">C++</button>
|
||||||
<button class="filter" type="button" data-filter="C">C</button>
|
<button class="filter" type="button" data-filter="C">C</button>
|
||||||
<button class="filter" type="button" data-filter="JavaScript">JavaScript</button>
|
<button class="filter" type="button" data-filter="JavaScript">JavaScript</button>
|
||||||
|
<button class="filter" type="button" data-filter="Java">Java</button>
|
||||||
<button class="filter" type="button" data-filter="Practice">Practice</button>
|
<button class="filter" type="button" data-filter="Practice">Practice</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
14
projects.js
14
projects.js
@@ -155,5 +155,19 @@ window.projects = [
|
|||||||
created: "2012-07-31",
|
created: "2012-07-31",
|
||||||
tags: ["utility", "parser"],
|
tags: ["utility", "parser"],
|
||||||
accent: "#f472b6"
|
accent: "#f472b6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Neuros Database Manipulator",
|
||||||
|
description: "Java interface for managing the Neuros Audio Computer database.",
|
||||||
|
siteUrl: "https://neurosdbm.sourceforge.net/",
|
||||||
|
sourceforgeUrl: "https://sourceforge.net/projects/neurosdbm/",
|
||||||
|
language: "Java",
|
||||||
|
license: "GPL",
|
||||||
|
stars: 0,
|
||||||
|
forks: 0,
|
||||||
|
updated: "2005-09-13",
|
||||||
|
created: "2005-09-13",
|
||||||
|
tags: ["utility", "audio", "database"],
|
||||||
|
accent: "#f59e0b"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user