Echo Writes Code

tree_path.tera.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% extends "page.tera.html" %}

{% block title %}{{ tree.path }}{% endblock %}

{% block content %}
<article>
	<h1><a href="/repository/{{ tree.repository_name }}">{{ tree.repository_name }}</a> {% for c in tree.path_components %} / <a href="{{ c.link }}">{{ c.name }}</a>{% endfor %} / {{ tree.name }}</h1>
	<table class="tree_list">
		<thead>
			<tr class="flex_row">
				<th scope="col" class="flex_static">Type</th>
				<th scope="col" class="flex_1">Name</th>
				<th scope="col" class="flex_1">Hash</th>
			</tr>
		</thead>
		<tbody>
		{% for t in tree.trees %}
		<tr class="flex_row">
			<td class="flex_static"><span class="badge-tree">tree</span></td>
			<td class="flex_1"><a href="{{ t.path_link }}">{{ t.name }}</a></td>
			<td class="flex_1"><span class="small_screen"><a class="hash" href="{{ t.id_link }}">{{ t.short_id }}</a></span><span class="large_screen"><a class="hash" href="{{ t.id_link }}">{{ t.id }}</a></span></td>
		</tr>
		{% endfor %}
		{% for b in tree.blobs %}
		<tr class="flex_row">
			<td class="flex_static"><span class="badge-blob">blob</span></td>
			<td class="flex_1"><a href="{{ b.path_link }}">{{ b.name }}</a></td>
			<td class="flex_1"><span class="small_screen"><a class="hash" href="{{ b.id_link }}">{{ b.short_id }}</a></span><span class="large_screen"><a class="hash" href="{{ b.id_link }}">{{ b.id }}</a></span></td>
		</tr>
		{% endfor %}
		</tbody>
	</table>
</article>
{% endblock %}