add a stylized default template

This commit is contained in:
Trevor Bentley
2023-01-13 17:25:28 +01:00
parent 0966bb534f
commit f142234be0
16 changed files with 664 additions and 122 deletions
+28 -15
View File
@@ -1,27 +1,40 @@
{% extends "base.html" %}
{% block tab_history_selected -%}selected{% endblock -%}
{% block content %}
<table class="commits">
<div class="full-header commit">History</div>
<table class="summary-table commits">
<colgroup>
<col class="oid" />
<col class="msg" />
<col class="author" />
<col class="date" />
<col class="diff nosmall" />
<col class="refs nosmall" />
</colgroup>
<tr>
<th>Commit ID</th>
<th>Commit</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
<th>Diff</th>
<th>Refs</th>
<th class="nosmall">Diff</th>
<th class="nosmall">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 -%}
<tr class="commit">
<td class="oid"><a href="commit/{{entry.full_hash}}.html">{{entry.short_hash}}</a></td>
<td class="msg sans">{{entry.summary}}</td>
<td class="author sans">{{entry.author.name}}</td>
<td class="date">{{ts_to_date(ts=entry.ts_utc, tz=entry.ts_offset)}}</td>
<td class="diff nosmall">{{entry.stats.files}} (+{{entry.stats.additions}}/-{{entry.stats.deletions}})</td>
<td class="refs nosmall">{%- for ref in entry.alt_refs -%}{%- if loop.index0 < 3 -%}<span class="ref">{{ref}}</span>{%- endif -%}{%- endfor -%}{% if entry.alt_refs | length > 3 -%}<span class="ref">...</span>{% endif -%}</td>
</tr>
{% endfor -%}
</table>
{% if page.prev_page %}<a href="{{ page.prev_page }}">PREV</a>{% endif %} &nbsp; &nbsp; &nbsp; <a href="{{ page.cur_page }}">CUR</a> &nbsp; &nbsp; &nbsp; {%if page.next_page %}<a href="{{ page.next_page }}">NEXT</a>{% endif %}<br>
<nav class="paginate" role="navigation">
<a class="paginate {% if not page.prev_page -%}disabled{% endif -%}" href="{{ page.prev_page }}">&lt; prev page</a>
<span class="paginate">[page {{ page.page_idx }} of {{ page.pages }}]</span>
<a class="paginate {% if not page.next_page -%}disabled{% endif -%}" href="{{ page.next_page }}">next page &gt;</a>
</nav>
{% endblock content %}