git-arr/views/blob.html
Vanya Sergeev 48a00cb460 Fix one-line 'if' termination in tree, blob templates
The missing '% end' template keyword to these one-line if statements was
causing bottle 0.12.7 to incorrectly indent the following line, leading to an
IndentationError at runtime when the blob and tree templates are compiled.

Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
2014-06-30 08:45:36 +01:00

57 lines
1.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
% if not dirname.raw:
% relroot = './'
% else:
% relroot = '../' * (len(dirname.split('/')) - 1)
% end
<title>git &raquo; {{repo.name}} &raquo;
{{repo.branch}} &raquo; {{dirname.unicode}}/{{fname.unicode}}</title>
<link rel="stylesheet" type="text/css"
href="{{relroot}}../../../../../static/git-arr.css"/>
<link rel="stylesheet" type="text/css"
href="{{relroot}}../../../../../static/syntax.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>
<body class="tree">
<h1><a href="{{relroot}}../../../../../">git</a> &raquo;
<a href="{{relroot}}../../../">{{repo.name}}</a> &raquo;
<a href="{{relroot}}../">{{repo.branch}}</a> &raquo;
<a href="{{relroot}}">tree</a>
</h1>
<h3>
<a href="{{relroot}}">[{{repo.branch}}]</a> /
% base = smstr(relroot)
% for c in dirname.split('/'):
% if not c.raw:
% continue
% end
<a href="{{base.url}}{{c.url}}/">{{c.unicode}}</a> /
% base += c + '/'
% end
<a href="">{{!fname.html}}</a>
</h3>
% if can_embed_image(repo, fname.unicode):
{{!embed_image_blob(repo, dirname.raw, fname.raw)}}
% elif can_markdown(repo, fname.unicode):
{{!markdown_blob(blob)}}
% elif can_colorize(blob):
{{!colorize_blob(fname.unicode, blob)}}
% else:
<pre class="blob-body">
{{blob}}
</pre>
% end
<hr/>
</body>
</html>