From b169ad17ba470c257d1b38ac5d4e6e76be1ed3ad Mon Sep 17 00:00:00 2001 From: Matiboux Date: Tue, 10 Mar 2026 02:30:49 +0100 Subject: [PATCH] Add Signatures component --- app/app/markdoc.config.mjs | 10 ++++- app/app/src/components/Signatures.astro | 56 +++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 app/app/src/components/Signatures.astro 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 : +
+ +