aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cgit.css64
-rw-r--r--ui-repolist.c2
-rw-r--r--ui-shared.c65
3 files changed, 98 insertions, 33 deletions
diff --git a/cgit.css b/cgit.css
index e06fdea..8f3d00c 100644
--- a/cgit.css
+++ b/cgit.css
@@ -34,30 +34,50 @@ table#header td.logo {
34} 34}
35 35
36table#header td.main { 36table#header td.main {
37 font-size: 200%; 37 font-size: 250%;
38 padding-left: 10px;
39}
40
41table#header td.main a {
42 color: #000;
43}
44
45table#header td.form {
46 text-align: right;
47 vertical-align: bottom;
48 padding-right: 1em;
49 padding-bottom: 2px;
50}
51
52table#header td.form form,
53table#header td.form input,
54table#header td.form select {
55 font-size: 90%;
38} 56}
39 57
40table#header td.sub { 58table#header td.sub {
41 color: #777; 59 color: #777;
42 border-top: solid 1px #ccc; 60 border-top: solid 1px #ccc;
61 padding-left: 10px;
43} 62}
44 63
45table.tabs { 64table.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%;
51} 70}
52 71
53table.tabs td { 72table.tabs td {
54 padding: 0px 0.5em; 73 padding: 0px 1em;
55 vertical-align: bottom; 74 vertical-align: bottom;
56} 75}
57 76
58table.tabs td a { 77table.tabs td a {
59 padding: 2px 1em; 78 padding: 2px 0.75em;
60 color: #007; 79 color: #777;
80 font-size: 110%;
61} 81}
62 82
63table.tabs td a.active { 83table.tabs td a.active {
@@ -65,18 +85,25 @@ table.tabs td a.active {
65 background-color: #ccc; 85 background-color: #ccc;
66} 86}
67 87
68table.tabs td.branch { 88table.tabs td.form {
69 text-align: right; 89 text-align: right;
70} 90}
71 91
72table.tabs td.branch form { 92table.tabs td.form form {
73 padding-bottom: 2px; 93 padding-bottom: 2px;
74 font-size: 90%; 94 font-size: 90%;
75} 95}
76 96
97table.tabs td.form input,
98table.tabs td.form select {
99 font-size: 90%;
100}
101
77div.content { 102div.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}
81 108
82 109
@@ -99,9 +126,12 @@ table.list tr.nohover:hover {
99} 126}
100 127
101table.list th { 128table.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;
106} 136}
107 137
@@ -360,17 +390,17 @@ table.list td.repogroup {
360 390
361a.button { 391a.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}
369 401
370a.button:hover { 402a.button:hover {
371 text-decoration: none; 403 text-decoration: underline;
372 color: #333;
373 background-color: #ccc;
374} 404}
375 405
376a.primary { 406a.primary {
diff --git a/ui-repolist.c b/ui-repolist.c
index eeeaf3d..9eba222 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -70,7 +70,7 @@ void cgit_print_repolist()
70 "<th class='left'>Owner</th>" 70 "<th class='left'>Owner</th>"
71 "<th class='left'>Idle</th>"); 71 "<th class='left'>Idle</th>");
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");
75 75
76 for (i=0; i<cgit_repolist.count; i++) { 76 for (i=0; i<cgit_repolist.count; i++) {
diff --git a/ui-shared.c b/ui-shared.c
index 73e3d4c..782caa7 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -389,7 +389,7 @@ void cgit_print_docstart(struct cgit_context *ctx)
389 389
390void cgit_print_docend() 390void 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}
394 394
395int print_branch_option(const char *refname, const unsigned char *sha1, 395int print_branch_option(const char *refname, const unsigned char *sha1,
@@ -485,21 +485,46 @@ void cgit_print_pageheader(struct cgit_context *ctx)
485 html("'><img src='"); 485 html("'><img src='");
486 html_attr(ctx->cfg.logo); 486 html_attr(ctx->cfg.logo);
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");
504 529
505 html("<table class='tabs'><tr><td>\n"); 530 html("<table class='tabs'><tr><td>\n");
@@ -518,13 +543,23 @@ void cgit_print_pageheader(struct cgit_context *ctx)
518 ctx->qry.sha1, ctx->qry.sha2, NULL); 543 ctx->qry.sha1, ctx->qry.sha2, NULL);
519 cgit_patch_link("patch", NULL, hc(cmd, "patch"), ctx->qry.head, 544 cgit_patch_link("patch", NULL, hc(cmd, "patch"), ctx->qry.head,
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 {
529 html("<a class='active' href='"); 564 html("<a class='active' href='");
530 html_attr(cgit_rooturl()); 565 html_attr(cgit_rooturl());