mirror of
https://github.com/Fluffy-Bean/website.git
synced 2025-06-26 20:06:18 +00:00
Add timestamps to posts
Redesign homebutton a bit arugh Clean up Card stuff
This commit is contained in:
parent
59f1904d88
commit
b22adbda96
11 changed files with 87 additions and 45 deletions
|
@ -4,8 +4,6 @@ import Banner from "../assets/banner.png";
|
|||
|
||||
interface Props {
|
||||
title: string;
|
||||
image: string,
|
||||
alt: string,
|
||||
}
|
||||
|
||||
const { title} = Astro.props;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
import { getMonth, getDaySuffix } from "../utils";
|
||||
import HomeButton from "../components/HomeButton.astro";
|
||||
|
||||
interface Props {
|
||||
|
@ -9,17 +10,21 @@ interface Props {
|
|||
}
|
||||
|
||||
const { post, prev, next, base } = Astro.props;
|
||||
|
||||
const date = new Date(post.data.pubDate);
|
||||
---
|
||||
|
||||
<HomeButton />
|
||||
|
||||
<div class="header">
|
||||
<h1>{post.data.title}</h1>
|
||||
<p>{post.data.description}</p>
|
||||
{post.data.pubDate ? (
|
||||
<p>{date.getDate()}{getDaySuffix(date)} {getMonth(date)} {date.getFullYear()} • {post.data.description}</p>
|
||||
) : (
|
||||
<p>{post.data.description}</p>
|
||||
)}
|
||||
<ul id="tags" class="pill-list" role="list">
|
||||
{post.data.tags.map((item: string) => (
|
||||
<li class="pill">#{item}</li>
|
||||
))}
|
||||
{post.data.tags.map((item: string) => ( <li class="pill">#{item}</li> ))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue