39cff29f4b
This patch adds support for having the main branch be named different than "master". It will use "master" or "main" if available, and fall back to the first branch name if they're both missing.
88 lines
2.4 KiB
HTML
88 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>git » {{repo.name}}</title>
|
|
<link rel="stylesheet" type="text/css" href="../../static/git-arr.css"/>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
|
<meta name=viewport content="width=device-width, initial-scale=1">
|
|
<script async src="../../static/git-arr.js"></script>
|
|
</head>
|
|
|
|
<body class="summary">
|
|
<h1><a href="../../">git</a> » <a href="./">{{repo.name}}</a></h1>
|
|
|
|
<h2>{{repo.info.desc}}</h2>
|
|
|
|
|
|
% if repo.info.web_url or repo.info.git_url:
|
|
<table class="nice repo_info">
|
|
|
|
% if repo.info.web_url:
|
|
<tr>
|
|
<td class="category">website</td>
|
|
<td><a class="explicit" href="{{repo.info.web_url}}">
|
|
{{repo.info.web_url}}</a></td>
|
|
</tr>
|
|
% end
|
|
% if repo.info.git_url:
|
|
<tr>
|
|
<td class="category">git clone </td>
|
|
<td>{{! '<br/>'.join(repo.info.git_url.split())}}</td>
|
|
</tr>
|
|
% end
|
|
|
|
</table>
|
|
<hr/>
|
|
% end
|
|
|
|
% if repo.main_branch():
|
|
<div class="toggable-title" onclick="toggle('commits')">
|
|
<a href="b/{{repo.main_branch()}}/">commits ({{repo.main_branch()}})</a>
|
|
</div>
|
|
% kwargs = dict(repo = repo,
|
|
% start_ref = "refs/heads/" + repo.main_branch(),
|
|
% limit = repo.info.commits_in_summary,
|
|
% shorten = shorten, repo_root = ".", offset = 0)
|
|
% include commit-list **kwargs
|
|
<hr/>
|
|
<div class="toggable-title" onclick="toggle('ls')">
|
|
<a href="b/{{repo.main_branch()}}/t/">tree ({{repo.main_branch()}})</a>
|
|
</div>
|
|
% kwargs = dict(repo = repo, tree=repo.tree(repo.main_branch()),
|
|
% treeroot="b/" + repo.main_branch() + "/t",
|
|
% dirname=smstr.from_url(""))
|
|
% include tree-list **kwargs
|
|
<hr/>
|
|
% end
|
|
|
|
<div class="toggable-title" onclick="toggle('branches')">branches</div>
|
|
<table class="nice toggable" id="branches">
|
|
% for b in repo.branch_names():
|
|
<tr>
|
|
<td class="main"><a href="b/{{b}}/">{{b}}</a></td>
|
|
<td class="links">
|
|
<a class="explicit" href="b/{{b}}/">commits</a></td>
|
|
<td class="links">
|
|
<a class="explicit" href="b/{{b}}/t/">tree</a></td>
|
|
</tr>
|
|
%end
|
|
</table>
|
|
|
|
<hr/>
|
|
|
|
% tags = list(repo.tags())
|
|
% if tags:
|
|
<div class="toggable-title" onclick="toggle('tags')">tags</div>
|
|
<table class="nice toggable" id="tags">
|
|
% for name, obj_id in tags:
|
|
<tr>
|
|
<td><a href="c/{{obj_id}}/">{{name}}</a></td>
|
|
</tr>
|
|
%end
|
|
</table>
|
|
% end
|
|
|
|
</body>
|
|
</html>
|
|
|