Move Tags component to blog folder

This commit is contained in:
prototypa
2023-01-21 22:34:00 -05:00
parent b470cf7e16
commit 23b961cc19

View File

@ -1,34 +0,0 @@
---
import { getPermalink } from '~/utils/permalinks';
import { BLOG } from '~/config.mjs';
import type { Post } from '~/types';
export interface Props {
tags: Post['tags'];
class?: string;
}
const { tags, class: className = 'text-sm' } = Astro.props;
---
{
tags && Array.isArray(tags) && (
<ul class={className}>
{tags.map((tag) => (
<li class="bg-gray-100 dark:bg-slate-700 inline-block mr-2 mb-2 py-0.5 px-2 lowercase font-medium">
{BLOG?.tag?.disabled ? (
tag
) : (
<a
href={getPermalink(tag, 'tag')}
class="text-gray-600 dark:text-slate-300 hover:text-primary-800 dark:hover:text-gray-200"
>
{tag}
</a>
)}
</li>
))}
</ul>
)
}