From a72b2912c2edd31f4e8f015e28938a1a039d345b Mon Sep 17 00:00:00 2001 From: William Petit Date: Tue, 4 Mar 2025 16:35:27 +0100 Subject: [PATCH] feat: initial commit --- README.md | 17 +++ document.yml | 4 + document/html-layout.gohtml | 101 ++++++++++++++ presentation.yml | 1 + presentation/html-layout.gohtml | 50 +++++++ resources/logo.svg | 229 ++++++++++++++++++++++++++++++++ 6 files changed, 402 insertions(+) create mode 100644 README.md create mode 100644 document.yml create mode 100644 document/html-layout.gohtml create mode 100644 presentation.yml create mode 100644 presentation/html-layout.gohtml create mode 100644 resources/logo.svg diff --git a/README.md b/README.md new file mode 100644 index 0000000..1ca63d3 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Amatl - Cadoles + +Fichiers de [layout `amatl`](https://github.com/Bornholm/amatl) pour la génération de documents à partir de source Markdown. + +## Usage + +### Générer un document + +``` +amatl render --config https://forge.cadoles.com/Cadoles/amatl-config/raw/branch/master/document.yml pdf -o mydocument.pdf ./mydocument.md +``` + +### Générer une présentation + +``` +amatl render --config https://forge.cadoles.com/Cadoles/amatl-config/raw/branch/master/mypresentation.yml pdf -o mypresentation.pdf ./mypresentation.md +``` diff --git a/document.yml b/document.yml new file mode 100644 index 0000000..b7b1ceb --- /dev/null +++ b/document.yml @@ -0,0 +1,4 @@ +html-layout: ./document/html-layout.gohtml +pdf-scale: 0.7 +pdf-margin-left: 1.0 +pdf-margin-right: 1.0 diff --git a/document/html-layout.gohtml b/document/html-layout.gohtml new file mode 100644 index 0000000..9dad030 --- /dev/null +++ b/document/html-layout.gohtml @@ -0,0 +1,101 @@ + + + {{ .Meta.title }} + + + + + + + + {{ .Body }} + + diff --git a/presentation.yml b/presentation.yml new file mode 100644 index 0000000..35c0f76 --- /dev/null +++ b/presentation.yml @@ -0,0 +1 @@ +html-layout: ./presentation/html-layout.gohtml diff --git a/presentation/html-layout.gohtml b/presentation/html-layout.gohtml new file mode 100644 index 0000000..3d76371 --- /dev/null +++ b/presentation/html-layout.gohtml @@ -0,0 +1,50 @@ + + + {{ .Vars.Title }} + + + + + + + {{range htmlSplit .Body "hr"}} +
+ {{ . }} +
+ {{ end }} + + diff --git a/resources/logo.svg b/resources/logo.svg new file mode 100644 index 0000000..b5cb5df --- /dev/null +++ b/resources/logo.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +