more settings, headers+footers+error pages

This commit is contained in:
Trevor Bentley
2023-01-10 03:19:31 +01:00
parent 1951074e8f
commit 4e436a268d
13 changed files with 370 additions and 227 deletions
+1
View File
@@ -0,0 +1 @@
The page you are seeking does not exist.
+7 -11
View File
@@ -1,11 +1,7 @@
<html>
<body style="font-family: monospace;">
branch: {{branch.ref_name}}<br/>
hash: {{branch.full_hash}} ({{branch.short_hash}})<br/>
author: {{branch.author.name}}<br/>
committer: {{branch.committer.name}}<br/>
date: {{ts_to_date(ts=branch.ts_utc, tz=branch.ts_offset)}}<br/>
summary: {{branch.summary}}<br/>
<pre>{{branch.message}}</pre>
</body>
</html>
branch: {{branch.ref_name}}<br/>
hash: {{branch.full_hash}} ({{branch.short_hash}})<br/>
author: {{branch.author.name}}<br/>
committer: {{branch.committer.name}}<br/>
date: {{ts_to_date(ts=branch.ts_utc, tz=branch.ts_offset)}}<br/>
summary: {{branch.summary}}<br/>
<pre>{{branch.message}}</pre>
+25 -29
View File
@@ -1,31 +1,27 @@
<html>
<body style="font-family: monospace;">
<strong>
commit: {{commit.full_hash}}<br/>
author: {{commit.author.name}}<br/>
committer: {{commit.committer.name}}<br/>
parent: {% if commit.parents | length > 0 -%}<a href="{{commit.parents | first}}.html">{{commit.parents | first}}</a>{%-endif-%}<br/>
</strong>
<br/>
<pre style="margin: 0;">{{commit.message}}</pre>
{% for file in commit.diff.files -%}
<br/>
<strong>
diff --git a/{{file.basefile}} b/{{file.basefile}}<br/>
line changes: +{{file.additions}}/-{{file.deletions}}<br/>
index {{file.oldid | truncate(length=7,end="")}}..{{file.newid | truncate(length=7,end="")}}<br/>
--- {{file.oldfile}}<br/>
+++ {{file.newfile}}
</strong>
{% for hunk in file.hunks -%}
<pre><strong>{{hunk.context}}</strong>
{%- for line in hunk.lines -%}
{%- if line.kind in ["del","add"] -%}<span style="color: {%- if line.kind == "del" -%}bb0000{%- else -%}00aa00{% endif %}">{%- endif -%}
<strong>
commit: {{commit.full_hash}}<br/>
author: {{commit.author.name}}<br/>
committer: {{commit.committer.name}}<br/>
parent: {% if commit.parents | length > 0 -%}<a href="{{commit.parents | first}}.html">{{commit.parents | first}}</a>{%-endif-%}<br/>
</strong>
<br/>
<pre style="margin: 0;">{{commit.message}}</pre>
{% for file in commit.diff.files -%}
<br/>
<strong>
diff --git a/{{file.basefile}} b/{{file.basefile}}<br/>
line changes: +{{file.additions}}/-{{file.deletions}}<br/>
index {{file.oldid | truncate(length=7,end="")}}..{{file.newid | truncate(length=7,end="")}}<br/>
--- {{file.oldfile}}<br/>
+++ {{file.newfile}}
</strong>
{% for hunk in file.hunks -%}
<pre><strong>{{hunk.context}}</strong>
{%- for line in hunk.lines -%}
{%- if line.kind in ["del","add"] -%}<span style="color: {%- if line.kind == "del" -%}bb0000{%- else -%}00aa00{% endif %}">{%- endif -%}
{{line.prefix}}{{line.text}}
{%- if line.kind in ["del","add"] -%}</span>{%- endif -%}
{%- endfor -%}
</pre>
{% endfor -%}
{% endfor -%}
</body>
</html>
{%- endfor -%}
</pre>
{% endfor -%}
{% endfor -%}
+17 -21
View File
@@ -1,21 +1,17 @@
<html>
<body style="font-family: monospace;">
<table class="files">
<tr>
<th>File</th>
<th>ID</th>
<th>Type</th>
<th>Mode</th>
<th>Size</th>
</tr>
{% for file in files -%}
<tr class="file">
<td class="file-name"><a href="../{{file.kind}}/{{file.id}}.html">{{file.name}}</a></td>
<td class="file-id">{{file.id}}</td>
<td class="file-type">{{file.kind}} ({{file.is_binary}})</td>
<td class="file-mode">{{file.mode}}</td>
<td class="file-size">{{file.size}}</td>
</tr>
{% endfor -%}
</body>
</html>
<table class="files">
<tr>
<th>File</th>
<th>ID</th>
<th>Type</th>
<th>Mode</th>
<th>Size</th>
</tr>
{% for file in files -%}
<tr class="file">
<td class="file-name"><a href="../{{file.kind}}/{{file.id}}.html">{{file.name}}</a></td>
<td class="file-id">{{file.id}}</td>
<td class="file-type">{{file.kind}} ({{file.is_binary}})</td>
<td class="file-mode">{{file.mode}}</td>
<td class="file-size">{{file.size}}</td>
</tr>
{% endfor -%}
+3 -7
View File
@@ -1,7 +1,3 @@
<html>
<body style="font-family: monospace;">
{{file.path}} ({{file.name}}) [{{file.id}}]<br/>
-------
<pre style="margin: 0">{{file.contents}}</pre>
</body>
</html>
{{file.path}} ({{file.name}}) [{{file.id}}]<br/>
-------
<pre style="margin: 0">{{file.contents}}</pre>
+2
View File
@@ -0,0 +1,2 @@
</body>
</html>
+9
View File
@@ -0,0 +1,9 @@
<html>
<head>
<title>{{site_name}}</title>
</head>
<body style="font-family: monospace;">
Site: {{site_name}}<br/>
Generated: {{ts_to_git_timestamp(ts=site_generated_ts, tz=site_generated_offset)}}<br/>
Extra settings: {{extra.global_user_defined_vars}}<br/>
<hr/>
+3 -7
View File
@@ -1,7 +1,3 @@
<html>
<body style="font-family: monospace;">
{% for repo in repos -%}
<a href="{{repo.name}}/summary.html">{{ repo.name }}</a> ({{ts_to_date(ts=repo.history[0].ts_utc, tz=repo.history[0].ts_offset)}})<br/>
{% endfor -%}
</body>
</html>
{% for repo in repos | sort(attribute="name") -%}
<a href="{{repo.name}}/summary.html">{{ repo.name }}</a> ({{repo.metadata.website}}) [{{repo.metadata.attributes | get(key="some_extra_thing", default="")}}] ({{ts_to_date(ts=repo.history[0].ts_utc, tz=repo.history[0].ts_offset)}})<br/>
{% endfor -%}
+76 -80
View File
@@ -1,83 +1,79 @@
<html>
<body style="font-family: monospace;">
<table class="commits">
<tr>
<th>Commit ID</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
<th>Diff</th>
<th>Refs</th>
</tr>
{% for entry in history -%}
{% if loop.index0 < 250 -%}
<tr class="commit">
<td class="oid"><a href="commit/{{entry.full_hash}}.html">{{entry.short_hash}}</a></td>
<td class="commit-msg" style="font-family: sans-serif;">{{entry.summary}}</td>
<td class="author" style="font-family: sans-serif;">{{entry.author.name}}</td>
<td class="date">{{ts_to_date(ts=entry.ts_utc, tz=entry.ts_offset)}}</td>
<td class="diff">{{entry.stats.files}} (+{{entry.stats.additions}}/-{{entry.stats.deletions}})</td>
<td class="refs">{%- for ref in entry.alt_refs -%}{%- if loop.index0 > 0 -%},&nbsp; {%- endif -%}<span class="commit-ref">{{ref}}</span>{%- endfor -%}</td>
</tr>
{% endif -%}
{% endfor -%}
</table>
<table class="commits">
<tr>
<th>Commit ID</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
<th>Diff</th>
<th>Refs</th>
</tr>
{% for entry in history -%}
{% if loop.index0 < 250 -%}
<tr class="commit">
<td class="oid"><a href="commit/{{entry.full_hash}}.html">{{entry.short_hash}}</a></td>
<td class="commit-msg" style="font-family: sans-serif;">{{entry.summary}}</td>
<td class="author" style="font-family: sans-serif;">{{entry.author.name}}</td>
<td class="date">{{ts_to_date(ts=entry.ts_utc, tz=entry.ts_offset)}}</td>
<td class="diff">{{entry.stats.files}} (+{{entry.stats.additions}}/-{{entry.stats.deletions}})</td>
<td class="refs">{%- for ref in entry.alt_refs -%}{%- if loop.index0 > 0 -%},&nbsp; {%- endif -%}<span class="commit-ref">{{ref}}</span>{%- endfor -%}</td>
</tr>
{% endif -%}
{% endfor -%}
</table>
<table class="branches">
<tr>
<th>Branch</th>
<th>Commit ID</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
</tr>
{% for entry in branches -%}
<tr class="branch">
<td class="name"><a href="branch/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
<td class="oid">{{entry.short_hash}}</td>
<td class="commit-msg" style="font-family: sans-serif;">{{entry.summary}}</td>
<td class="author">{{entry.author.name}}</td>
<td class="date">{{ts_to_date(ts=entry.ts_utc, tz=entry.ts_offset)}}</td>
</tr>
{% endfor -%}
</table>
<table class="branches">
<tr>
<th>Branch</th>
<th>Commit ID</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
</tr>
{% for entry in branches -%}
<tr class="branch">
<td class="name"><a href="branch/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
<td class="oid">{{entry.short_hash}}</td>
<td class="commit-msg" style="font-family: sans-serif;">{{entry.summary}}</td>
<td class="author">{{entry.author.name}}</td>
<td class="date">{{ts_to_date(ts=entry.ts_utc, tz=entry.ts_offset)}}</td>
</tr>
{% endfor -%}
</table>
<table class="tags">
<tr>
<th>Tag</th>
<th>Commit ID</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
</tr>
{% for entry in tags -%}
<tr class="tag">
<td class="name"><a href="tag/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
<td class="oid">{{entry.short_hash}}</td>
<td class="commit-msg" style="font-family: sans-serif;">{{entry.summary}}</td>
<td class="author">{{entry.author.name}}</td>
<td class="date">{{ts_to_date(ts=entry.ts_utc, tz=entry.ts_offset)}}</td>
</tr>
{% endfor -%}
</table>
<table class="tags">
<tr>
<th>Tag</th>
<th>Commit ID</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
</tr>
{% for entry in tags -%}
<tr class="tag">
<td class="name"><a href="tag/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
<td class="oid">{{entry.short_hash}}</td>
<td class="commit-msg" style="font-family: sans-serif;">{{entry.summary}}</td>
<td class="author">{{entry.author.name}}</td>
<td class="date">{{ts_to_date(ts=entry.ts_utc, tz=entry.ts_offset)}}</td>
</tr>
{% endfor -%}
</table>
<table class="files">
<tr>
<th>File</th>
<th>ID</th>
<th>Type</th>
<th>Mode</th>
<th>Size</th>
</tr>
{% for file in root_files -%}
<tr class="file">
<td class="name"><a href="{{file.kind}}/{{file.id}}.html">{{file.name}}</a></td>
<td class="id">{{file.id}}</td>
<td class="type">{{file.kind}} ({{file.is_binary}})</td>
<td class="mode">{{file.mode}}</td>
<td class="size">{{file.size}}</td>
</tr>
{% endfor -%}
</table>
</body>
</html>
<table class="files">
<tr>
<th>File</th>
<th>ID</th>
<th>Type</th>
<th>Mode</th>
<th>Size</th>
</tr>
{% for file in root_files -%}
<tr class="file">
<td class="name"><a href="{{file.kind}}/{{file.id}}.html">{{file.name}}</a></td>
<td class="id">{{file.id}}</td>
<td class="type">{{file.kind}} ({{file.is_binary}})</td>
<td class="mode">{{file.mode}}</td>
<td class="size">{{file.size}}</td>
</tr>
{% endfor -%}
</table>
+11 -15
View File
@@ -1,15 +1,11 @@
<html>
<body style="font-family: monospace;">
branch: {{tag.ref_name}}<br/>
hash: {{tag.full_hash}} ({{tag.short_hash}})<br/>
author: {{tag.author.name}}<br/>
committer: {{tag.committer.name}}<br/>
date: {{ts_to_date(ts=tag.ts_utc, tz=tag.ts_offset)}}<br/>
summary: {{tag.summary}}<br/>
<pre>{{tag.message}}</pre>
<br/>
commit: {%- if commit -%}<a href="../commit/{{commit.full_hash}}.html">{{commit.full_hash}}</a>
<pre>{{commit.message}}</pre>
{%-else-%}{{tag.tagged_id}}{%-endif-%}<br/>
</body>
</html>
branch: {{tag.ref_name}}<br/>
hash: {{tag.full_hash}} ({{tag.short_hash}})<br/>
author: {{tag.author.name}}<br/>
committer: {{tag.committer.name}}<br/>
date: {{ts_to_date(ts=tag.ts_utc, tz=tag.ts_offset)}}<br/>
summary: {{tag.summary}}<br/>
<pre>{{tag.message}}</pre>
<br/>
commit: {%- if commit -%}<a href="../commit/{{commit.full_hash}}.html">{{commit.full_hash}}</a>
<pre>{{commit.message}}</pre>
{%-else-%}{{tag.tagged_id}}{%-endif-%}<br/>