initial commit

This commit is contained in:
laura 2025-11-06 21:45:58 -03:00
commit e2466b202a
Signed by: w
GPG key ID: BCD2117C99E69817
50 changed files with 4356 additions and 0 deletions

49
routes/reports/[rkey].tsx Normal file
View file

@ -0,0 +1,49 @@
/**
* Copyright (c) 2025 favewa
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { PageProps } from "fresh";
import { getCachedReports } from "@/utils/atproto.ts";
import Empty from "@/components/Empty.tsx";
export default function PostPage(props: PageProps) {
const { rkey } = props.params;
const post = getCachedReports().find((rep) =>
rep.rkey === rkey.toLowerCase()
);
if (!post) {
return <Empty path={`/reports/${rkey}`} />;
}
return (
<>
<a href="/reports"> exit this report</a>
<article>
<header>
<div class="meta">
<time datetime={post?.createdAt}>{post?.createdAt}</time>
</div>
<h1>{post.title}</h1>
{post.tags && (
<div class="tags">
{post.tags.map((tag) => <span key={tag} class="tag">{tag}</span>)}
</div>
)}
</header>
<div
class="content typewriting"
dangerouslySetInnerHTML={{ __html: post.content }}
/>
<footer>
<a href="/">
You reached the end of the page. It is now safe to turn off your
computer.
</a>
</footer>
</article>
</>
);
}