en/templates/node.html

54 lines
1.7 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ node.title }}{% endblock title %}
{%- block body %}
<section>
<div class="header-row">
<h1 class="node-title">{{ node.title }}</h1>
<div class="labels">
{% if node.title != node.id %}<span class="label id-label">ID: {{ node.id }}</span>{% endif %}
{% if node.hidden %}<span class="label hidden-label">Hidden</span>{% endif %}
</div>
</div>
{{ node.text | safe }}
</section>
{% if connections or incoming %}
<aside>
<hr>
<h2>Connections</h2>
{% if connections %}
<ul>
{% for connection in connections | filter(attribute="detached", value=false) %}
<li>
<strong>{{node.id}}</strong>
&raquo;
<a href="/node/{{connection.to}}">{{connection.to}}</a>
</li>
{% endfor %}
{% for connection in connections | filter(attribute="detached", value=true) %}
<li>
<strong>{{node.id}}</strong>
&raquo;
<span class="detached-connection">{{connection.to}}</span>
</li>
{% endfor %}
</ul>
{% else %}
<em>No outgoing connections.</em>
{% endif %}
{% if incoming %}
<h3>Incoming connections</h3>
<ul>
{% for connection in incoming %}
<li>
<strong>{{connection.to}}</strong>
&laquo;
<a href="/node/{{connection.from}}">{{connection.from}}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</aside>
{% endif %}
{%- endblock body %}