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 content %}
7
< div class = " side-layout rev " >
8
< div >
83d5052b Andy McCall 1 month ago ↶
9
{% 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 %}
10
{% if o.conflicted %}< div class = " strip bad " > This state carries conflicts. < a href = " {{ repo.url }}/conflicts" > See them</ a > </ div > {% endif %}
d23464c0 Andy McCall 1 month ago ↶
11
< div class = " bar " >
12
< span class = " ref px " > < a href = " {{ repo.url }}/bookmarks" > ◆ {{ repo.default_bookmark }}</ a > </ span >
13
< a class = " go small " href = " {{ repo.url }}/changes/{{ repo.default_bookmark }}" > {{ o.changes|plural("change", "changes") }}</ a >
14530604 Andy McCall 1 month ago ↶
14
{% 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 ↶
15
< form class = " find inline-find " method = " get" action = " {{ repo.url }}/search" > < input type = " search" name = " q" placeholder = " Search code…" > </ form >
83d5052b Andy McCall 1 month ago ↶
16
< details class = " clone-pop " >
67b24adb Andy McCall 1 month ago ↶
17
< summary class = " go small " aria-haspopup = " true" > < span aria-hidden = " true" > & lt; & gt; </ span > Code</ summary >
18
< div class = " clone-panel " role = " group" aria-label = " Clone or download this repository" >
83d5052b Andy McCall 1 month ago ↶
19
< label for = " clone-cmd" class = " small mute " > Clone with oxy</ label >
20
< div class = " clone " > < input id = " clone-cmd " type = " text" readonly value = " oxy clone {{ repo.clone_url }}" onfocus = " this . select ( ) " onclick = " this . select ( ) " > < button type = " button" class = " small " data-copy = " oxy clone {{ repo.clone_url }}" > copy</ button > </ div >
21
< p class = " small mute " > The URL alone: < code > {{ repo.clone_url }}</ code > </ p >
67b24adb Andy McCall 1 month ago ↶
22
{% if quickstart.is_none() %}
23
< a class = " download " href = " {{ repo.url }}/archive?ref={{ repo.default_bookmark|urlencode }}& amp; format=zip" download > < span aria-hidden = " true" > ⤓</ span > Download ZIP</ a >
24
< p class = " small mute " > {{ repo.default_bookmark }} as it is now, without its history. Also as < a href = " {{ repo.url }}/archive?ref={{ repo.default_bookmark|urlencode }}& amp; format=tar.zst" download > .tar.zst</ a > .</ p >
25
{% endif %}
83d5052b Andy McCall 1 month ago ↶
26
</ div >
27
</ details >
d23464c0 Andy McCall 1 month ago ↶
28
</ div >
64caed18 Andy McCall 1 month ago ↶
29
{% if let Some(c) = o.latest %}< p class = " small mute latest-line " > latest < a href = " {{ repo.url }}/change/{{ c.hash }}" > {{ c.title }}</ a > · {{ c.when_ms|ago }}</ p > {% endif %}
4edcf240 Andy McCall 1 month ago ↶
30
{% if let Some(q) = quickstart %}
31
{% include "quickstart.html" %}
32
{% else %}
d23464c0 Andy McCall 1 month ago ↶
33
{% include "tree_table.html" %}
4edcf240 Andy McCall 1 month ago ↶
34
{% endif %}
d23464c0 Andy McCall 1 month ago ↶
35
{% if let Some(html) = readme_html %}
36
< article class = " doc readme " > < h2 class = " small mute " > {{ o.tree.readme.as_ref().unwrap().path }}</ h2 > {{ html|safe }}</ article >
37
{% endif %}
38
</ div >
39
< aside class = " side " >
40
< h3 > About</ h3 >
41
{% if repo.description.is_empty() %}< p class = " mute small " > No description.</ p > {% else %}< p > {{ repo.description }}</ p > {% endif %}
07b1a5bb Andy McCall 1 month ago ↶
42
{% if let Some(up) = fork.upstream %}< p class = " small " > forked from < a href = " /{{ up.owner }}/{{ up.name }}" > {{ up.owner }}/{{ up.name }}</ a > </ p > {% endif %}
43
< div class = " bar " >
1553bfc9 Andy McCall 1 month ago ↶
44
{% if !topics.is_empty() %}< p class = " topics " > {% for t in topics %}< a class = " topic " href = " /explore?topic={{ t }}" > {{ t }}</ a > {% endfor %}</ p > {% endif %}
45
< p class = " small mute counts-line " > < span title = " stars" > ★ {{ stars }}</ span > · < span title = " watchers" > 👁 {{ watchers }}</ span > </ p >
46
{% if shell.user.is_some() %}< form class = " inline " method = " post" action = " {{ repo.url }}/star" > < input type = " hidden" name = " _csrf" value = " {{ shell.csrf }}" > < button type = " submit" class = " small " > {% if starred %}★ UNSTAR{% else %}☆ STAR{% endif %}</ button > </ form >
47
< form class = " inline " 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 >
07b1a5bb Andy McCall 1 month ago ↶
48
< a class = " go small " href = " {{ repo.url }}/fork" > fork</ a > {% endif %}
49
{% if fork.forks > 0 %}< a class = " small " href = " {{ repo.url }}/forks" > {{ fork.forks|plural("fork", "forks") }}</ a > {% endif %}
50
</ div >
51
{% if let Some(up) = fork.upstream %}{% if shell.user.is_some() %}< a class = " go small " href = " /{{ up.owner }}/{{ up.name }}/proposals/new?source={{ repo.owner }}/{{ repo.name }}:{{ repo.default_bookmark }}" > propose to {{ up.owner }}/{{ up.name }}</ a > {% endif %}{% endif %}
83d5052b Andy McCall 1 month ago ↶
52
{% if !o.contributors.is_empty() %}
53
< h3 > Contributors < span class = " count-chip " > {{ o.contributors.len() }}</ span > </ h3 >
54
< ul class = " plain contributors " > {% for c in o.contributors.iter().take(10) %}
206c1fc1 Andy McCall 1 month ago ↶
55
< li > {% if let Some(u) = c.account %}< a href = " /{{ u }}" > < img class = " avatar sm " src = " /avatar/{{ u }}" alt = " " width = " 20" height = " 20" > {{ u }}</ a > < span class = " mute small " > {{ c.name }}</ span > {% else %}< span class = " avatar-none " aria-hidden = " true" > ○</ span > {{ c.name }}{% endif %} < span class = " mute small " title = " changes" > · {{ c.changes }}</ span > {% if !c.via.is_empty() %}< ul class = " plain via-list " > {% for v in c.via %}< li > < span class = " mute " aria-hidden = " true" > ↳</ span > < span class = " mute small " > via</ span > < img class = " avatar sm " src = " /avatar/agent/{{ v.0 }}" alt = " " width = " 16" height = " 16" > {{ v.0 }} < span class = " mute small " title = " changes signed by this agent for them" > · {{ v.1 }}</ span > </ li > {% endfor %}</ ul > {% endif %}</ li >
83d5052b Andy McCall 1 month ago ↶
56
{% endfor %}</ ul >
57
{% if o.contributors.len() > 10 %}< p class = " small mute " > and {{ o.contributors.len() - 10 }} more</ p > {% endif %}
58
{% endif %}
59
{% if !o.languages.is_empty() %}
60
< h3 > Languages</ h3 >
61
< div class = " lang-bar " role = " img" aria-label = " {% for l in o.languages %}{{ l.name }} {{ " {:.1}"|format(l.percent) }}%{% if !loop.last %}, {% endif %}{% endfor %}"> {% for l in o.languages %}< span style = " width : {{ " {:.3}"|format(l.percent) }}%; background: {{ l.colour }}" title = " {{ l.name }} {{ " {:.1}"|format(l.percent) }}%"> </ span > {% endfor %}</ div >
62
< ul class = " plain langs " > {% for l in o.languages %}< li > < span class = " lang-dot " style = " background : {{ l.colour }}" aria-hidden = " true" > </ span > < strong > {{ l.name }}</ strong > < span class = " mute " > {{ "{:.1}"|format(l.percent) }}%</ span > </ li > {% endfor %}</ ul >
63
{% endif %}
d23464c0 Andy McCall 1 month ago ↶
64
< h3 > Bookmarks</ h3 >
65
< 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 ↶
66
{% 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 ↶
67
< h3 > Tags</ h3 >
68
{% 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 %}
69
< h3 > Trust</ h3 >
70
{% match o.policy %}
71
{% when crate::repos::view::PolicyBadge::Active %}< p > < a href = " {{ repo.url }}/trust" > < span class = " sig sig-valid " > ✔</ span > policy in force</ a > </ p >
72
{% when crate::repos::view::PolicyBadge::Expired %}< p > < a href = " {{ repo.url }}/trust" > < span class = " sig sig-invalid " > ✘</ span > policy expired</ a > </ p >
73
{% when crate::repos::view::PolicyBadge::None %}< p > < a href = " {{ repo.url }}/trust" > < span class = " sig sig-unsigned " > ○</ span > no policy</ a > </ p >
74
{% endmatch %}
75
{% if let Some(l) = o.license %}< h3 > Licence</ h3 > < p > < a href = " {{ repo.url }}/file/{{ repo.default_bookmark }}/{{ l }}" > {{ l }}</ a > </ p > {% endif %}
76
</ aside >
77
</ div >
78
{% endblock %}