git-arr/views/summary.html
Alberto Bertogli e1349d418c views: In the summary, make the sections toggable
As an experiment, make the sections of the summary to be toggable. This
can help readability, although it's unclear if it's worth the additional
complexity and could be removed later.
2017-08-27 19:43:36 +01:00

86 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>git &raquo; {{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> &raquo; <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 "master" in repo.branch_names():
<div class="toggable-title" onclick="toggle('commits')">
<a href="b/master/">commits (master)</a>
</div>
% kwargs = dict(repo = repo, start_ref = "refs/heads/master",
% 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/master/t/">tree (master)</a>
</div>
% kwargs = dict(repo = repo, tree=repo.tree("master"),
% treeroot="b/master/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>