d23464c0 Andy McCall 1 month ago ↶
1
{% extends "base.html" %}
2
{% import "repo_tabs.html" as m %}
3
{% block title %}{{ repo.owner }}/{{ repo.name }}{% endblock %}
4
{% block bodyattrs %} data-repo="{{ repo.url }}" data-ref="{{ repo.default_bookmark }}"{% endblock %}
5
{% block tabs %}{% call m::tabs(repo, "code") %}{% endblock %}
6
{% block mainclass %} class="wide"{% endblock %}
7
{% block content %}
8
{% if o.heads > 1 %}< div class = " strip warn " > {{ repo.default_bookmark }} has {{ o.heads }} heads; the tree below is their union. < a href = " {{ repo.url }}/bookmarks" > Bookmarks</ a > </ div > {% endif %}
9
{% if o.conflicted %}< div class = " strip bad " > This state carries conflicts. < a href = " {{ repo.url }}/conflicts" > See them</ a > </ div > {% endif %}
10
< div class = " side-layout rev " >
11
< div >
12
< div class = " bar " >
13
< span class = " ref px " > < a href = " {{ repo.url }}/bookmarks" > ◆ {{ repo.default_bookmark }}</ a > </ span >
14
< a class = " go small " href = " {{ repo.url }}/changes/{{ repo.default_bookmark }}" > {{ o.changes|plural("change", "changes") }}</ a >
14530604 Andy McCall 1 month ago ↶
15
{% if repo.can(crate::auth::Access::Write) %}< a class = " go small " href = " {{ repo.url }}/newfile/{{ repo.default_bookmark }}" > new file</ a > {% endif %}
3f4b0ea6 Andy McCall 1 month ago ↶
16
< form class = " find inline-find " method = " get" action = " {{ repo.url }}/search" > < input type = " search" name = " q" placeholder = " Search code…" > </ form >
d23464c0 Andy McCall 1 month ago ↶
17
{% if let Some(c) = o.latest %}< span class = " small mute " > latest < a href = " {{ repo.url }}/change/{{ c.hash }}" > {{ c.title }}</ a > · {{ c.when_ms|ago }}</ span > {% endif %}
18
</ div >
4edcf240 Andy McCall 1 month ago ↶
19
{% if let Some(q) = quickstart %}
20
{% include "quickstart.html" %}
21
{% else %}
d23464c0 Andy McCall 1 month ago ↶
22
{% include "tree_table.html" %}
4edcf240 Andy McCall 1 month ago ↶
23
{% endif %}
d23464c0 Andy McCall 1 month ago ↶
24
{% if let Some(html) = readme_html %}
25
< article class = " doc readme " > < h2 class = " small mute " > {{ o.tree.readme.as_ref().unwrap().path }}</ h2 > {{ html|safe }}</ article >
26
{% endif %}
27
</ div >
28
< aside class = " side " >
29
< h3 > About</ h3 >
30
{% if repo.description.is_empty() %}< p class = " mute small " > No description.</ p > {% else %}< p > {{ repo.description }}</ p > {% endif %}
18e381ea Andy McCall 1 month ago ↶
31
{% if shell.user.is_some() %}< form method = " post" action = " {{ repo.url }}/watch" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < button type = " submit" class = " small " > {% if watching %}UNWATCH{% else %}WATCH{% endif %}</ button > </ form > {% endif %}
d23464c0 Andy McCall 1 month ago ↶
32
< h3 > Clone</ h3 >
33
< div class = " clone " > < code > oxy clone {{ repo.clone_url }}</ code > < button class = " small " data-copy = " oxy clone {{ repo.clone_url }}" > copy</ button > </ div >
34
< h3 > Bookmarks</ h3 >
35
< ul class = " plain " > {% for b in o.bookmarks %}< li > < a href = " {{ repo.url }}/tree/{{ b.name }}" > {{ b.name }}</ a > {% if b.heads.len() > 1 %} < span class = " tag warn " > {{ b.heads.len() }} heads</ span > {% endif %}{% if b.conflicted %} < span class = " tag bad " > conflicts</ span > {% endif %}</ li > {% endfor %}</ ul >
3f4b0ea6 Andy McCall 1 month ago ↶
36
{% if let Some(rel) = latest_release %}< h3 > Latest release</ h3 > < p > < a href = " {{ repo.url }}/releases/tag/{{ rel.tag }}" > {{ rel.title }}</ a > < span class = " small mute " > {{ rel.created_ms|ago_i }}</ span > </ p > {% endif %}
d23464c0 Andy McCall 1 month ago ↶
37
< h3 > Tags</ h3 >
38
{% if o.tags.is_empty() %}< p class = " mute small " > None.</ p > {% else %}< ul class = " plain " > {% for t in o.tags %}< li > < a href = " {{ repo.url }}/tree/{{ t.name }}" > {{ t.name }}</ a > {% if t.signer.is_some() %} < span class = " sig sig-valid " title = " signed" > ✔</ span > {% endif %}</ li > {% endfor %}</ ul > {% endif %}
39
< h3 > Trust</ h3 >
40
{% match o.policy %}
41
{% when crate::repos::view::PolicyBadge::Active %}< p > < a href = " {{ repo.url }}/trust" > < span class = " sig sig-valid " > ✔</ span > policy in force</ a > </ p >
42
{% when crate::repos::view::PolicyBadge::Expired %}< p > < a href = " {{ repo.url }}/trust" > < span class = " sig sig-invalid " > ✘</ span > policy expired</ a > </ p >
43
{% when crate::repos::view::PolicyBadge::None %}< p > < a href = " {{ repo.url }}/trust" > < span class = " sig sig-unsigned " > ○</ span > no policy</ a > </ p >
44
{% endmatch %}
45
{% if let Some(l) = o.license %}< h3 > Licence</ h3 > < p > < a href = " {{ repo.url }}/file/{{ repo.default_bookmark }}/{{ l }}" > {{ l }}</ a > </ p > {% endif %}
46
</ aside >
47
</ div >
48
{% endblock %}