mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-08 02:33:02 +00:00
added "url" to metadata and "try" link on project page
This commit is contained in:
@@ -8,6 +8,7 @@ export interface Props {
|
|||||||
date: string;
|
date: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
image?: string | null;
|
image?: string | null;
|
||||||
|
url?: string;
|
||||||
hidden: boolean;
|
hidden: boolean;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -15,9 +16,25 @@ export interface Props {
|
|||||||
const { metadata } = Astro.props;
|
const { metadata } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<style>
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: 1px solid var(--ayu-blue-500);
|
||||||
|
color: var(--ayu-blue-500);
|
||||||
|
transition:
|
||||||
|
color 0.1s,
|
||||||
|
border-color 0.1s;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: var(--ayu-blue-600);
|
||||||
|
border-color: var(--ayu-blue-600);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<Layout currentPage="projects">
|
<Layout currentPage="projects">
|
||||||
<div class="text-md">
|
<div class="text-md">
|
||||||
<h1 class="text-xl text-ayu-accent mb-2">
|
<h1 class="text-2xl text-ayu-accent mb-2">
|
||||||
{metadata.title}
|
{metadata.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@@ -33,6 +50,19 @@ const { metadata } = Astro.props;
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
metadata.url ? (
|
||||||
|
<a
|
||||||
|
href={metadata.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
class="inline-block text-sm"
|
||||||
|
>
|
||||||
|
Try {metadata.title}
|
||||||
|
</a>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<p class="text-sm text-ayu-gutter mt-4">{metadata.date}</p>
|
<p class="text-sm text-ayu-gutter mt-4">{metadata.date}</p>
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
import ProjectPage from "../../components/ProjectPage.astro";
|
import ProjectPage from "../../components/ProjectPage.astro";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: "wiskatron",
|
title: "Wiskatron",
|
||||||
description: "Spotify listening activity with dynamic visuals",
|
description: "Spotify listening activity with dynamic visuals",
|
||||||
date: "February 2024",
|
date: "February 2024",
|
||||||
slug: "wiskatron",
|
slug: "wiskatron",
|
||||||
// image: null,
|
|
||||||
image: "/wiskatron-icon.svg",
|
image: "/wiskatron-icon.svg",
|
||||||
|
url: "https://wiskatron.oliverbryan.com",
|
||||||
hidden: false,
|
hidden: false,
|
||||||
};
|
};
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user