diff --git a/admin/app/services/docs_service.ts b/admin/app/services/docs_service.ts index f4af334..be84011 100644 --- a/admin/app/services/docs_service.ts +++ b/admin/app/services/docs_service.ts @@ -115,6 +115,24 @@ export class DocsService { class: { type: String } } }, + table: { + render: 'Table', + }, + thead: { + render: 'TableHead', + }, + tbody: { + render: 'TableBody', + }, + tr: { + render: 'TableRow', + }, + th: { + render: 'TableHeader', + }, + td: { + render: 'TableCell', + }, }, } } diff --git a/admin/docs/home.md b/admin/docs/home.md index 3403023..6028415 100644 --- a/admin/docs/home.md +++ b/admin/docs/home.md @@ -46,11 +46,11 @@ Or explore the **[Getting Started Guide](/docs/getting-started)** for a walkthro | I want to... | Go here | |--------------|---------| -| Download more content | [Install Apps](/apps) | -| Add Wikipedia/reference content | [ZIM Manager](/settings/zim-manager) | -| Download map regions | [Maps Manager](/settings/maps-manager) | -| Check for updates | [System Update](/settings/updates) | -| View system status | [Settings](/settings) | +| Download more content | [Install Apps →](/apps) | +| Add Wikipedia/reference content | [ZIM Manager →](/settings/zim-manager) | +| Download map regions | [Maps Manager →](/settings/maps-manager) | +| Check for updates | [System Update →](/settings/updates) | +| View system status | [Settings →](/settings) | --- diff --git a/admin/inertia/components/MarkdocRenderer.tsx b/admin/inertia/components/MarkdocRenderer.tsx index bab0917..9345df6 100644 --- a/admin/inertia/components/MarkdocRenderer.tsx +++ b/admin/inertia/components/MarkdocRenderer.tsx @@ -3,6 +3,7 @@ import Markdoc from '@markdoc/markdoc' import { Heading } from './markdoc/Heading' import { List } from './markdoc/List' import { ListItem } from './markdoc/ListItem' +import { Table, TableHead, TableBody, TableRow, TableHeader, TableCell } from './markdoc/Table' // Custom components for Markdoc tags const Callout = ({ @@ -36,6 +37,12 @@ const components = { Heading, List, ListItem, + Table, + TableHead, + TableBody, + TableRow, + TableHeader, + TableCell, } interface MarkdocRendererProps { diff --git a/admin/inertia/components/markdoc/Table.tsx b/admin/inertia/components/markdoc/Table.tsx new file mode 100644 index 0000000..835c946 --- /dev/null +++ b/admin/inertia/components/markdoc/Table.tsx @@ -0,0 +1,37 @@ +export function Table({ children }: { children: React.ReactNode }) { + return ( +