render: updates for integration with frontends
This commit is contained in:
44
assets/templates/repo/repo.html
Normal file
44
assets/templates/repo/repo.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block page %}code{% endblock page %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<a href="/~{{ owner }}">{{ owner }}</a>/<a href="/~{{ owner }}/{{ repo }}">{{ repo }}</a>/<a href="/">{{ branch }}</a>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<div id=contentWrap>
|
||||
<aside>
|
||||
<p class=sidebarLabel>
|
||||
{% for part in directory | split(pat="/") -%}
|
||||
<a href="/">{{ part }}/</a>
|
||||
{%- endfor %}
|
||||
</p>
|
||||
<table class=files border=1>
|
||||
<tbody>
|
||||
{% block entries_list %}
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td><a class={{ entry.class }} href="./{{ entry.path }}">{{ entry.path }}</a></td>
|
||||
<td><a class=commit href="./?commit={{ entry.last_commit }}">
|
||||
{{ entry.last_commit_message }}
|
||||
</a></td>
|
||||
<td><time datetime="{{ entry.last_commit_time }}">
|
||||
{{ entry.last_commit_time | date(format="%Y-%m-%d %H:%M")}}
|
||||
</time></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock entries %}
|
||||
</tbody>
|
||||
</table>
|
||||
</aside>
|
||||
{% block readme %}
|
||||
<main>
|
||||
<p class=previewLabel>README.md</p>
|
||||
<article class=preview>
|
||||
{{ readme_content }}
|
||||
</article>
|
||||
</main>
|
||||
{% endblock readme %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user