Skip to content

Commit

Permalink
feat: Info component
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Nov 8, 2024
1 parent 473dafd commit b747350
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/components/Content/Info.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
import { assets } from "@kaplayjs/crew";
type Props = {
crew: keyof typeof assets;
title: string;
};
const { crew = "burpman", title = "Level Up!" } = Astro.props;
---

<aside
class="not-prose p-2 border-b-2 border-primary rounded-t-box text-base bg-base-200 mt-4 mb-4"
>
<div class="text-xl font-bold flex items-center gap-2">
<img src={assets[crew].outlined} class="h-8 my-2">
<p>{title}</p>
</div>
<slot />
</aside>
2 changes: 1 addition & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const blogCollection = defineCollection({

const guideCollection = defineCollection({
loader: glob({
pattern: "**/*.md",
pattern: "**/*.{md,mdx}",
base: "./guides/",
}),
type: "content_layer",
Expand Down

0 comments on commit b747350

Please sign in to comment.