forgor lol
This commit is contained in:
parent
869f3dfbe3
commit
862b11b9ef
34 changed files with 516 additions and 179 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2025 favewa
|
||||
* Copyright (c) 2025 miwa
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
|
|
@ -7,11 +7,13 @@ import { PageProps } from "fresh";
|
|||
import { getCachedReports } from "@/utils/atproto.ts";
|
||||
import Empty from "@/components/Empty.tsx";
|
||||
import "@/assets/report.css";
|
||||
import { formatReadingTime } from "../../utils/blog.ts";
|
||||
import { Head } from "fresh/runtime";
|
||||
|
||||
export default function PostPage(props: PageProps) {
|
||||
const { rkey } = props.params;
|
||||
const post = getCachedReports().find((rep) =>
|
||||
rep.rkey === rkey.toLowerCase()
|
||||
const post = getCachedReports().find(
|
||||
(rep) => rep.rkey === rkey.toLowerCase(),
|
||||
);
|
||||
|
||||
if (!post) {
|
||||
|
|
@ -20,17 +22,57 @@ export default function PostPage(props: PageProps) {
|
|||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>{post.title} - acpi.at</title>
|
||||
<meta name="title" content={`${post.title} - acpi.at`} />
|
||||
<meta name="description" content={post.excerpt} />
|
||||
<meta name="author" content="acpi.at" />
|
||||
{post.tags && <meta name="keywords" content={post.tags.join(", ")} />}
|
||||
<meta name="theme-color" content="#a0bdfc" />
|
||||
<meta
|
||||
name="theme-color"
|
||||
media="(prefers-color-scheme: dark)"
|
||||
content="#1a1a2e"
|
||||
/>
|
||||
<meta property="og:type" content="article" />
|
||||
<link rel="canonical" href={`https://acpi.at/reports/${post.rkey}`} />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:site_name" content="acpi.at" />
|
||||
<meta property="og:title" content={post.title} />
|
||||
<meta property="og:description" content={post.excerpt} />
|
||||
<meta property="og:image" content="" />
|
||||
<meta
|
||||
property="og:url"
|
||||
content={`https://acpi.at/reports/${post.rkey}`}
|
||||
/>
|
||||
<meta property="article:published_time" content={post.createdAt} />
|
||||
<meta property="article:author" content="acpi.at" />
|
||||
{post.tags &&
|
||||
post.tags.map((tag) => (
|
||||
<meta key={tag} property="article:tag" content={tag} />
|
||||
))}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content={post.title} />
|
||||
<meta name="twitter:description" content={post.excerpt} />
|
||||
<meta name="twitter:image" content="" />
|
||||
</Head>
|
||||
<a href="/reports">← exit this report</a>
|
||||
|
||||
<br />
|
||||
<article>
|
||||
<header>
|
||||
<div class="meta">
|
||||
<time datetime={post?.createdAt}>{post?.createdAt}</time>
|
||||
</div>
|
||||
<h1>{post.title}</h1>
|
||||
<div class="meta">
|
||||
<time datetime={post.createdAt}>{post.createdAt}</time> ·{" "}
|
||||
{formatReadingTime(post.readingTime)}
|
||||
</div>
|
||||
{post.tags && (
|
||||
<div class="tags">
|
||||
{post.tags.map((tag) => <span key={tag} class="tag">{tag}</span>)}
|
||||
{post.tags.map((tag) => (
|
||||
<span key={tag} class="tag">
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</header>
|
||||
|
|
@ -38,13 +80,13 @@ export default function PostPage(props: PageProps) {
|
|||
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>
|
||||
<footer>
|
||||
<a href="/" style="color: var(--theme-foreground-alt)">
|
||||
← You reached the end of the page. It is now safe to turn off your
|
||||
computer.
|
||||
</a>
|
||||
</footer>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2025 favewa
|
||||
* Copyright (c) 2025 miwa
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
|
|
@ -7,10 +7,51 @@ import Reports from "@/components/Reports.tsx";
|
|||
import Links from "@/components/Links.tsx";
|
||||
import { getCachedReports } from "@/utils/atproto.ts";
|
||||
import "@/assets/report.css";
|
||||
import { Head } from "fresh/runtime";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>$reports - acpi.at</title>
|
||||
<meta
|
||||
name="description"
|
||||
content="Thoughts, ramblings, and occasional coherence. A collection of personal essays on stuff that randomly come across my mind."
|
||||
/>
|
||||
<meta
|
||||
name="keywords"
|
||||
content="personal blog, essays, mental health, philosophy, linguistics, life writing, reflections"
|
||||
/>
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="$reports - acpi.at" />
|
||||
<meta
|
||||
name="og:description"
|
||||
content="Thoughts, ramblings, and occasional coherence. A collection of personal essays on stuff that randomly come across my mind."
|
||||
/>
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="Thoughts, ramblings, and occasional coherence. A collection of personal essays on stuff that randomly come across my mind."
|
||||
/>
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content="$reports - acpi.at" />
|
||||
<meta property="og:image" content="https://acpi.at/bnuy.webp" />
|
||||
<meta property="og:url" content="https://acpi.at/reports" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="theme-color" content="#a0bdfc" />
|
||||
<meta
|
||||
name="theme-color"
|
||||
media="(prefers-color-scheme: dark)"
|
||||
content="#1a1a2e"
|
||||
/>
|
||||
<link rel="canonical" href="https://acpi.at/reports" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<link
|
||||
rel="alternate"
|
||||
type="application/rss+xml"
|
||||
title="acpi.at - $reports"
|
||||
href="https://acpi.at/rss.xml"
|
||||
/>
|
||||
</Head>
|
||||
<Links selected="reports" />
|
||||
<Reports reports={getCachedReports()} />
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue