new poast: selection detection

This commit is contained in:
2025-01-05 00:41:05 +00:00
parent 8850366898
commit 8ea52962bf
16 changed files with 3342 additions and 2400 deletions

View File

@@ -5,15 +5,30 @@ import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import FormattedDate from "../components/FormattedDate.astro";
type Props = CollectionEntry<"blog">["data"];
type Props = CollectionEntry<"blog">["data"] & { useKatex?: boolean };
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
const {
title,
description,
pubDate,
updatedDate,
heroImage,
useKatex = false,
} = Astro.props;
---
<!doctype html>
<html lang="en" class="latte dark:mocha">
<head>
<BaseHead title={title} description={description} image={heroImage} />
{
useKatex ? (
<link
href="https://cdn.jsdelivr.net/npm/katex@0.16.19/dist/katex.min.css"
rel="stylesheet"
/>
) : null
}
</head>
<body class="blog bg-base text-text max-w-prose m-auto p-8">