Skip to content

Commit

Permalink
fix blog
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgill committed Apr 1, 2024
1 parent ba9ee43 commit 9e091b9
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 595 deletions.
51 changes: 0 additions & 51 deletions apps/docs/src/components/BlogHeader.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
import { buttonVariants } from "@/components/ui/Button";
import { getCategories } from "@/lib/fetchers";
import { cn } from "@/lib/utils";
import { Icon } from "astro-icon/components";
const categories = await getCategories();
Expand All @@ -11,56 +8,8 @@ type Props = {
};
const { title } = Astro.props;
const { category } = Astro.params;
---

<h1 class="font-heading inline-block text-4xl">{title}</h1>

<div class="my-6 flex items-start justify-between max-md:gap-4">
<div
class="text-muted-foreground flex h-10 max-w-xs items-center rounded-md border px-2 lg:w-full lg:px-3"
>
<Icon name="ri:search-line" class="size-5" />
<span class="ml-2 hidden text-sm lg:flex">Search (coming soon)</span>
</div>

{
categories?.length ? (
<ul class="flex snap-x snap-mandatory items-center space-x-2 overflow-auto pb-2 lg:space-x-2.5">
<li class="flex-shrink-0 snap-start">
<a
href={`/blog`}
class={cn(
!category ? "select-none" : "",
buttonVariants({
variant: !category ? "default" : "outline",
}),
)}
>
All posts
</a>
</li>
{categories.map((item) => (
<li class="flex-shrink-0 snap-start">
<a
href={`/blog/category/${item}`}
class={cn(
"capitalize",
item === category ? "select-none" : "",
buttonVariants({
variant: item === category ? "default" : "outline",
}),
)}
>
{item}
</a>
</li>
))}
</ul>
) : (
<div />
)
}
</div>

<hr class="mb-7" />
8 changes: 0 additions & 8 deletions apps/docs/src/components/cards/BlogCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ const post = Astro.props;
</a>

<div class="flex items-center justify-between">
<a
href={`/blog/category/${post.data.category}`}
transition:name={"badge-cat-" + post.slug}
>
<Badge radius="md" className="capitalize">
{post.data.category}
</Badge>
</a>
<span
class="text-muted-foreground font-medium"
transition:name={"date-" + post.slug}
Expand Down
1 change: 0 additions & 1 deletion apps/docs/src/content/blog/first-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: "First Post"
description: "Embark on a web development adventure with our inaugural post, diving deep into industry insights and emerging trends."
pubDate: "Jul 08 2022"
cover: "/images/blog/placeholder-3.jpg"
category: "design"
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
Expand Down
215 changes: 0 additions & 215 deletions apps/docs/src/content/blog/markdown-style-guide.md

This file was deleted.

14 changes: 0 additions & 14 deletions apps/docs/src/content/blog/pale-blue-dot.md

This file was deleted.

Loading

0 comments on commit 9e091b9

Please sign in to comment.