Add legal info

This commit is contained in:
Knoch 2022-03-28 11:04:06 +02:00
parent ccad5282c5
commit 34f46b2328
3 changed files with 7 additions and 0 deletions

View File

@ -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`.

View File

@ -9,4 +9,7 @@
<li>Close slide overview: <kbd>Esc</kbd></li>
<li>Open the help menu: <kbd>H</kbd></li>
</ul>
<p>
<a href="@imprint">Imprint</a> and <a href="@privacy-policy">privacy policy</a>
</p>
</div>

View File

@ -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)