Disable collapsing top-level headline.
This commit is contained in:
parent
bcfd8b1d93
commit
fcd9854a17
@ -445,7 +445,7 @@ def render_as_document(headline, doc, headlineLevel, title):
|
|||||||
<a href='./{topLevelHeadline.id}.node.html#{headline.id}'>Sending you to the main note... [{org_rw.token_list_to_plaintext(topLevelHeadline.title.contents)}]</a>
|
<a href='./{topLevelHeadline.id}.node.html#{headline.id}'>Sending you to the main note... [{org_rw.token_list_to_plaintext(topLevelHeadline.title.contents)}]</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
else:
|
else:
|
||||||
return as_document(render(headline, doc, headlineLevel), title)
|
return as_document(render(headline, doc, headlineLevel), title)
|
||||||
|
|
||||||
@ -482,13 +482,16 @@ def render(headline, doc, headlineLevel):
|
|||||||
# display_state = 'expanded'
|
# display_state = 'expanded'
|
||||||
display_state = 'expanded'
|
display_state = 'expanded'
|
||||||
|
|
||||||
|
title = render_inline(headline.title, render_tag)
|
||||||
|
|
||||||
|
if headlineLevel > 0:
|
||||||
|
title = f"<a href=\"javascript:toggle_expand('{html.escape(headline.id)}')\">{title}</a>"
|
||||||
|
|
||||||
return f"""
|
return f"""
|
||||||
<div id="{html.escape(headline.id)}" class="node {todo_state} {display_state}">
|
<div id="{html.escape(headline.id)}" class="node {todo_state} {display_state}">
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
{state}
|
{state}
|
||||||
<a href=\"javascript:toggle_expand('{html.escape(headline.id)}')\">
|
{title}
|
||||||
{render_inline(headline.title, render_tag)}
|
|
||||||
</a>
|
|
||||||
{tags}
|
{tags}
|
||||||
</h1>
|
</h1>
|
||||||
<div class='contents'>
|
<div class='contents'>
|
||||||
|
Loading…
Reference in New Issue
Block a user