lotsa refactoring on that :3
This commit is contained in:
17
web/src/components/post/postInfo.astro
Normal file
17
web/src/components/post/postInfo.astro
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
import { getFormattedDate } from '@utils/date'
|
||||
const { publishDate, readTime, tags } = Astro.props
|
||||
---
|
||||
|
||||
<time datetime={publishDate}>{getFormattedDate(publishDate)}</time> |
|
||||
{readTime} min. read |
|
||||
{
|
||||
tags.map((tag, i) => (
|
||||
<>
|
||||
<a class="b1-no-underline" href={`/posts/tag/${tag}/`}>
|
||||
#{tag}
|
||||
</a>
|
||||
{i < tags.length - 1 && ", "}
|
||||
</>
|
||||
))
|
||||
}
|
||||
Reference in New Issue
Block a user