c648cfb593
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>
58 lines
1.5 KiB
HTML
58 lines
1.5 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.unicode if dirname.unicode 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.unicode}}</a> /
|
|
% base += c + '/'
|
|
% end
|
|
</h3>
|
|
|
|
<table class="nice ls">
|
|
% key_func = lambda (t, n, s): (t != 'tree', n.raw)
|
|
% for type, name, size in sorted(tree.ls(dirname.raw), key = key_func):
|
|
<tr class="{{type}}">
|
|
% if type == "blob":
|
|
<td class="name"><a href="./f={{name.url}}.html">
|
|
{{!name.html}}</a></td>
|
|
<td class="size">{{size}}</td>
|
|
% elif type == "tree":
|
|
<td class="name">
|
|
<a class="explicit" href="./{{name.url}}/">
|
|
{{!name.html}}/</a></td>
|
|
% end
|
|
</tr>
|
|
% end
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|