62 lines
1.9 KiB
HTML
62 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Index{% endblock title %}
|
|
|
|
{%- block body %}
|
|
<h1>{%if graph.meta.config.site_title %}{{ graph.meta.config.site_title }}{% else %}en{%endif%}</h1>
|
|
<p>
|
|
<i>
|
|
{% if graph.meta.config.site_description %}
|
|
{{graph.meta.config.site_description}}
|
|
{% else %}
|
|
A non-linear writing instrument.
|
|
{% endif %}
|
|
</i>
|
|
{% if graph.nodes %}
|
|
{% if graph.meta.config.navbar_search %}
|
|
<form method="post">
|
|
<input type="text" name="node" required/>
|
|
<input type="submit" value="Find"/>
|
|
</form>
|
|
{% endif %}
|
|
{% if graph.meta.config.index_node_list or graph.meta.config.index_root_node %}
|
|
<hr>
|
|
{% if graph.meta.config.index_node_list %}
|
|
<h2>Nodes</h2>
|
|
{% endif %}
|
|
<nav>
|
|
{% if graph.root_node and graph.meta.config.index_root_node %}
|
|
<p>
|
|
<strong>Root</strong>:
|
|
<a href="/node/{{graph.root_node}}">{{graph.root_node}}</a>
|
|
</p>
|
|
{% endif %}
|
|
{% if graph.nodes and graph.meta.config.index_node_list %}
|
|
<ul>
|
|
{% for _, node in graph.nodes %}
|
|
{% if loop.index > graph.meta.config.index_node_count %}
|
|
{% break %}
|
|
{% endif %}
|
|
{% if node.id != graph.root_node and not node.hidden and not node.redirect %}
|
|
<li><a href="/node/{{node.id}}">{{node.title}}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
{% if graph.meta.config.index_node_count < graph.nodes | length %}
|
|
<br/>
|
|
<em id="index-node-count">
|
|
Listing {{ graph.meta.config.index_node_count }} of {{ graph.nodes | length }} nodes.
|
|
{% if graph.meta.config.tree %}
|
|
<br/>
|
|
See the <a href="/tree">tree</a> for a full list.
|
|
{% endif %}
|
|
</em>
|
|
{% endif %}
|
|
{% endif %}
|
|
</nav>
|
|
{% endif %}
|
|
{% else %}
|
|
<hr>
|
|
{% include "empty.html" %}
|
|
{% endif %}
|
|
{%- endblock body %}
|