Files
itsy-gitsy/templates/default_dark/summary.html
T

152 lines
5.0 KiB
HTML

{% extends "base.html" %}
{% block tab_summary_selected -%}selected{% endblock -%}
{% block content %}
<table class="links">
<colgroup>
<col class="field" />
<col class="value" />
</colgroup>
<tr class="readme">
<td class="field website">Documentation:</td>
{% if readme and readme.id in file_ids -%}
<td class="value website"><a href="{{repo_url | safe}}/{{readme.kind}}/{{readme.id}}.html">{{readme.name | default(value="[none]")}}</a></td>
{% else -%}
<td class="value website">{{readme.name | default(value="[none]")}}</td>
{% endif -%}
</tr>
<tr class="website">
<td class="field website">Website:</td>
{% if metadata.website -%}
<td class="value website"><a href="{{ metadata.website }}">{{metadata.website | default(value="[none]")}}</a></td>
{% else -%}
<td class="value website">{{metadata.website | default(value="[none]")}}</td>
{% endif-%}
</tr>
<tr class="clone">
<td class="field clone">Clone URL:</td>
<td class="value clone">{{metadata.clone | default(value="[none]")}}</td>
</tr>
</table>
<div class="summary-header commit">Recent 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</th>
<th>Message</th>
<th>Author</th>
<th>Date</th>
<th class="nosmall">Diff</th>
<th class="nosmall">Refs</th>
</tr>
{% for entry in history -%}
{% if loop.index0 < 10 -%}
<tr class="commit">
<td class="oid">{% if entry.full_hash in commit_ids -%}<a href="commit/{{entry.full_hash}}.html">{{entry.short_hash}}</a>{% else -%}{{entry.short_hash}}{% endif -%}</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">{% if entry.stats -%}{{entry.stats.files}} (+{{entry.stats.additions}}/-{{entry.stats.deletions}}){% endif -%}</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>
{% endif -%}
{% endfor -%}
</table>
<div class="summary-header branches">Recent branches</div>
<table class="summary-table branches">
<colgroup>
<col class="branch" />
<col class="oid" />
<col class="msg nosmall" />
<col class="author" />
<col class="date" />
</colgroup>
<tr>
<th>Branch</th>
<th>Commit</th>
<th class="nosmall">Message</th>
<th>Author</th>
<th>Date</th>
</tr>
{% for entry in branches | sort(attribute="ts_utc") | reverse -%}
{% if loop.index0 < 10 -%}
<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="msg sans nosmall">{{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>
</tr>
{% endif -%}
{% endfor -%}
</table>
<div class="summary-header tags">Recent tags</div>
<table class="summary-table tags">
<colgroup>
<col class="tag" />
<col class="oid" />
<col class="msg nosmall" />
<col class="author" />
<col class="date" />
</colgroup>
<tr>
<th>Tag</th>
<th>Commit</th>
<th class="nosmall">Message</th>
<th>Author</th>
<th>Date</th>
</tr>
{% for entry in tags | sort(attribute="ts_utc") | reverse -%}
{% if loop.index0 < 10 -%}
<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="msg sans nosmall">{{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>
</tr>
{% endif -%}
{% endfor -%}
</table>
<div class="summary-header tags">File tree</div>
<table class="summary-table files">
<colgroup>
<col class="file" />
<col class="type nosmall" />
<col class="mode nosmall" />
<col class="size nosmall" />
</colgroup>
<tr>
<th>File</th>
<th class="nosmall">Type</th>
<th class="nosmall">Mode</th>
<th class="nosmall">Size</th>
</tr>
{% for file in root_files -%}
<tr class="file">
{% if file.kind == "dir" -%}
{% set file_name = file.name ~ "/" -%}
{% else -%}
{% set file_name = file.name -%}
{% endif -%}
<td class="name">{% if file.id in file_ids -%}<a href="{{repo_url | safe}}/{{file.kind}}/{{file.id}}.html">{{file_name}}</a>{% else -%}{{file_name}}{% endif -%}</td>
<td class="type nosmall">{{file.kind}}</td>
<td class="mode nosmall">{{file.mode | mask(mask="0xfff") | oct}}</td>
<td class="size nosmall">{{file.size}}</td>
</tr>
{% endfor -%}
</table>
{% endblock content %}