new logic routes

This commit is contained in:
Profile Profile
2026-01-22 00:00:07 +03:00
parent c5b00af520
commit ec2daae26b
4 changed files with 160 additions and 19 deletions

View File

@@ -0,0 +1,23 @@
---
interface Props {
post: any;
pageInfo?: any;
}
const { post, pageInfo } = Astro.props;
---
{post ? (
<article class="news-single">
<h1>{post.title}</h1>
<div class="meta">
{post.date && <time>{new Date(post.date).toLocaleDateString('ru-RU')}</time>}
</div>
{post.content && <div set:html={post.content} />}
</article>
) : (
<div>Новость не найдена</div>
)}