diff --git a/browser/templatetags/vcs.py b/browser/templatetags/vcs.py
index 2ba4a76..abe6763 100644
--- a/browser/templatetags/vcs.py
+++ b/browser/templatetags/vcs.py
@@ -13,7 +13,7 @@ def oneline(value):
@register.filter
@stringfilter
def lines(value):
- return value.split('\n')
+ return value.split('\n')[:-1]
@register.filter
@stringfilter
diff --git a/media/default.css b/media/default.css
index cd9b723..1971897 100644
--- a/media/default.css
+++ b/media/default.css
@@ -70,6 +70,11 @@ table.diff .break {
}
table.diff .number {
width: 3em;
+ text-align: right;
+ background-color: #f0f0f0;
+}
+table.diff .text {
+ border-left: 1px solid #e0e0e0;
}
table.diff .add .number {
background-color: #baeeba;
diff --git a/templates/browser/blob.html b/templates/browser/blob.html
index afcc7ff..bce3c9b 100644
--- a/templates/browser/blob.html
+++ b/templates/browser/blob.html
@@ -6,14 +6,25 @@
{% endblock %}
{% block content %}
-
Blob View
-
- {% for line in blob.data|lines %}
-
- {{ forloop.counter }} |
- {{ line }} |
-
- {% endfor %}
-
+File Contents
+{% with log|first as commit %}
+
+ {{ blob.path|basename }}
+ @
+ {{ commit.id }}
+
+{% endwith %}
+{% if blob.data %}
+
+ {% for line in blob.data|lines %}
+
+ {{ forloop.counter }} |
+ {{ line }} |
+
+ {% endfor %}
+
+{% else %}
+ File is empty
+{% endif %}
{% include "browser/commitlog.html" %}
{% endblock %}