-
-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy path[name].astro
More file actions
44 lines (39 loc) · 1.41 KB
/
Copy path[name].astro
File metadata and controls
44 lines (39 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
import { model } from '@util/ftm';
import { Stack, TocNav, Callout } from 'astro-theme-docs/components';
import ExplorerLayout from '@layouts/ExplorerLayout.astro';
import SchemaPageHeader from '@components/page/SchemaPageHeader.astro';
import SchemaInheritance from '@components/explorer/SchemaInheritance.astro';
import SchemaSemantics from '@components/explorer/SchemaSemantics.astro';
import SchemaProperties from '@components/explorer/SchemaProperties.astro';
const { name } = Astro.params;
const { schema } = Astro.props;
export function getStaticPaths() {
return Object.entries(model.schemata).map(([name, schema]) => ({
params: { name },
props: { schema },
}));
}
const headings = [
{ text: 'Inheritance', slug: 'inheritance', depth: 2 },
{ text: 'Semantics', slug: 'semantics', depth: 2 },
{ text: 'Properties', slug: 'properties', depth: 2 },
];
---
<ExplorerLayout activeSchema={schema}>
<TocNav {headings} slot="toc" />
<Stack size="xl">
<SchemaPageHeader schema={schema} />
{
schema.deprecated && (
<Callout theme="danger">
This schema is deprecated and will be removed in a future version of
the FollowTheMoney model.
</Callout>
)
}
<SchemaInheritance id="inheritance" schema={schema} />
<SchemaSemantics id="semantics" schema={schema} />
<SchemaProperties id="properties" schema={schema} />
</Stack>
</ExplorerLayout>