Cleaned up link code for projects and added git vs web links
All checks were successful
Docker Deploy / build-and-push (push) Successful in 5m7s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 5m7s
This commit is contained in:
@@ -95,15 +95,29 @@ const { project } = Astro.props;
|
||||
|
||||
<div class="card-actions justify-center gap-2 mt-4">
|
||||
{
|
||||
project.link && (
|
||||
project.webLink && (
|
||||
<a
|
||||
href={project.link}
|
||||
href={project.webLink}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="btn btn-sm gap-2 bg-accent-content text-accent hover:bg-accent-content/90"
|
||||
aria-label={`Visit ${project.name}`}
|
||||
aria-label={`Visit ${project.name} website`}
|
||||
>
|
||||
<Icon name="mdi:link" class="w-4 h-4" />
|
||||
<Icon name="mdi:web" class="w-4 h-4" />
|
||||
Website
|
||||
</a>
|
||||
)
|
||||
}
|
||||
{
|
||||
project.gitLink && (
|
||||
<a
|
||||
href={project.gitLink}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="btn btn-sm gap-2 bg-accent-content text-accent hover:bg-accent-content/90"
|
||||
aria-label={`View ${project.name} source code`}
|
||||
>
|
||||
<Icon name="simple-icons:gitea" class="w-4 h-4" />
|
||||
Source
|
||||
</a>
|
||||
)
|
||||
|
||||
@@ -23,8 +23,12 @@ function isGiteaDomain(url: string): boolean {
|
||||
|
||||
const projectsWithGiteaInfo = await Promise.all(
|
||||
config.projects.map(async (project) => {
|
||||
if (project.link && !project.giteaInfo && isGiteaDomain(project.link)) {
|
||||
const giteaInfo = await fetchGiteaInfoFromUrl(project.link);
|
||||
if (
|
||||
project.gitLink &&
|
||||
!project.giteaInfo &&
|
||||
isGiteaDomain(project.gitLink)
|
||||
) {
|
||||
const giteaInfo = await fetchGiteaInfoFromUrl(project.gitLink);
|
||||
if (giteaInfo) {
|
||||
return { ...project, giteaInfo } as Project;
|
||||
}
|
||||
|
||||
@@ -160,46 +160,47 @@ export const config: Config = {
|
||||
id: "ascently",
|
||||
name: "Ascently",
|
||||
description: "FOSS Rock Climbing Tracker for iOS and Android",
|
||||
link: "https://git.atri.dad/atridad/Ascently",
|
||||
gitLink: "https://git.atri.dad/atridad/Ascently",
|
||||
webLink: "https://ascently.atri.dad",
|
||||
},
|
||||
{
|
||||
id: "muse",
|
||||
name: "muse",
|
||||
description: "Go-based music generation using TOML song definitions",
|
||||
link: "https://git.atri.dad/atridad/muse",
|
||||
gitLink: "https://git.atri.dad/atridad/muse",
|
||||
},
|
||||
{
|
||||
id: "magiccounter",
|
||||
name: "MagicCounter",
|
||||
description: "Jeckpack Compose based Magic the Gathering Health Tracker",
|
||||
link: "https://git.atri.dad/atridad/MagicCounter",
|
||||
gitLink: "https://git.atri.dad/atridad/MagicCounter",
|
||||
},
|
||||
{
|
||||
id: "mealient",
|
||||
name: "Mealient (Fork of project by Kirill Kamakin)",
|
||||
description: "An Android client for a self-hosted recipe manager Mealie.",
|
||||
link: "https://git.atri.dad/atridad/Mealient",
|
||||
gitLink: "https://git.atri.dad/atridad/Mealient",
|
||||
},
|
||||
{
|
||||
id: "goth-stack",
|
||||
name: "GOTH Stack",
|
||||
description:
|
||||
"🚀 A Web Application Template Powered by HTMX + Go + Tailwind 🚀",
|
||||
link: "https://git.atri.dad/atridad/goth.stack",
|
||||
gitLink: "https://git.atri.dad/atridad/goth.stack",
|
||||
},
|
||||
{
|
||||
id: "himbot",
|
||||
name: "Himbot",
|
||||
description:
|
||||
"A discord bot written in Go. Loosly named after my username online (HimbothySwaggins).",
|
||||
link: "https://git.atri.dad/atridad/himbot",
|
||||
gitLink: "https://git.atri.dad/atridad/himbot",
|
||||
},
|
||||
{
|
||||
id: "loadr",
|
||||
name: "loadr",
|
||||
description:
|
||||
"A lightweight REST load testing tool with robust support for different verbs, token auth, and performance reports.",
|
||||
link: "https://git.atri.dad/atridad/loadr",
|
||||
gitLink: "https://git.atri.dad/atridad/loadr",
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@ export interface Project {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
link: string;
|
||||
webLink?: string;
|
||||
status?: string;
|
||||
iosLink?: string;
|
||||
androidLink?: string;
|
||||
gitLink?: string;
|
||||
giteaInfo?: GiteaRepoInfo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user