Implemented necessary functionality so binary files no longer render literally.
[catagits/Gitalist.git] / root / fragment / ref / blob.tt2
1 [%- IF is_image -%]
2 <div class='blob'><img src="[% c.uri_for_action('/ref/raw', c.req.captures, filename) %]" title="[% filename %]"></div>
3 [%- ELSIF is_binary -%]
4 <div class='blob'>This is a binary file which won't render natively on the web, but you can get it here all the same: <a href="[% c.uri_for_action('/ref/raw', c.req.captures, filename) %]" title="[% filename %]">[% filename %]</a></div>
5 [%- ELSE -%]
6 <pre class='blob'>[% blob | html %]</pre>
7 [%- END -%]