Make anchors aware of the nodes they point to
This commit is contained in:
parent
eb96b456ef
commit
3fa399c317
31 changed files with 366 additions and 230 deletions
|
|
@ -15,28 +15,20 @@
|
|||
<ul>
|
||||
<li>
|
||||
<a href="/node/{{root_node.id}}">{{root_node.title}}</a>
|
||||
{% if root_node.connections or config.tree_node_text %}
|
||||
{% if root_node.connections or config.tree_node_summary %}
|
||||
<ul>
|
||||
{% if config.tree_node_text %}
|
||||
<li><strong>Text:</strong>
|
||||
<ul class="tree-node-text">
|
||||
<li class="tree-node-text">
|
||||
<details class="tree-node-text">
|
||||
<summary class="tree-node-text">
|
||||
{{root_node.text | truncate(length=120)}}
|
||||
</summary>
|
||||
{{root_node.text}}
|
||||
</details>
|
||||
{% if config.tree_node_summary %}
|
||||
<li class="tree-node-summary">
|
||||
{{ root_node.summary }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if root_node.connections %}
|
||||
{% if config.tree_node_text %}<li><strong>Connections</strong>
|
||||
{% if config.tree_node_summary %}<li><strong>Connections</strong>
|
||||
<ul>{% endif %}
|
||||
{% for connection in root_node.connections %}
|
||||
<li><a href="/node/{{connection.to}}">{{connection.to}}</a></li>
|
||||
{% endfor %}
|
||||
{% if config.tree_node_text %}</ul>
|
||||
{% if config.tree_node_summary %}</ul>
|
||||
</li>{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
@ -51,30 +43,22 @@
|
|||
{% for node in nodes | filter(attribute="hidden", value=false)%}
|
||||
<li>
|
||||
<a href="/node/{{node.id}}">{{node.title}}</a>
|
||||
{% if node.connections or config.tree_node_text %}
|
||||
{% if node.connections or config.tree_node_summary %}
|
||||
<ul>
|
||||
{% if config.tree_node_text %}
|
||||
<li><strong>Text:</strong>
|
||||
<ul class="tree-node-text">
|
||||
<li class="tree-node-text">
|
||||
<details class="tree-node-text">
|
||||
<summary class="tree-node-text">
|
||||
{{node.text | truncate(length=30)}}
|
||||
</summary>
|
||||
{{node.text}}
|
||||
</details>
|
||||
{% if config.tree_node_summary %}
|
||||
<li class="tree-node-summary">
|
||||
{{node.summary}}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if node.connections %}
|
||||
{% if config.tree_node_text %}<li><strong>Connections</strong>
|
||||
{% if config.tree_node_summary %}<li><strong>Connections</strong>
|
||||
<ul>{% endif %}
|
||||
{% for connection in node.connections %}
|
||||
{% if not connection.detached %}
|
||||
<li><a href="/node/{{connection.to}}">{{connection.to}}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if config.tree_node_text %}</ul>
|
||||
{% if config.tree_node_summary %}</ul>
|
||||
</li>{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue