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
{# Expects: owner, repo, access, tab, clone_http, clone_ssh, archive_ref #}
<nav class="kg-tabs" aria-label="Repository">
<div class="kg-tabs__links">
<a href="/{{ owner.username }}/{{ repo.name }}"{% if tab == "code" %} aria-current="page"{% endif %}>
<span class="kg-icon" style="--icon:url('/static/icons/code.svg')"></span> code
</a>
{% if repo.issues_enabled %}
<a href="/{{ owner.username }}/{{ repo.name }}/issues"{% if tab == "issues" %} aria-current="page"{% endif %}>
<span class="kg-icon" style="--icon:url('/static/icons/circle.svg')"></span> issues
</a>
{% endif %}
{% if repo.pulls_enabled %}
<a href="/{{ owner.username }}/{{ repo.name }}/pulls"{% if tab == "pulls" %} aria-current="page"{% endif %}>
<span class="kg-icon" style="--icon:url('/static/icons/git-pull-request.svg')"></span> pulls
</a>
{% endif %}
{% if repo.releases_enabled %}
<a href="/{{ owner.username }}/{{ repo.name }}/releases"{% if tab == "releases" %} aria-current="page"{% endif %}>
<span class="kg-icon" style="--icon:url('/static/icons/package.svg')"></span> releases
</a>
{% endif %}
<a href="/{{ owner.username }}/{{ repo.name }}/commits"{% if tab == "commits" %} aria-current="page"{% endif %}>
<span class="kg-icon" style="--icon:url('/static/icons/history.svg')"></span> commits
</a>
<a href="/{{ owner.username }}/{{ repo.name }}/branches"{% if tab == "branches" %} aria-current="page"{% endif %}>
<span class="kg-icon" style="--icon:url('/static/icons/git-branch.svg')"></span> branches
</a>
{% if access.can_admin() %}
<a href="/{{ owner.username }}/{{ repo.name }}/settings"{% if tab == "settings" %} aria-current="page"{% endif %}>
<span class="kg-icon" style="--icon:url('/static/icons/settings.svg')"></span> settings
</a>
{% endif %}
</div>
<details class="kg-dropdown">
<summary class="kg-btn kg-btn--ghost">
<span class="kg-icon" style="--icon:url('/static/icons/download.svg')"></span>
clone
<span class="kg-icon" style="--icon:url('/static/icons/chevron-down.svg')"></span>
</summary>
<div class="kg-dropdown__panel">
<a class="kg-dropdown__item" href="/{{ owner.username }}/{{ repo.name }}/archive.zip?ref={{ archive_ref }}">
<span class="kg-icon" style="--icon:url('/static/icons/download.svg')"></span>
Download ZIP
</a>
<div class="kg-clone-row">
<label for="clone-http">HTTP</label>
<input id="clone-http" type="text" readonly value="{{ clone_http }}" />
<button type="button" class="kg-btn kg-btn--ghost" data-copy="#clone-http" title="Copy">
<span class="kg-icon" style="--icon:url('/static/icons/copy.svg')"></span>
</button>
</div>
<div class="kg-clone-row">
<label for="clone-ssh">SSH</label>
<input id="clone-ssh" type="text" readonly value="{{ clone_ssh }}" />
<button type="button" class="kg-btn kg-btn--ghost" data-copy="#clone-ssh" title="Copy">
<span class="kg-icon" style="--icon:url('/static/icons/copy.svg')"></span>
</button>
</div>
</div>
</details>
</nav>