We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a fixed sidebar to the blog page containing category statistics and a prominent CTA section to improve navigation and conversion.
interface CategoryStats { name: string; slug: string; count: number; subcategories?: { name: string; count: number; }[]; } // Example structure const categoryStats = [ { name: 'Tutorials', slug: 'tutorials', count: 306, subcategories: [ { name: 'Authentication', count: 45 }, { name: 'Databases', count: 82 }, { name: 'Performance', count: 24 } ] } ];
interface SidebarProps { className?: string; categories: CategoryStats[]; } interface CTACardProps { title: string; description: string; buttonText: string; buttonUrl: string; }
export function BlogSidebar({ categories }: SidebarProps) { return ( <aside className="hidden lg:block sticky top-24 w-80 ml-8"> <div className="space-y-8"> <CategoriesList categories={categories} /> <CTACard /> </div> </aside> ); }
function CategoriesList({ categories }: { categories: CategoryStats[] }) { return ( <div className="rounded-lg border bg-card p-6"> <h2 className="text-lg font-semibold mb-4">Categories</h2> <div className="space-y-2"> {categories.map(category => ( <CategoryItem key={category.slug} name={category.name} count={category.count} href={`/blog/category/${category.slug}`} /> ))} </div> </div> ); }
function CTACard() { return ( <div className="rounded-lg bg-primary-900 text-primary-foreground p-6"> <h3 className="text-xl font-bold mb-2">Get Started!</h3> <p className="text-sm mb-4"> Start building better developer tools today with DevTools Academy resources. </p> <Button variant="secondary" className="w-full" href="/get-started" > Start Learning Free → </Button> </div> ); }
.sidebar { @apply w-80 flex-shrink-0 hidden lg:block; @apply sticky top-24 h-[calc(100vh-6rem)]; @apply overflow-y-auto; } .category-item { @apply flex items-center justify-between; @apply px-3 py-2 rounded-md; @apply hover:bg-accent transition-colors; } .cta-card { @apply bg-gradient-to-br from-primary-900 to-primary-800; @apply shadow-lg; }
async function getCategoryStats(): Promise<CategoryStats[]> { // Fetch category statistics from DB or generate from posts }
Priority: Medium
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Overview
Add a fixed sidebar to the blog page containing category statistics and a prominent CTA section to improve navigation and conversion.
Features to Implement
1. Category Statistics Panel
2. Components Structure
UI Implementation
1. Sidebar Layout
2. Categories Section
3. CTA Card Component
Styling
Desktop
Responsive Behavior
Technical Requirements
1. Data Fetching
2. Performance Optimizations
Acceptance Criteria
Nice-to-have Features
Testing Requirements
Priority: Medium
The text was updated successfully, but these errors were encountered: