aee18d0edd
With the Python 2 to 3 migration and the type checking, we can be fairly confident that smstr are always constructed from strings, not bytes. This allows the code to be simplified, as we no longer need to carry the dual raw/unicode representation.
44 lines
1.1 KiB
HTML
44 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
|
|
% if not dirname.raw:
|
|
% reltree = './'
|
|
% else:
|
|
% reltree = '../' * (len(dirname.split('/')) - 1)
|
|
% end
|
|
% relroot = reltree + '../' * (len(branch.split('/')) - 1)
|
|
|
|
<title>git » {{repo.name}} »
|
|
{{branch}} » {{dirname.raw if dirname.raw else '/'}}</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="tree">
|
|
<h1><a href="{{relroot}}../../../../../">git</a> »
|
|
<a href="{{relroot}}../../../">{{repo.name}}</a> »
|
|
<a href="{{reltree}}../">{{branch}}</a> »
|
|
<a href="{{reltree}}">tree</a>
|
|
</h1>
|
|
|
|
<h3>
|
|
<a href="{{reltree}}">[{{branch}}]</a> /
|
|
% base = smstr(reltree)
|
|
% for c in dirname.split('/'):
|
|
% if not c.raw:
|
|
% continue
|
|
% end
|
|
<a href="{{base.url}}{{c.url}}/">{{c.raw}}</a> /
|
|
% base += c + '/'
|
|
% end
|
|
</h3>
|
|
|
|
% kwargs = dict(repo = repo, tree=tree, treeroot=".")
|
|
% include tree-list **kwargs
|
|
|
|
</body>
|
|
</html>
|