Update headline expansion based on document STARTUP config.
This commit is contained in:
parent
847e2cfd74
commit
0ebda876f7
@ -592,10 +592,14 @@ def render(headline, doc, graph, headlineLevel):
|
|||||||
tag_list.append(f'<span class="tag">{html.escape(tag)}</span>')
|
tag_list.append(f'<span class="tag">{html.escape(tag)}</span>')
|
||||||
tags = f'<span class="tags">{"".join(tag_list)}</span>'
|
tags = f'<span class="tags">{"".join(tag_list)}</span>'
|
||||||
|
|
||||||
# display_state = 'collapsed'
|
|
||||||
# if headlineLevel < MIN_HIDDEN_HEADLINE_LEVEL:
|
|
||||||
# display_state = 'expanded'
|
|
||||||
display_state = 'expanded'
|
display_state = 'expanded'
|
||||||
|
# Update display based on document STARTUP config
|
||||||
|
visual_level = doc.get_keywords('STARTUP', 'showall')
|
||||||
|
if visual_level.startswith('show') and visual_level.endswith('levels'):
|
||||||
|
visual_level_num = int(visual_level[len('show'):-len('levels')]) - 1
|
||||||
|
# Note that level is 0 indexed inside this loop
|
||||||
|
if headlineLevel >= visual_level_num:
|
||||||
|
display_state = 'collapsed'
|
||||||
|
|
||||||
title = render_inline(headline.title, render_tag, headline, graph)
|
title = render_inline(headline.title, render_tag, headline, graph)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user