git » git-arr » commit 88dd6fa

views/tree: signify root directory in page title

author Eric Sunshine
2015-01-23 22:14:25 UTC
committer Alberto Bertogli
2015-01-24 19:23:18 UTC
parent 84d628c690357578a7a43e5485e9c4e01c5c9ea2

views/tree: signify root directory in page title

The page title in a root tree displays as "git >> repo >> branch >>",
which looks odd and fails to convey the fact that the page represents a
tree. Appending a '/' (for example "git >> repo >> branch >> /") makes
it more obvious that the page shows a tree, in general, and the root
tree, in particular.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

views/tree.html +1 -1

diff --git a/views/tree.html b/views/tree.html
index 68a5844..c705b18 100644
--- a/views/tree.html
+++ b/views/tree.html
@@ -11,7 +11,7 @@
 % relroot = reltree + '../' * (len(branch.split('/')) - 1)
 
 <title>git &raquo; {{repo.name}} &raquo;
-    {{branch}} &raquo; {{dirname.unicode}}</title>
+    {{branch}} &raquo; {{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"/>