Merge branch 'master' into release

This commit is contained in:
Kremitzl 2020-03-24 15:07:57 +01:00
commit ed12a7380d
4 changed files with 9 additions and 3 deletions

0
autocompile.sh Executable file → Normal file
View File

View File

@ -53,7 +53,10 @@ def compile_chapter(chapter, no_cache):
slides = [delimiter + slide for slide in chapter_input][1:]
chapter_content = ''
for slide in slides:
chapter_content += '<article>\n' + slides_helper.compile_slide(slide, root) + '\n</article>\n'
chapter_content +=\
'<article>\n' +\
slides_helper.compile_slide(slide, root) + '\n' +\
'</article>\n'
cache.store_cached_chapter(root, lang, chapter, chapter_content)
return chapter_content
return chapter_content

0
main.py Normal file → Executable file
View File

View File

@ -14,6 +14,9 @@ def compile_slide(slide, root_directory):
slide_metadata = get_slide_metadata(slide)
slide_data = get_slide_data(slide)
slide = get_slide_layout(slide_metadata['layout'])
if 'todo' in slide_data.keys():
# TODO: Move the css into a global onpoint.css file
slide = '<aside class="todo" style="position:absolute; display:block; background:rgba(255,0,0,.8); top:0; right:0; max-width:20%; margin:.5em; padding:.5em; border-radius:1em; font-family:sans-serif; font-size: .8em;">@todo</aside>' + slide
for key, value in slide_data.items():
placeholder = '@' + key
filler = convert_slide_content(value)
@ -65,4 +68,4 @@ def convert_slide_content(content):
content, 'html',
format='md',
extra_args=pdoc_args,
filters=filters)
filters=filters)