Add version information to footer, /data and meta tags
Some checks are pending
/ verify (push) Waiting to run

This commit is contained in:
Juno Takano 2026-03-06 23:03:57 -03:00
commit 5377c67b89
4 changed files with 52 additions and 100 deletions

View file

@ -1,3 +1,11 @@
{% if graph.meta.version %}
{% set en_version = graph.meta.version.major
~ "." ~ graph.meta.version.minor
~ "." ~ graph.meta.version.patch %}
{% else %}
{% set en_version = "?.?.?" %}
{% endif -%}
<!DOCTYPE html>
{% if graph.meta.config.content_language %}
<html lang="{{ graph.meta.config.content_language }}">
@ -12,6 +20,7 @@
{% 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">
@ -76,13 +85,17 @@
<br/>
{% endif %}
{% if graph.meta.config.footer_date %}
<span>
built
<time>
{{ now(utc=true) | date(format="%Y-%m-%d %H:%M") }} UTC
</time>
&bullet;
<time>{{ now(timestamp=true) }} Unix Epoch</time>
{% endif %}
{% if graph.meta.config.footer_version %}
&bullet;
en v{{en_version}}
{% endif %}
</span>
</div>
</footer>
{% endif %}

View file

@ -4,8 +4,7 @@
{%- block body %}
<h1>Data</h1>
<h2>Metadata</h2>
<h2>Graph insights</h2>
<table>
<tr>
@ -30,9 +29,19 @@
</table>
</details>
{% if graph.meta.config.raw and (graph.meta.config.raw_toml or graph.meta.config.raw_json) %}
<h2>Raw formats</h2>
<p>Structured data representing this graph is available in the following formats:</p>
<h2>Metadata</h2>
<p>
This graph was rendered using en <code>{{ en_version }}</code>
(<a
href="https://codeberg.org/jutty/en/releases/tag/v{{ en_version }}"
>release notes</a>).
</p>
{% if graph.meta.config.raw
and (graph.meta.config.raw_toml
or graph.meta.config.raw_json)
%}
<p>Structured data for this graph is available in the following formats:</p>
<ul>
{% if graph.meta.config.raw_toml %}
@ -43,4 +52,5 @@
{% endif %}
</ul>
{% endif %}
{%- endblock body %}