mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-05 13:52:40 +02:00
Merge branch 'dev' of https://github.com/MODSetter/SurfSense into dev
This commit is contained in:
commit
6f4bf11a32
26 changed files with 473 additions and 562 deletions
|
|
@ -2,10 +2,24 @@ import { DocsLayout } from "fumadocs-ui/layouts/docs";
|
|||
import type { ReactNode } from "react";
|
||||
import { baseOptions } from "@/app/layout.config";
|
||||
import { source } from "@/lib/source";
|
||||
import { SidebarSeparator } from "./sidebar-separator";
|
||||
|
||||
const gridTemplate = `"sidebar header toc"
|
||||
"sidebar toc-popover toc"
|
||||
"sidebar main toc" 1fr / var(--fd-sidebar-col) minmax(0, 1fr) min-content`;
|
||||
|
||||
export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<DocsLayout tree={source.pageTree} {...baseOptions}>
|
||||
<DocsLayout
|
||||
tree={source.pageTree}
|
||||
{...baseOptions}
|
||||
containerProps={{ style: { gridTemplate }, className: "bg-fd-card" }}
|
||||
sidebar={{
|
||||
components: {
|
||||
Separator: SidebarSeparator,
|
||||
},
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</DocsLayout>
|
||||
);
|
||||
|
|
|
|||
12
surfsense_web/app/docs/sidebar-separator.tsx
Normal file
12
surfsense_web/app/docs/sidebar-separator.tsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use client";
|
||||
|
||||
import type { Separator } from "fumadocs-core/page-tree";
|
||||
|
||||
export function SidebarSeparator({ item }: { item: Separator }) {
|
||||
return (
|
||||
<p className="inline-flex items-center gap-2 mb-1.5 px-2 mt-6 font-semibold first:mt-0 empty:mb-0">
|
||||
{item.icon}
|
||||
{item.name}
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
|
@ -235,3 +235,4 @@ button {
|
|||
@source '../node_modules/streamdown/dist/*.js';
|
||||
@source '../node_modules/@streamdown/code/dist/*.js';
|
||||
@source '../node_modules/@streamdown/math/dist/*.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
|
||||
|
||||
export const baseOptions: BaseLayoutProps = {
|
||||
nav: {
|
||||
title: "SurfSense Documentation",
|
||||
title: "SurfSense Docs",
|
||||
},
|
||||
githubUrl: "https://github.com/MODSetter/SurfSense",
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue