feat: add user guide documentation sidebar
- Add comprehensive user guide with 10 documentation collections - Include 49 articles covering all Checkmate features - Implement sidebar navigation with search functionality - Support light/dark theme with proper color tokens - Add article content renderer with multiple block types - Include image lightbox for documentation screenshots
This commit is contained in:
1 parent
173a4e17d2
commit
c7107a5034
30 files changed
+7786
-3
No files matched your search
@@ -0,0 +1,173 @@
|
||||
import {
|
||||
ArrowRight,
|
||||
FileText,
|
||||
Rocket,
|
||||
Globe,
|
||||
Gauge,
|
||||
Link,
|
||||
Bell,
|
||||
AlertTriangle,
|
||||
Settings,
|
||||
} from "lucide-react";
|
||||
import { useUserGuideTheme } from "./styles/useUserGuideTheme";
|
||||
import "./CollectionPage.css";
|
||||
|
||||
// Map icon names to actual Lucide components
|
||||
const iconMap = {
|
||||
Rocket,
|
||||
Globe,
|
||||
Gauge,
|
||||
Link,
|
||||
Bell,
|
||||
AlertTriangle,
|
||||
Settings,
|
||||
FileText,
|
||||
};
|
||||
|
||||
const CollectionPage = ({ collection, onBack, onArticleClick }) => {
|
||||
const { colors, typography, spacing, border } = useUserGuideTheme();
|
||||
const IconComponent = iconMap[collection.icon] || Rocket;
|
||||
|
||||
return (
|
||||
<div style={{ minHeight: "100%", backgroundColor: colors.background.alt }}>
|
||||
{/* Header */}
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: colors.background.white,
|
||||
borderBottom: border.default,
|
||||
padding: `${spacing.lg} ${spacing.lg}`,
|
||||
}}
|
||||
>
|
||||
<div style={{ maxWidth: 900, margin: "0 auto" }}>
|
||||
{/* Collection Header */}
|
||||
<div style={{ display: "flex", alignItems: "flex-start", gap: spacing.md }}>
|
||||
<IconComponent
|
||||
size={24}
|
||||
strokeWidth={1.5}
|
||||
color={colors.brand.primary}
|
||||
style={{ marginTop: 4 }}
|
||||
/>
|
||||
<div>
|
||||
<h1
|
||||
style={{
|
||||
fontFamily: typography.fontFamily.sans,
|
||||
fontSize: typography.fontSize["2xl"],
|
||||
fontWeight: typography.fontWeight.semibold,
|
||||
color: colors.text.primary,
|
||||
marginBottom: spacing.xs,
|
||||
marginTop: 0,
|
||||
}}
|
||||
>
|
||||
{collection.title}
|
||||
</h1>
|
||||
<p
|
||||
style={{
|
||||
fontFamily: typography.fontFamily.sans,
|
||||
fontSize: typography.fontSize.base,
|
||||
color: colors.text.secondary,
|
||||
lineHeight: typography.lineHeight.normal,
|
||||
margin: 0,
|
||||
}}
|
||||
>
|
||||
{collection.description}
|
||||
</p>
|
||||
<span
|
||||
style={{
|
||||
display: "block",
|
||||
fontSize: typography.fontSize.sm,
|
||||
color: colors.text.muted,
|
||||
marginTop: spacing.sm,
|
||||
}}
|
||||
>
|
||||
{collection.articleCount} articles in this collection
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Articles List */}
|
||||
<div
|
||||
style={{
|
||||
maxWidth: 900,
|
||||
margin: "0 auto",
|
||||
padding: `${spacing.lg} ${spacing.lg}`,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: colors.background.white,
|
||||
border: border.default,
|
||||
borderRadius: border.radius,
|
||||
overflow: "hidden",
|
||||
}}
|
||||
>
|
||||
{collection.articles.map((article, index) => (
|
||||
<div
|
||||
key={article.id}
|
||||
onClick={() => onArticleClick(article.id)}
|
||||
className="user-guide-article-row"
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
padding: spacing.lg,
|
||||
borderBottom:
|
||||
index < collection.articles.length - 1 ? border.default : "none",
|
||||
cursor: "pointer",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{ display: "flex", alignItems: "flex-start", gap: spacing.md }}
|
||||
>
|
||||
<FileText
|
||||
size={16}
|
||||
strokeWidth={1.5}
|
||||
color={colors.text.muted}
|
||||
style={{ marginTop: 2, flexShrink: 0 }}
|
||||
/>
|
||||
<div>
|
||||
<span
|
||||
style={{
|
||||
display: "block",
|
||||
fontFamily: typography.fontFamily.sans,
|
||||
fontSize: typography.fontSize.base,
|
||||
fontWeight: typography.fontWeight.medium,
|
||||
color: colors.text.primary,
|
||||
marginBottom: spacing.xs,
|
||||
}}
|
||||
>
|
||||
{article.title}
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
display: "block",
|
||||
fontFamily: typography.fontFamily.sans,
|
||||
fontSize: typography.fontSize.base,
|
||||
color: colors.text.secondary,
|
||||
lineHeight: typography.lineHeight.normal,
|
||||
}}
|
||||
>
|
||||
{article.description}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<ArrowRight
|
||||
className="arrow-icon"
|
||||
size={16}
|
||||
strokeWidth={1.5}
|
||||
color={colors.text.muted}
|
||||
style={{
|
||||
flexShrink: 0,
|
||||
marginLeft: 16,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CollectionPage;
|
||||
Reference in new issue
Block a user