about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2006-12-13 00:13:27 +0100
committerLars Hjemli <hjemli@gmail.com>2006-12-13 00:13:27 +0100
commit06fe0c2f47eaf467db8ab1443e61dfa1c280f30a (patch)
tree481164eeeeb5ca3302f7b3d38d1debbad9db9296 /cgit.c
parentcache_lock: do xstrdup/free on lockfile (diff)
downloadcgit-pink-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.tar.gz
cgit-pink-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.zip
Add display of tree content w/ui-tree.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to '')
-rw-r--r--cgit.c6
-rw-r--r--cgit.css13
2 files changed, 15 insertions, 4 deletions
diff --git a/cgit.c b/cgit.c
index 0f72f2d..ada488b 100644
--- a/cgit.c
+++ b/cgit.c
@@ -26,10 +26,12 @@ static void cgit_print_repo_page(struct cacheitem *item)
 	char *title = fmt("%s - %s", cgit_repo_name, cgit_repo_desc);
 	cgit_print_docstart(title, item);
 	cgit_print_pageheader(title);
-	if (!cgit_query_page)
+	if (!cgit_query_page) {
 		cgit_print_summary();
-	else if (!strcmp(cgit_query_page, "log")) {
+	} else if (!strcmp(cgit_query_page, "log")) {
 		cgit_print_log(cgit_query_head, 0, 100);
+	} else if (!strcmp(cgit_query_page, "tree")) {
+		cgit_print_tree(cgit_query_sha1);
 	} else if (!strcmp(cgit_query_page, "view")) {
 		cgit_print_view(cgit_query_sha1);
 	}
diff --git a/cgit.css b/cgit.css
index 3ed0c22..c16f3f2 100644
--- a/cgit.css
+++ b/cgit.css
@@ -30,7 +30,7 @@ table.list th {
 }
 table.list td {
 	border: none;
-	padding: 0.1em 0.5em;
+	padding: 0.1em 1em 0.1em 0.5em;
 	background: white;
 }
 
@@ -60,4 +60,13 @@ div.error {
 	color: red;
 	font-weight: bold;
 	margin: 1em 2em;
-}
\ No newline at end of file
+}
+div.ls-dir a {
+	font-weight: bold;
+}
+th.filesize, td.filesize {
+	text-align: right;
+}
+th.filemode, td.filemode {
+	text-align: center;
+}