Disable collapsing top-level headline.

This commit is contained in:
Sergio Martínez Portela 2022-10-20 23:44:35 +02:00
parent bcfd8b1d93
commit fcd9854a17

View File

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