Initial commit from Astro

This commit is contained in:
houston[bot]
2026-01-29 10:17:40 +01:00
committed by vorpax
commit c29b05bff3
123 changed files with 12279 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
---
import type { CollectionEntry } from "astro:content";
import IconEdit from "@/assets/icons/IconEdit.svg";
import { SITE } from "@/config";
type Props = {
hideEditPost?: CollectionEntry<"blog">["data"]["hideEditPost"];
class?: string;
post: CollectionEntry<"blog">;
};
const { hideEditPost, post, class: className = "" } = Astro.props;
const href = `${SITE.editPost.url}${post.filePath}`;
const showEditPost =
SITE.editPost.enabled && !hideEditPost && href.trim() !== "";
---
{
showEditPost && (
<a
href={href}
target="_blank"
rel="noopener noreferrer"
class:list={[
"flex justify-baseline gap-1.5 opacity-80 hover:text-accent",
className,
]}
>
<IconEdit class="inline-block" />
<span>{SITE.editPost.text}</span>
</a>
)
}