diff --git a/progit/__init__.py b/progit/__init__.py index 9cf226e..4958bfe 100644 --- a/progit/__init__.py +++ b/progit/__init__.py @@ -342,6 +342,12 @@ def avatar(packager, size=64): return output +@APP.template_filter('short') +def shorted_commit(cid): + """Gets short version of the commit id""" + return cid[:APP.config['SHORT_LENGTH']] + + @FAS.postlogin def set_user(return_url): ''' After login method. ''' diff --git a/progit/default_config.py b/progit/default_config.py index 0acf266..ce2001d 100644 --- a/progit/default_config.py +++ b/progit/default_config.py @@ -118,3 +118,6 @@ APPLICATION_URL = None # under certain setup it might not work (for example is there are proxies # in front of the application). CHECK_SESSION_IP = True + +# Lenght for short commits ids or file hex +SHORT_LENGTH = 6 diff --git a/progit/static/images/file.png b/progit/static/images/file.png new file mode 100644 index 0000000..01b07e8 Binary files /dev/null and b/progit/static/images/file.png differ diff --git a/progit/static/images/folder.png b/progit/static/images/folder.png new file mode 100644 index 0000000..536da3d Binary files /dev/null and b/progit/static/images/folder.png differ diff --git a/progit/static/progit.css b/progit/static/progit.css index 5848b00..ec9c60b 100644 --- a/progit/static/progit.css +++ b/progit/static/progit.css @@ -531,3 +531,43 @@ form.icon button { .list_groups form { display: inline; } + +pre { + font-size: 1.3em; +} + +.tree_list li.folder { + list-style-image: url(images/folder.png); +} + +.tree_list li.file { + list-style-image: url(images/file.png); +} + +.tree_list .view_commit, +.tree_list .filehex +{ + float: right; +} + +.tree_list li:nth-child(odd) { + background-color: #ededed; +} + +.tree_list li:hover, +.commit_list li:hover +{ + color: white; + background-color: #0066cc; +} + +.tree_list li:hover a, +.commit_list li:hover a +{ + color:white; +} + +.commit_list li > a:first-child { + display: inline-block; + width: 5em; +} diff --git a/progit/templates/file.html b/progit/templates/file.html index 4d1d1b4..09e6af0 100644 --- a/progit/templates/file.html +++ b/progit/templates/file.html @@ -24,32 +24,28 @@ {% endfor %} -