112 lines
4.3 KiB
HTML
112 lines
4.3 KiB
HTML
{% if graph.meta.version %}
|
|
{% set en_version =
|
|
graph.meta.version.major
|
|
~ "." ~ graph.meta.version.minor
|
|
~ "." ~ graph.meta.version.patch
|
|
%}
|
|
{% if graph.meta.version.qualifier %}
|
|
{% set en_version = en_version ~ "-" ~ graph.meta.version.qualifier %}
|
|
{% endif -%}
|
|
{% else %}
|
|
{% set en_version = "?.?.?" %}
|
|
{% endif -%}
|
|
|
|
<!DOCTYPE html>
|
|
{% if graph.meta.config.content_language %}
|
|
<html lang="{{ graph.meta.config.content_language }}">
|
|
{% else %}
|
|
<html>
|
|
{% endif %}
|
|
<head>
|
|
{% if graph.meta.config.site_title %}
|
|
<title>{% block title %}{% endblock title %} • {{graph.meta.config.site_title}}</title>
|
|
{% else %}
|
|
<title>{% block title %}{% endblock title %} • en</title>
|
|
{% endif %}
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="generator" content="en v{{ en_version }}" />
|
|
<link href="/static/assets/fonts/fonts.css" rel="stylesheet">
|
|
<link href="/static/assets/style.css" rel="stylesheet">
|
|
<link rel="icon" type="image/svg+xml" href="/static/assets/favicon.svg">
|
|
{% block head %}
|
|
{% endblock head %}
|
|
</head>
|
|
<body>
|
|
<nav id="nav-main">
|
|
<div {% if graph.meta.config.node_selector or graph.meta.config.navbar_search %}id="nav-main-spread"{% endif %}>
|
|
<ul id="nav-anchors">
|
|
<li><a href="/">Index</a></li>
|
|
{% if graph.meta.config.about %}
|
|
<li><a href="/about">About</a></li>
|
|
{% endif %}
|
|
{% if graph.meta.config.tree %}
|
|
<li><a href="/tree">Tree</a></li>
|
|
{% endif %}
|
|
<li><a href="/data">Data</a></li>
|
|
</ul>
|
|
{% if graph.meta.config.node_selector or graph.meta.config.navbar_search %}
|
|
<div class="nav-inputs">
|
|
{% if graph.nodes and graph.meta.config.node_selector %}
|
|
<form class="node-selector" action="/redirect">
|
|
<select class="node-selector" name="node">
|
|
<option value="">Nodes</option>
|
|
{% for _, node in graph.nodes %}
|
|
{% if node.hidden or node.redirect %}{% continue %}{% endif %}
|
|
{% if not node.hidden and not node.redirect %}
|
|
<option value="{{node.id}}">{{node.title}}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
<button type="submit">Go</button>
|
|
</form>
|
|
{% endif %}
|
|
{% if graph.meta.config.navbar_search %}
|
|
<form class="navbar-search" action="/search">
|
|
<input type="text" name="node" required/>
|
|
<input type="submit" value="Find"/>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<hr>
|
|
</nav>
|
|
<main>
|
|
{% block body %}
|
|
{% endblock body %}
|
|
</main>
|
|
{% if graph.meta.config.footer or graph.meta.config.serve_fonts %}
|
|
<footer>
|
|
<hr>
|
|
<div>
|
|
{% if graph.meta.config.footer_text %}{{ graph.meta.config.footer_text | safe }}{% endif %}
|
|
{% if graph.meta.config.footer_text and (graph.meta.config.footer_credits or graph.meta.config.footer_date) %}
|
|
{% endif %}
|
|
{% if graph.meta.config.footer_credits %}
|
|
<cite>made with <a href="https://en.jutty.dev">en</a>, a non-linear writing instrument</cite>
|
|
{% endif %}
|
|
{% if graph.meta.config.footer_credits and graph.meta.config.footer_date %}
|
|
<br/>
|
|
{% endif %}
|
|
{% if graph.meta.config.footer_date %}
|
|
<span>
|
|
built
|
|
<time>
|
|
{{ now(utc=true) | date(format="%Y-%m-%d %H:%M") }} UTC
|
|
</time>
|
|
{% endif %}
|
|
{% if graph.meta.config.serve_fonts %}
|
|
•
|
|
<a href="/legal">legal</a>
|
|
{% endif %}
|
|
{% if graph.meta.config.footer_version %}
|
|
•
|
|
en v{{en_version}}
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
</footer>
|
|
{% endif %}
|
|
</body>
|
|
</html>
|