2015-11-18 02:05:13 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2012-09-16 13:17:56 +03:00
|
|
|
<head>
|
|
|
|
|
|
|
|
% if not dirname.raw:
|
2014-12-31 11:50:08 +02:00
|
|
|
% reltree = './'
|
2012-09-16 13:17:56 +03:00
|
|
|
% else:
|
2014-12-31 11:50:08 +02:00
|
|
|
% reltree = '../' * (len(dirname.split('/')) - 1)
|
2012-09-16 13:17:56 +03:00
|
|
|
% end
|
2015-01-14 09:46:33 +02:00
|
|
|
% relroot = reltree + '../' * (len(branch.split('/')) - 1)
|
2012-09-16 13:17:56 +03:00
|
|
|
|
|
|
|
<title>git » {{repo.name}} »
|
2020-05-24 17:52:11 +03:00
|
|
|
{{branch}} » {{dirname.raw}}{{fname.raw}}</title>
|
2012-09-16 13:17:56 +03:00
|
|
|
<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"/>
|
2015-11-18 02:05:13 +02:00
|
|
|
<meta name=viewport content="width=device-width, initial-scale=1">
|
2012-09-16 13:17:56 +03:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body class="tree">
|
|
|
|
<h1><a href="{{relroot}}../../../../../">git</a> »
|
|
|
|
<a href="{{relroot}}../../../">{{repo.name}}</a> »
|
2015-01-14 09:46:33 +02:00
|
|
|
<a href="{{reltree}}../">{{branch}}</a> »
|
2014-12-31 11:50:08 +02:00
|
|
|
<a href="{{reltree}}">tree</a>
|
2012-09-16 13:17:56 +03:00
|
|
|
</h1>
|
|
|
|
|
|
|
|
<h3>
|
2015-01-14 09:46:33 +02:00
|
|
|
<a href="{{reltree}}">[{{branch}}]</a> /
|
2014-12-31 11:50:08 +02:00
|
|
|
% base = smstr(reltree)
|
2012-09-16 13:17:56 +03:00
|
|
|
% for c in dirname.split('/'):
|
2014-06-30 09:02:18 +03:00
|
|
|
% if not c.raw:
|
|
|
|
% continue
|
|
|
|
% end
|
2020-05-24 17:52:11 +03:00
|
|
|
<a href="{{base.url}}{{c.url}}/">{{c.raw}}</a> /
|
2012-09-16 13:17:56 +03:00
|
|
|
% base += c + '/'
|
|
|
|
% end
|
|
|
|
<a href="">{{!fname.html}}</a>
|
|
|
|
</h3>
|
|
|
|
|
2015-01-13 11:57:16 +02:00
|
|
|
% if len(blob.raw_content) == 0:
|
|
|
|
<table class="nice">
|
|
|
|
<tr>
|
|
|
|
<td>empty — 0 bytes</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2020-05-24 17:52:11 +03:00
|
|
|
% elif can_embed_image(repo, fname.raw):
|
2015-01-13 11:57:11 +02:00
|
|
|
{{!embed_image_blob(fname.raw, blob.raw_content)}}
|
2015-01-13 11:57:13 +02:00
|
|
|
% elif is_binary(blob.raw_content):
|
2015-01-13 11:57:14 +02:00
|
|
|
<table class="nice blob-binary">
|
2015-01-13 11:57:13 +02:00
|
|
|
<tr>
|
2015-01-13 11:57:14 +02:00
|
|
|
<td colspan="4">
|
2015-01-13 11:57:13 +02:00
|
|
|
binary — {{'{:,}'.format(len(blob.raw_content))}} bytes
|
|
|
|
</td>
|
|
|
|
</tr>
|
2015-01-13 11:57:15 +02:00
|
|
|
% lim = 256
|
|
|
|
% for offset, hex1, hex2, text in hexdump(blob.raw_content[:lim]):
|
2015-01-13 11:57:14 +02:00
|
|
|
<tr>
|
|
|
|
<td class="offset">{{offset}}</td>
|
|
|
|
<td><pre>{{hex1}}</pre></td>
|
|
|
|
<td><pre>{{hex2}}</pre></td>
|
|
|
|
<td><pre>{{text}}</pre></td>
|
|
|
|
</tr>
|
|
|
|
% end
|
2015-01-13 11:57:15 +02:00
|
|
|
% if lim < len(blob.raw_content):
|
|
|
|
<tr class="etc">
|
|
|
|
<td></td>
|
|
|
|
<td>…</td>
|
|
|
|
<td>…</td>
|
|
|
|
<td>…</td>
|
|
|
|
</tr>
|
|
|
|
% end
|
2015-01-13 11:57:13 +02:00
|
|
|
</table>
|
2020-05-24 17:52:11 +03:00
|
|
|
% elif can_markdown(repo, fname.raw):
|
2018-03-04 22:06:41 +03:00
|
|
|
<div class="markdown">
|
2015-01-13 11:57:09 +02:00
|
|
|
{{!markdown_blob(blob.utf8_content)}}
|
2018-03-04 22:06:41 +03:00
|
|
|
</div>
|
2015-01-13 11:57:09 +02:00
|
|
|
% elif can_colorize(blob.utf8_content):
|
2022-09-26 04:43:55 +03:00
|
|
|
<div class="colorized-src">
|
2020-05-24 17:52:11 +03:00
|
|
|
{{!colorize_blob(fname.raw, blob.utf8_content)}}
|
2022-09-26 04:43:55 +03:00
|
|
|
</div>
|
2012-09-16 13:17:56 +03:00
|
|
|
% else:
|
|
|
|
<pre class="blob-body">
|
2015-01-13 11:57:09 +02:00
|
|
|
{{blob.utf8_content}}
|
2012-09-16 13:17:56 +03:00
|
|
|
</pre>
|
|
|
|
% end
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|