feat: Update Sidebar and Dashboard page

- Remove SidebarDrawer
    - Add CampfirePanelBar
    - Fix navigation links
    - Add blog files
    - Add aggregator file
    - Update Dashboard.jsx to display blog post links
    - Add Copyright info
This commit is contained in:
2025-09-21 22:43:55 -05:00
parent 591b113175
commit e2bef55a3f
20 changed files with 1060 additions and 26 deletions

View File

@@ -1,10 +1,58 @@
// DashboardPage.jsx
import React from 'react';
import { blogPosts } from '../data/blog-post-data';
import { Button } from '@progress/kendo-react-buttons';
const Dashboard = React.forwardRef((props, ref) => {
// Separate published and draft posts
const publishedPosts = blogPosts.filter(post => post.published);
const draftPosts = blogPosts.filter(post => !post.published);
const handleEdit = (slug) => {
// Navigate to editor page for the given post slug
props.navigate(`/editor/${slug}`);
};
return (
<div ref={ref}>
<h1>Dashboard</h1>
<section>
<h2>Published Posts</h2>
{publishedPosts.length ? (
<ul>
{publishedPosts.map(post => (
<li key={post.slug}>
<a class="k-link" href={post.canonical_url} target="_blank" rel="noreferrer">
{post.title}
</a>{' '}
<span>{post.date}</span>{' '}
<Button onClick={() => handleEdit(post.slug)}>Edit</Button>
</li>
))}
</ul>
) : (
<p>No published posts.</p>
)}
</section>
<section>
<h2>Drafts</h2>
{draftPosts.length ? (
<ul>
{draftPosts.map(post => (
<li key={post.slug}>
{post.title}{' '}
<Button onClick={() => handleEdit(post.slug)}>Edit</Button>
</li>
))}
</ul>
) : (
<p>No drafts.</p>
)}
</section>
</div>
);
});
export default Dashboard;
export default Dashboard;