git-arr/views/branch.html
Alberto Bertogli c648cfb593 views: Improve display on mobile browsers
This patch moves the pages to HTML5, and adds some simple meta tags and CSS media
constraints so things render better on mobile browsers, while leaving the
desktop unaffected.

It's still not ideal, though.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2015-11-18 00:29:34 +00:00

51 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
% relroot = '../' * (len(branch.split('/')) - 1)
<title>git &raquo; {{repo.name}} &raquo; {{branch}}</title>
<link rel="stylesheet" type="text/css" href="{{relroot}}../../../../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">
</head>
<body class="branch">
<h1><a href="{{relroot}}../../../../">git</a> &raquo;
<a href="{{relroot}}../../">{{repo.name}}</a> &raquo;
<a href="./">{{branch}}</a>
</h1>
<p>
<a class="explicit" href="t/">Browse current source tree</a>
</p>
% commits = repo.commits("refs/heads/" + branch,
% limit = repo.info.commits_per_page + 1,
% offset = repo.info.commits_per_page * offset)
% commits = list(commits)
% if len(commits) == 0:
% abort(404, "No more commits")
% end
% more = len(commits) > repo.info.commits_per_page
% if more:
% commits = commits[:-1]
% end
% more = more and offset + 1 < repo.info.max_pages
% include paginate more = more, offset = offset
% kwargs = dict(repo=repo, commits=commits,
% shorten=shorten, repo_root=relroot + "../..")
% include commit-list **kwargs
<p/>
% include paginate more = more, offset = offset
</body>
</html>