summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/BaseHead.astro1
-rw-r--r--src/components/note/Note.astro86
2 files changed, 0 insertions, 87 deletions
diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro
index 40f1d20..14286c3 100644
--- a/src/components/BaseHead.astro
+++ b/src/components/BaseHead.astro
@@ -95,7 +95,6 @@ const ogLocale = getOgLocale(lang);
{/* RSS auto-discovery */}
<link href="/rss.xml" title="Blog" rel="alternate" type="application/rss+xml" />
-<link href="/micro/rss.xml" title="Micro" rel="alternate" type="application/rss+xml" />
{/* Webmentions */}
{
diff --git a/src/components/note/Note.astro b/src/components/note/Note.astro
deleted file mode 100644
index 920cbc1..0000000
--- a/src/components/note/Note.astro
+++ /dev/null
@@ -1,86 +0,0 @@
----
-import { type CollectionEntry, render } from "astro:content";
-import type { HTMLTag, Polymorphic } from "astro/types";
-import FormattedDate from "@/components/FormattedDate.astro";
-
-type Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }> & {
- note: CollectionEntry<"micro">;
- isPreview?: boolean | undefined;
-};
-
-const { as: Tag = "div", note, isPreview = false } = Astro.props;
-const { Content } = await render(note);
----
-
-<article
- class:list={[
- isPreview && "inline-grid rounded-md bg-[rgb(240,240,240)] px-4 py-3 dark:bg-[rgb(33,35,38)]",
- ]}
- data-pagefind-body={isPreview ? false : true}
->
- <Tag class="title" class:list={{ "text-base": isPreview }}>
- {
- isPreview ? (
- <a class="cactus-link" href={`/micro/${note.id}/`}>
- {note.data.title}
- </a>
- ) : (
- <>{note.data.title}</>
- )
- }
- </Tag>
- <FormattedDate
- dateTimeOptions={{
- hour: "2-digit",
- minute: "2-digit",
- year: "2-digit",
- month: "2-digit",
- day: "2-digit",
- }}
- date={note.data.publishDate}
- />
- <div
- class="prose prose-sm prose-cactus mt-4 max-w-none [&>p:last-of-type]:mb-0"
- class:list={{ "line-clamp-6": isPreview }}
- >
- <Content />
- {
- !isPreview && note.data.attachments && note.data.attachments.length > 0 && (
- <div class="mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2">
- {note.data.attachments.map((attachment: { type: string; url: string; alt?: string }) => (
- <a
- href={attachment.url}
- target="_blank"
- rel="noopener noreferrer"
- class="block overflow-hidden rounded-lg border border-gray-200 transition-colors hover:border-gray-300 dark:border-gray-700 dark:hover:border-gray-600"
- >
- <img
- src={attachment.url}
- alt={attachment.alt || "Image"}
- class="h-48 w-full object-cover"
- loading="lazy"
- />
- </a>
- ))}
- </div>
- )
- }
- {
- !isPreview && note.data.sourceUrl && (
- <>
- <hr class="mt-6 mb-4 border-t border-gray-300 dark:border-gray-600" />
- <p class="text-sm text-gray-600 dark:text-gray-400">
- <a
- href={note.data.sourceUrl}
- class="cactus-link"
- target="_blank"
- rel="noopener noreferrer"
- >
- View original post →
- </a>
- </p>
- </>
- )
- }
- </div>
-</article>