From 34f46b2328daf35dbff58bddda42657b70a9167b Mon Sep 17 00:00:00 2001 From: Florian Knoch Date: Mon, 28 Mar 2022 11:04:06 +0200 Subject: [PATCH] Add legal info --- README.md | 2 ++ help-menu.html | 3 +++ helper.py | 2 ++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index dac96b2..aa8c92a 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ We recommend you to structure your project directory like this: │   ├── root.html │   └── titlepage.html ├── meta.yml + ├── legal.yml ├── onpoint │ ├── autocompile.sh │ ├── main.py @@ -42,6 +43,7 @@ We recommend you to structure your project directory like this: * `onpoint` is where this program lives. * In `layouts`, you can create custom templates for your slides. * `meta.yml` is there to add language-specific meta information (like title internationalization). +* `legal.yml` contains links to the privacy policy and imprint that ought to be rendered into the help menu. * `slides.yml` will contain a list of all chapters to be included. Their content is expected to live in files inside the `slides` folder. * You can store your usual web resources in the folders `styles` and `images`. diff --git a/help-menu.html b/help-menu.html index 4de22c7..3c3078c 100644 --- a/help-menu.html +++ b/help-menu.html @@ -9,4 +9,7 @@
  • Close slide overview: Esc
  • Open the help menu: H
  • +

    + Imprint and privacy policy +

    \ No newline at end of file diff --git a/helper.py b/helper.py index e8ad754..bf70e20 100644 --- a/helper.py +++ b/helper.py @@ -48,4 +48,6 @@ def add_lazyload(source, lazyload_images): def add_help_menu(source, root): help_menu_code = open(os.path.join( root, 'onpoint/help-menu.html'), "r").read() + help_menu_code = re.sub('@imprint', read_yaml(root, 'legal.yml')['imprint'], help_menu_code) + help_menu_code = re.sub('@privacy-policy', read_yaml(root, 'legal.yml')['privacy-policy'], help_menu_code) return re.sub('@help', help_menu_code, source)