Add Page Filter

This commit is contained in:
2024-03-09 14:16:58 +01:00
parent 228bb43518
commit 82d0403c88
3 changed files with 48 additions and 5 deletions

View File

@@ -5,11 +5,18 @@ import {capitalize} from "./admin/util";
interface Props {
tag: string;
noLink?: boolean;
}
const {tag} = Astro.props;
const {tag, noLink} = Astro.props;
---
<a href={l(`/announcements/tags/${tag}`)}>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 shadow-2xl">{capitalize(tag)}</span>
</a>
{noLink
? (
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 shadow-2xl">{capitalize(tag)}</span>
)
: (
<a href={l(`/announcements/tags/${tag}`)}>
<span class="inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 shadow-2xl">{capitalize(tag)}</span>
</a>
)}