59 lines · 2006 bytes
1 {% extends "base.html" %}
2
3 {% block title %}{{ owner }}/{{ repo }} - {{ site_name }}{% endblock %}
4
5 {% block body %}
6 <div class="breadcrumb">
7 <a href="/{{ owner }}">{{ owner }}</a>
8 <span class="sep">/</span>
9 <a href="/{{ owner }}/{{ repo }}">{{ repo }}</a>
10 {% for seg in breadcrumbs %}
11 <span class="sep">/</span>
12 <a href="/{{ owner }}/{{ repo }}/tree/{{ branch }}/{{ seg.path }}">{{ seg.name }}</a>
13 {% endfor %}
14 </div>
15
16 {% if subpath.is_empty() %}
17 <div class="clone-box">
18 <span class="clone-label">clone</span>
19 {% if ssh_port == "22" %}
20 <code class="clone-url">git clone git@{{ site_name }}:{{ owner }}/{{ repo }}.git</code>
21 {% else %}
22 <code class="clone-url">git clone ssh://git@{{ site_name }}:{{ ssh_port }}/{{ owner }}/{{ repo }}.git</code>
23 {% endif %}
24 </div>
25 {% endif %}
26
27 <div class="tab-bar">
28 <a class="active" href="/{{ owner }}/{{ repo }}{% if !subpath.is_empty() %}/tree/{{ branch }}/{{ subpath }}{% endif %}">files</a>
29 <a href="/{{ owner }}/{{ repo }}/commits/{{ branch }}">commits</a>
30 </div>
31
32 <div class="section">
33 {% if entries.is_empty() %}
34 <p class="empty">empty repository</p>
35 {% else %}
36 <ul class="tree-list">
37 {% for entry in entries %}
38 <li>
39 <span class="tree-icon">{% if entry.kind == "tree" %}d{% else %}.{% endif %}</span>
40 <span class="tree-name">
41 {% if entry.kind == "tree" %}
42 <a href="/{{ owner }}/{{ repo }}/tree/{{ branch }}/{% if !subpath.is_empty() %}{{ subpath }}/{% endif %}{{ entry.name }}">{{ entry.name }}</a>
43 {% else %}
44 <a href="/{{ owner }}/{{ repo }}/blob/{{ branch }}/{% if !subpath.is_empty() %}{{ subpath }}/{% endif %}{{ entry.name }}">{{ entry.name }}</a>
45 {% endif %}
46 </span>
47 </li>
48 {% endfor %}
49 </ul>
50 {% endif %}
51 </div>
52
53 {% if let Some(readme_html) = readme %}
54 <div class="section">
55 <h2>readme</h2>
56 <div class="readme">{{ readme_html|safe }}</div>
57 </div>
58 {% endif %}
59 {% endblock %}