diff --git a/app/app/markdoc.config.mjs b/app/app/markdoc.config.mjs index e442726..eaad0e4 100644 --- a/app/app/markdoc.config.mjs +++ b/app/app/markdoc.config.mjs @@ -1,4 +1,4 @@ -import { defineMarkdocConfig, nodes } from '@astrojs/markdoc/config' +import { defineMarkdocConfig, component, nodes } from '@astrojs/markdoc/config' export default defineMarkdocConfig({ nodes: { @@ -7,4 +7,12 @@ export default defineMarkdocConfig({ render: null, }, }, + tags: { + signatures: { + render: component('./src/components/Signatures.astro'), + attributes: { + data: { type: Array }, + }, + }, + }, }) diff --git a/app/app/src/components/Signatures.astro b/app/app/src/components/Signatures.astro new file mode 100644 index 0000000..6e6d25b --- /dev/null +++ b/app/app/src/components/Signatures.astro @@ -0,0 +1,56 @@ +--- +interface DataItem +{ + title: string, + signature_top_margin?: number, + signature_placeholder?: string, +} + +export interface Props +{ + data: Array +} +--- + + + + + {Astro.props.data.map((item: DataItem) => ( + + ))} + + + + + {Astro.props.data.map((item: DataItem) => ( + + ))} + + + {Astro.props.data.map((item: DataItem) => ( + + ))} + + +
+ {item.title} +
+
+ + {item.signature_placeholder || 'Signature'} + +
+
+ Fait le : +
+ +