-rw-r--r-- | cgit.css | 64 | ||||
-rw-r--r-- | ui-repolist.c | 2 | ||||
-rw-r--r-- | ui-shared.c | 65 |
3 files changed, 98 insertions, 33 deletions
@@ -36,3 +36,21 @@ table#header td.logo { | |||
36 | table#header td.main { | 36 | table#header td.main { |
37 | font-size: 200%; | 37 | font-size: 250%; |
38 | padding-left: 10px; | ||
39 | } | ||
40 | |||
41 | table#header td.main a { | ||
42 | color: #000; | ||
43 | } | ||
44 | |||
45 | table#header td.form { | ||
46 | text-align: right; | ||
47 | vertical-align: bottom; | ||
48 | padding-right: 1em; | ||
49 | padding-bottom: 2px; | ||
50 | } | ||
51 | |||
52 | table#header td.form form, | ||
53 | table#header td.form input, | ||
54 | table#header td.form select { | ||
55 | font-size: 90%; | ||
38 | } | 56 | } |
@@ -42,2 +60,3 @@ table#header td.sub { | |||
42 | border-top: solid 1px #ccc; | 60 | border-top: solid 1px #ccc; |
61 | padding-left: 10px; | ||
43 | } | 62 | } |
@@ -45,6 +64,6 @@ table#header td.sub { | |||
45 | table.tabs { | 64 | table.tabs { |
46 | border-bottom: solid 2px #ccc; | 65 | /* border-bottom: solid 2px #ccc; */ |
47 | border-collapse: collapse; | 66 | border-collapse: collapse; |
48 | margin-top: 2em; | 67 | margin-top: 2em; |
49 | margin-bottom: 1em; | 68 | margin-bottom: 0px; |
50 | width: 100%; | 69 | width: 100%; |
@@ -53,3 +72,3 @@ table.tabs { | |||
53 | table.tabs td { | 72 | table.tabs td { |
54 | padding: 0px 0.5em; | 73 | padding: 0px 1em; |
55 | vertical-align: bottom; | 74 | vertical-align: bottom; |
@@ -58,4 +77,5 @@ table.tabs td { | |||
58 | table.tabs td a { | 77 | table.tabs td a { |
59 | padding: 2px 1em; | 78 | padding: 2px 0.75em; |
60 | color: #007; | 79 | color: #777; |
80 | font-size: 110%; | ||
61 | } | 81 | } |
@@ -67,3 +87,3 @@ table.tabs td a.active { | |||
67 | 87 | ||
68 | table.tabs td.branch { | 88 | table.tabs td.form { |
69 | text-align: right; | 89 | text-align: right; |
@@ -71,3 +91,3 @@ table.tabs td.branch { | |||
71 | 91 | ||
72 | table.tabs td.branch form { | 92 | table.tabs td.form form { |
73 | padding-bottom: 2px; | 93 | padding-bottom: 2px; |
@@ -76,5 +96,12 @@ table.tabs td.branch form { | |||
76 | 96 | ||
97 | table.tabs td.form input, | ||
98 | table.tabs td.form select { | ||
99 | font-size: 90%; | ||
100 | } | ||
101 | |||
77 | div.content { | 102 | div.content { |
78 | margin: 0px; | 103 | margin: 0px; |
79 | padding: 1em; | 104 | padding: 2em; |
105 | border-top: solid 3px #ccc; | ||
106 | border-bottom: solid 3px #ccc; | ||
80 | } | 107 | } |
@@ -101,5 +128,8 @@ table.list tr.nohover:hover { | |||
101 | table.list th { | 128 | table.list th { |
102 | font-weight: normal; | 129 | font-weight: bold; |
103 | border-bottom: solid 1px #ccc; | 130 | /* color: #888; |
104 | padding: 0.1em 0.5em 0.1em 0.5em; | 131 | border-top: dashed 1px #888; |
132 | border-bottom: dashed 1px #888; | ||
133 | */ | ||
134 | padding: 0.1em 0.5em 0.05em 0.5em; | ||
105 | vertical-align: baseline; | 135 | vertical-align: baseline; |
@@ -362,7 +392,9 @@ a.button { | |||
362 | font-size: 80%; | 392 | font-size: 80%; |
363 | color: #aaa; | 393 | color: #33c; |
394 | /* | ||
364 | background-color: #eee; | 395 | background-color: #eee; |
365 | border: solid 1px #aaa; | 396 | border: solid 1px #aaa; |
366 | padding: 0em 0.5em; | ||
367 | margin: 0.1em 0.25em; | 397 | margin: 0.1em 0.25em; |
398 | */ | ||
399 | padding: 0em 0.5em; | ||
368 | } | 400 | } |
@@ -370,5 +402,3 @@ a.button { | |||
370 | a.button:hover { | 402 | a.button:hover { |
371 | text-decoration: none; | 403 | text-decoration: underline; |
372 | color: #333; | ||
373 | background-color: #ccc; | ||
374 | } | 404 | } |
diff --git a/ui-repolist.c b/ui-repolist.c index eeeaf3d..9eba222 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -72,3 +72,3 @@ void cgit_print_repolist() | |||
72 | if (ctx.cfg.enable_index_links) | 72 | if (ctx.cfg.enable_index_links) |
73 | html("<th>Links</th>"); | 73 | html("<th class='left'>Links</th>"); |
74 | html("</tr>\n"); | 74 | html("</tr>\n"); |
diff --git a/ui-shared.c b/ui-shared.c index 73e3d4c..782caa7 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -391,3 +391,3 @@ void cgit_print_docend() | |||
391 | { | 391 | { |
392 | html("</td>\n</tr>\n</table>\n</body>\n</html>\n"); | 392 | html("</div>\n</body>\n</html>\n"); |
393 | } | 393 | } |
@@ -487,17 +487,42 @@ void cgit_print_pageheader(struct cgit_context *ctx) | |||
487 | html("'/></a></td>\n"); | 487 | html("'/></a></td>\n"); |
488 | |||
488 | html("<td class='main'>"); | 489 | html("<td class='main'>"); |
489 | if (ctx->repo) { | 490 | if (ctx->repo) { |
491 | /* | ||
490 | html("<a href='"); | 492 | html("<a href='"); |
491 | html_attr(cgit_rooturl()); | 493 | html_attr(cgit_rooturl()); |
492 | html("'>index</a> / "); | 494 | html("'>index</a> : "); |
493 | html_txt(ctx->repo->name); | 495 | */ |
496 | reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"), | ||
497 | ctx->qry.head, NULL, NULL); | ||
498 | html(" : "); | ||
499 | html_txt(ctx->qry.page); | ||
500 | html("</td><td class='form'>"); | ||
501 | html("<form method='get' action=''>\n"); | ||
502 | add_hidden_formfields(0, 1, ctx->qry.page); | ||
503 | html("<select name='h' onchange='this.form.submit();'>\n"); | ||
504 | for_each_branch_ref(print_branch_option, ctx->qry.head); | ||
505 | html("</select> "); | ||
506 | html("<input type='submit' name='' value='switch'/>"); | ||
507 | html("</form>"); | ||
494 | } else | 508 | } else |
495 | html_txt(ctx->cfg.root_title); | 509 | html_txt(ctx->cfg.root_title); |
496 | html("</td></tr>\n"); | 510 | html("</td>\n"); |
497 | html("<tr><td class='sub'>"); | 511 | |
498 | if (ctx->repo) | 512 | html("<tr><td class='sub'"); |
513 | if (ctx->repo) { | ||
514 | html(" colspan='2'>"); | ||
499 | html_txt(ctx->repo->desc); | 515 | html_txt(ctx->repo->desc); |
500 | else | 516 | } |
501 | html_txt(ctx->cfg.index_info); | 517 | /* |
518 | else if (ctx->cfg.root_subtitle) | ||
519 | html_txt(ctx->cfg.root_subtitle); | ||
520 | */ | ||
521 | else { | ||
522 | html(">"); | ||
523 | html_txt("a fast webinterface for the git dscm"); | ||
524 | } | ||
502 | html("</td></tr>\n"); | 525 | html("</td></tr>\n"); |
526 | |||
527 | html("</tr>\n"); | ||
503 | html("</table>\n"); | 528 | html("</table>\n"); |
@@ -520,9 +545,19 @@ void cgit_print_pageheader(struct cgit_context *ctx) | |||
520 | ctx->qry.sha1); | 545 | ctx->qry.sha1); |
521 | html("</td><td class='branch'>"); | 546 | html("</td><td class='form'>"); |
522 | html("<form method='get' action=''>\n"); | 547 | html("<form class='right' method='get' action='"); |
523 | add_hidden_formfields(0, 1, ctx->qry.page); | 548 | if (ctx->cfg.virtual_root) |
524 | html("<select name='h' onchange='this.form.submit();'>\n"); | 549 | html_attr(cgit_fileurl(ctx->qry.repo, "log", |
525 | for_each_branch_ref(print_branch_option, ctx->qry.head); | 550 | ctx->qry.path, NULL)); |
526 | html("</select> "); | 551 | html("'>\n"); |
527 | html("<input type='submit' name='' value='switch'/>"); | 552 | add_hidden_formfields(1, 0, "log"); |
553 | html("<select name='qt'>\n"); | ||
554 | html_option("grep", "log msg", ctx->qry.grep); | ||
555 | html_option("author", "author", ctx->qry.grep); | ||
556 | html_option("committer", "committer", ctx->qry.grep); | ||
557 | html("</select>\n"); | ||
558 | html("<input class='txt' type='text' size='8' name='q' value='"); | ||
559 | html_attr(ctx->qry.search); | ||
560 | html("'/>\n"); | ||
561 | html("<input type='submit' value='search'/>\n"); | ||
562 | html("</form>\n"); | ||
528 | } else { | 563 | } else { |