-rw-r--r-- | cgit.css | 9 | ||||
-rw-r--r-- | ui-repolist.c | 8 | ||||
-rw-r--r-- | ui-tree.c | 2 |
3 files changed, 10 insertions, 9 deletions
@@ -350,58 +350,59 @@ table.diff td div.add { | |||
350 | table.diff td div.del { | 350 | table.diff td div.del { |
351 | color: red; | 351 | color: red; |
352 | } | 352 | } |
353 | 353 | ||
354 | .sha1 { | 354 | .sha1 { |
355 | font-family: monospace; | 355 | font-family: monospace; |
356 | font-size: 90%; | 356 | font-size: 90%; |
357 | } | 357 | } |
358 | 358 | ||
359 | .left { | 359 | .left { |
360 | text-align: left; | 360 | text-align: left; |
361 | } | 361 | } |
362 | 362 | ||
363 | .right { | 363 | .right { |
364 | text-align: right; | 364 | text-align: right; |
365 | } | 365 | } |
366 | 366 | ||
367 | table.list td.repogroup { | 367 | table.list td.repogroup { |
368 | font-style: italic; | 368 | font-style: italic; |
369 | color: #888; | 369 | color: #888; |
370 | } | 370 | } |
371 | 371 | ||
372 | a.button { | 372 | a.button { |
373 | font-size: 80%; | 373 | font-size: 80%; |
374 | color: #333; | 374 | color: #aaa; |
375 | background-color: #ccc; | 375 | background-color: #eee; |
376 | border: solid 1px #999; | 376 | border: solid 1px #aaa; |
377 | padding: 0em 0.5em; | 377 | padding: 0em 0.5em; |
378 | margin: 0.1em 0.25em; | 378 | margin: 0.1em 0.25em; |
379 | } | 379 | } |
380 | 380 | ||
381 | a.button:hover { | 381 | a.button:hover { |
382 | text-decoration: none; | 382 | text-decoration: none; |
383 | background-color: #eee; | 383 | color: #333; |
384 | background-color: #ccc; | ||
384 | } | 385 | } |
385 | 386 | ||
386 | a.primary { | 387 | a.primary { |
387 | font-size: 100%; | 388 | font-size: 100%; |
388 | } | 389 | } |
389 | 390 | ||
390 | a.secondary { | 391 | a.secondary { |
391 | font-size: 90%; | 392 | font-size: 90%; |
392 | } | 393 | } |
393 | 394 | ||
394 | td.toplevel-repo { | 395 | td.toplevel-repo { |
395 | 396 | ||
396 | } | 397 | } |
397 | 398 | ||
398 | table.list td.sublevel-repo { | 399 | table.list td.sublevel-repo { |
399 | padding-left: 1.5em; | 400 | padding-left: 1.5em; |
400 | } | 401 | } |
401 | 402 | ||
402 | span.age-mins { | 403 | span.age-mins { |
403 | font-weight: bold; | 404 | font-weight: bold; |
404 | color: #080; | 405 | color: #080; |
405 | } | 406 | } |
406 | 407 | ||
407 | span.age-hours { | 408 | span.age-hours { |
diff --git a/ui-repolist.c b/ui-repolist.c index d5c77ea..4f820a8 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -66,33 +66,33 @@ void cgit_print_repolist(struct cacheitem *item) | |||
66 | for (i=0; i<cgit_repolist.count; i++) { | 66 | for (i=0; i<cgit_repolist.count; i++) { |
67 | cgit_repo = &cgit_repolist.repos[i]; | 67 | cgit_repo = &cgit_repolist.repos[i]; |
68 | if ((last_group == NULL && cgit_repo->group != NULL) || | 68 | if ((last_group == NULL && cgit_repo->group != NULL) || |
69 | (last_group != NULL && cgit_repo->group == NULL) || | 69 | (last_group != NULL && cgit_repo->group == NULL) || |
70 | (last_group != NULL && cgit_repo->group != NULL && | 70 | (last_group != NULL && cgit_repo->group != NULL && |
71 | strcmp(cgit_repo->group, last_group))) { | 71 | strcmp(cgit_repo->group, last_group))) { |
72 | html("<tr class='nohover'><td colspan='4' class='repogroup'>"); | 72 | html("<tr class='nohover'><td colspan='4' class='repogroup'>"); |
73 | html_txt(cgit_repo->group); | 73 | html_txt(cgit_repo->group); |
74 | html("</td></tr>"); | 74 | html("</td></tr>"); |
75 | last_group = cgit_repo->group; | 75 | last_group = cgit_repo->group; |
76 | } | 76 | } |
77 | htmlf("<tr><td class='%s'>", | 77 | htmlf("<tr><td class='%s'>", |
78 | cgit_repo->group ? "sublevel-repo" : "toplevel-repo"); | 78 | cgit_repo->group ? "sublevel-repo" : "toplevel-repo"); |
79 | html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL); | 79 | html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL); |
80 | html_txt(cgit_repo->name); | 80 | html_txt(cgit_repo->name); |
81 | html_link_close(); | 81 | html_link_close(); |
82 | html("</td><td>"); | 82 | html("</td><td>"); |
83 | html_ntxt(cgit_max_repodesc_len, cgit_repo->desc); | 83 | html_ntxt(cgit_max_repodesc_len, cgit_repo->desc); |
84 | html("</td><td>"); | 84 | html("</td><td>"); |
85 | html_txt(cgit_repo->owner); | 85 | html_txt(cgit_repo->owner); |
86 | html("</td><td>"); | 86 | html("</td><td>"); |
87 | print_modtime(cgit_repo); | 87 | print_modtime(cgit_repo); |
88 | html("</td><td>"); | 88 | html("</td><td>"); |
89 | html_link_open(cgit_repourl(cgit_repo->url), | 89 | html_link_open(cgit_repourl(cgit_repo->url), |
90 | "Summary", "button"); | 90 | NULL, "button"); |
91 | html("S</a>"); | 91 | html("summary</a>"); |
92 | cgit_log_link("L", "Log", "button", NULL, NULL, NULL); | 92 | cgit_log_link("log", NULL, "button", NULL, NULL, NULL); |
93 | cgit_tree_link("T", "Tree", "button", NULL, NULL, NULL); | 93 | cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); |
94 | html("</td></tr>\n"); | 94 | html("</td></tr>\n"); |
95 | } | 95 | } |
96 | html("</table>"); | 96 | html("</table>"); |
97 | cgit_print_docend(); | 97 | cgit_print_docend(); |
98 | } | 98 | } |
@@ -71,49 +71,49 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | html("<tr><td class='ls-mode'>"); | 74 | html("<tr><td class='ls-mode'>"); |
75 | html_filemode(mode); | 75 | html_filemode(mode); |
76 | html("</td><td>"); | 76 | html("</td><td>"); |
77 | if (S_ISDIRLNK(mode)) { | 77 | if (S_ISDIRLNK(mode)) { |
78 | htmlf("<a class='ls-mod' href='"); | 78 | htmlf("<a class='ls-mod' href='"); |
79 | html_attr(fmt(cgit_repo->module_link, | 79 | html_attr(fmt(cgit_repo->module_link, |
80 | name, | 80 | name, |
81 | sha1_to_hex(sha1))); | 81 | sha1_to_hex(sha1))); |
82 | html("'>"); | 82 | html("'>"); |
83 | html_txt(name); | 83 | html_txt(name); |
84 | html("</a>"); | 84 | html("</a>"); |
85 | } else if (S_ISDIR(mode)) { | 85 | } else if (S_ISDIR(mode)) { |
86 | cgit_tree_link(name, NULL, "ls-dir", cgit_query_head, | 86 | cgit_tree_link(name, NULL, "ls-dir", cgit_query_head, |
87 | curr_rev, fullpath); | 87 | curr_rev, fullpath); |
88 | } else { | 88 | } else { |
89 | cgit_tree_link(name, NULL, "ls-blob", cgit_query_head, | 89 | cgit_tree_link(name, NULL, "ls-blob", cgit_query_head, |
90 | curr_rev, fullpath); | 90 | curr_rev, fullpath); |
91 | } | 91 | } |
92 | htmlf("</td><td class='ls-size'>%li</td>", size); | 92 | htmlf("</td><td class='ls-size'>%li</td>", size); |
93 | 93 | ||
94 | html("<td>"); | 94 | html("<td>"); |
95 | cgit_log_link("L", "Log", "button", cgit_query_head, curr_rev, | 95 | cgit_log_link("log", NULL, "button", cgit_query_head, curr_rev, |
96 | fullpath); | 96 | fullpath); |
97 | html("</td></tr>\n"); | 97 | html("</td></tr>\n"); |
98 | free(name); | 98 | free(name); |
99 | return 0; | 99 | return 0; |
100 | } | 100 | } |
101 | 101 | ||
102 | static void ls_head() | 102 | static void ls_head() |
103 | { | 103 | { |
104 | html("<table class='list'>\n"); | 104 | html("<table class='list'>\n"); |
105 | html("<tr class='nohover'>"); | 105 | html("<tr class='nohover'>"); |
106 | html("<th class='left'>Mode</th>"); | 106 | html("<th class='left'>Mode</th>"); |
107 | html("<th class='left'>Name</th>"); | 107 | html("<th class='left'>Name</th>"); |
108 | html("<th class='right'>Size</th>"); | 108 | html("<th class='right'>Size</th>"); |
109 | html("<th/>"); | 109 | html("<th/>"); |
110 | html("</tr>\n"); | 110 | html("</tr>\n"); |
111 | header = 1; | 111 | header = 1; |
112 | } | 112 | } |
113 | 113 | ||
114 | static void ls_tail() | 114 | static void ls_tail() |
115 | { | 115 | { |
116 | if (!header) | 116 | if (!header) |
117 | return; | 117 | return; |
118 | html("</table>\n"); | 118 | html("</table>\n"); |
119 | header = 0; | 119 | header = 0; |