Add interactive navigation controls
This commit is contained in:
parent
a98c87cdfc
commit
435cf4d18f
7 changed files with 125 additions and 45 deletions
|
|
@ -18,8 +18,9 @@
|
|||
{% endblock head %}
|
||||
</head>
|
||||
<body>
|
||||
<nav id="main-menu">
|
||||
<ul>
|
||||
<nav id="nav-main">
|
||||
<div {% if config.node_selector or config.navbar_search %}id="nav-main-spread"{% endif %}>
|
||||
<ul id="nav-anchors">
|
||||
<li><a href="/">Index</a></li>
|
||||
{% if config.about %}
|
||||
<li><a href="/about">About</a></li>
|
||||
|
|
@ -28,14 +29,31 @@
|
|||
<li><a href="/tree">Tree</a></li>
|
||||
{% endif %}
|
||||
{% if config.raw %}
|
||||
{% if config.raw_toml %}
|
||||
<li><a href="/graph/toml">TOML Graph</a></li>
|
||||
{% endif %}
|
||||
{% if config.raw_json %}
|
||||
<li><a href="/graph/json">JSON Graph</a></li>
|
||||
{% endif %}
|
||||
<li><a href="/data">Data</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if config.node_selector or config.navbar_search %}
|
||||
<div class="nav-inputs">
|
||||
{% if nodes and config.node_selector %}
|
||||
<form class="node-selector" method="get" action="/redirect">
|
||||
<select class="node-selector" name="node">
|
||||
<option value="">Nodes</option>
|
||||
{% for node in nodes | filter(attribute="hidden", value=false) %}
|
||||
<option value="{{node.id}}">{{node.title}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit">Go</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if config.navbar_search %}
|
||||
<form class="navbar-search" method="post">
|
||||
<input type="text" name="node" required/>
|
||||
<input type="submit" value="Find"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr>
|
||||
</nav>
|
||||
<main>
|
||||
|
|
|
|||
19
templates/data.html
Normal file
19
templates/data.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Data{% endblock title %}
|
||||
|
||||
{%- block body %}
|
||||
<h1>Data</h1>
|
||||
|
||||
<p>The raw data used to render this graph is available in the following formats:</p>
|
||||
|
||||
<ul>
|
||||
{% if config.raw_toml %}
|
||||
<li><a href="/graph/toml">TOML</a></li>
|
||||
{% endif %}
|
||||
{% if config.raw_json %}
|
||||
<li><a href="/graph/json">JSON</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{%- endblock body %}
|
||||
|
|
@ -4,7 +4,8 @@
|
|||
<h1>
|
||||
{{ title | default(value="Unknown error") }}
|
||||
</h1>
|
||||
{{ message | default(value="This error has not been described in detail.") | linebreaksbr | safe }}
|
||||
{{ message | default(value="Unexpected error") | linebreaksbr | safe }}
|
||||
{% if config.error_poem %}
|
||||
<hr>
|
||||
<div id="error-poem">
|
||||
<em>
|
||||
|
|
@ -14,5 +15,5 @@
|
|||
back onto the {% if config.tree %}<a href="/tree">tree</a>{% else %}tree{% endif %}
|
||||
</em>
|
||||
</div>
|
||||
</p>
|
||||
{% endif %}
|
||||
{%- endblock body %}
|
||||
|
|
|
|||
|
|
@ -13,11 +13,10 @@
|
|||
{% endif %}
|
||||
</i>
|
||||
{% if nodes %}
|
||||
{% if config.index_search %}
|
||||
{% if config.navbar_search %}
|
||||
<form method="post">
|
||||
<label for="node">Find by ID:</label>
|
||||
<input type="text" name="node" required/>
|
||||
<input type="submit" value="Submit"/>
|
||||
<input type="submit" value="Find"/>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if config.index_node_list or config.index_root_node %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue