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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{% extends "_base.html" %}
{% block title %}tree · {{ repo }}{% endblock %}
{% block nav %}
{% include "_nav.html" %}
{% endblock %}
{% block fullpage %}
{# ── Section nav + position token ───────────────────────────────── #}
<nav class="repo-section-nav">
{% include "_repo_section_nav.html" %}
<span class="repo-position">
<span class="bookmark-glyph">※</span>
<span class="bookmark-name">{{ bookmark }}</span>
<span class="repo-meta-sep">→</span>
<span class="change-id" title="{{ head.sha_short() }}">
<span class="change-head">{{ head.head() }}</span><span class="change-tail">{{ head.tail() }}</span>
</span>
</span>
</nav>
{# ── Two-column body ─────────────────────────────────────────────── #}
<div class="tree-body">
{# LEFT — tree table, no header, no per-row rules #}
<div class="tree-table-col">
{% for entry in entries %}
<div class="tree-row {% if entry.is_dir_like() %}tree-row--dir{% endif %}{% if entry.is_submodule() %} tree-row--sub{% endif %}{% if entry.is_up() %} tree-row--up{% endif %}">
<span class="tree-icon" aria-hidden="true">
{% if entry.is_dir() %}
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round">
<path d="M1 3.5h4l1 1.2h7v7.8h-12z"/>
</svg>
{% elif entry.is_submodule() %}
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-dasharray="1.6 1.4">
<path d="M1 3.5h4l1 1.2h7v7.8h-12z"/>
</svg>
{% elif entry.is_up() %}
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round">
<path d="M3 7l4-4 4 4M7 3v9"/>
</svg>
{% else %}
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round">
<path d="M3 1.5h5l3 3v8.5h-8z"/>
<path d="M8 1.5v3h3"/>
</svg>
{% endif %}
</span>
{% if entry.is_up() %}
<a class="tree-name tree-name--up" href="{{ self.parent_url() }}">..</a>
<span></span>
<span></span>
{% elif entry.is_dir_like() %}
<a class="tree-name tree-name--dir" href="{{ self.dir_entry_url(&entry.name) }}">{{ entry.name }}/</a>
<span class="tree-msg">{{ entry.last_msg }}</span>
<span class="tree-age">{{ entry.age }}</span>
{% else %}
<a class="tree-name" href="{{ self.dir_entry_url(&entry.name) }}">{{ entry.name }}</a>
<span class="tree-msg">{{ entry.last_msg }}</span>
<span class="tree-age">{{ entry.age }}</span>
{% endif %}
</div>
{% endfor %}
</div>
{# RIGHT — recent commit log for this ref #}
<aside class="tree-sidebar">
{% for change in recent_changes %}
<a class="tree-log-item" href="{{ change.commit_url }}">
<div class="tree-log-subject">{{ change.description }}</div>
<div class="tree-log-meta">
<span class="tree-log-sha">{{ change.id.head() }}{{ change.id.tail() }}</span>
<span class="tree-log-age">{{ change.age }}</span>
</div>
</a>
{% endfor %}
<a class="tree-log-more" href="/{{ repo }}/log">log →</a>
</aside>
</div>
{% endblock %}