Layout-independent todo annotations.
This commit is contained in:
parent
6956872a80
commit
c9aefdee8b
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -14,3 +14,17 @@ Wirklich auf den Punkt!
|
||||
* ++ Stichpunkt 3
|
||||
* ++ Stichpunkt 4
|
||||
|
||||
|
||||
@slide
|
||||
|
||||
@title
|
||||
Folie mit Todo
|
||||
|
||||
@todo
|
||||
Das ist das Todo.
|
||||
|
||||
* Stichpunkt
|
||||
|
||||
@content
|
||||
Diese Folie ist noch nicht fertig.
|
||||
|
||||
|
||||
@ -13,3 +13,18 @@ OnPoint for real!
|
||||
* bullet point 2
|
||||
* bullet point 3
|
||||
* bullet point 4
|
||||
|
||||
|
||||
@slide
|
||||
|
||||
@title
|
||||
Slide with todo
|
||||
|
||||
@todo
|
||||
This is the todo.
|
||||
|
||||
* bullet point
|
||||
|
||||
@content
|
||||
This slide is not done yet.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user