summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
authorLars Hjemli <hjemli@gmail.com>2007-11-16 08:52:03 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-11-16 08:52:03 (UTC)
commit6ef637e0908ca5a14675b3513f48cd390d3757fe (patch) (unidiff)
treee9e74f73e3d52d5b1fb931ac92a99476d09130af /ui-shared.c
parentfd90d2826a979f3844312718ad130880cf19d52c (diff)
downloadcgit-6ef637e0908ca5a14675b3513f48cd390d3757fe.zip
cgit-6ef637e0908ca5a14675b3513f48cd390d3757fe.tar.gz
cgit-6ef637e0908ca5a14675b3513f48cd390d3757fe.tar.bz2
Use tables for page layout
It feels like the Right Thing, and it fixes some rendering problems in a much used webbrowser. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 2f771da..4c0613a 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -457,12 +457,14 @@ void cgit_print_pageheader(char *title, int show_search)
457 static const char *default_info = "This is cgit, a fast webinterface for git repositories"; 457 static const char *default_info = "This is cgit, a fast webinterface for git repositories";
458 int header = 0; 458 int header = 0;
459 459
460 html("<div id='sidebar'>\n"); 460 html("<table id='layout' summary=''>\n");
461 html("<div id='logo'><a href='"); 461 html("<tr><td id='sidebar'>\n");
462 html("<table class='sidebar' summary=''>\n");
463 html("<tr><td class='sidebar'>\n<a href='");
462 html_attr(cgit_rooturl()); 464 html_attr(cgit_rooturl());
463 htmlf("'><img src='%s' alt='cgit'/></a></div>\n", 465 htmlf("'><img src='%s' alt='cgit'/></a>\n",
464 cgit_logo); 466 cgit_logo);
465 html("<div class='infobox'>"); 467 html("</td></tr>\n<tr><td class='sidebar'>\n");
466 if (cgit_query_repo) { 468 if (cgit_query_repo) {
467 html("<h1 class='first'>"); 469 html("<h1 class='first'>");
468 html_txt(strrpart(cgit_repo->name, 20)); 470 html_txt(strrpart(cgit_repo->name, 20));
@@ -489,13 +491,13 @@ void cgit_print_pageheader(char *title, int show_search)
489 html("<h1>branch</h1>\n"); 491 html("<h1>branch</h1>\n");
490 html("<form method='get' action=''>\n"); 492 html("<form method='get' action=''>\n");
491 add_hidden_formfields(0, 1, cgit_query_page); 493 add_hidden_formfields(0, 1, cgit_query_page);
492 html("<table summary='branch selector' class='grid'><tr><td id='branch-dropdown-cell'>"); 494 // html("<table summary='branch selector' class='grid'><tr><td id='branch-dropdown-cell'>");
493 html("<select name='h' onchange='this.form.submit();'>\n"); 495 html("<select name='h' onchange='this.form.submit();'>\n");
494 for_each_branch_ref(print_branch_option, cgit_query_head); 496 for_each_branch_ref(print_branch_option, cgit_query_head);
495 html("</select>\n"); 497 html("</select>\n");
496 html("</td><td>"); 498 // html("</td><td>");
497 html("<noscript><input type='submit' id='switch-btn' value='..'/></noscript>\n"); 499 html("<noscript><input type='submit' id='switch-btn' value='switch'/></noscript>\n");
498 html("</td></tr></table>"); 500 // html("</td></tr></table>");
499 html("</form>\n"); 501 html("</form>\n");
500 502
501 html("<h1>search</h1>\n"); 503 html("<h1>search</h1>\n");
@@ -519,9 +521,9 @@ void cgit_print_pageheader(char *title, int show_search)
519 html(default_info); 521 html(default_info);
520 } 522 }
521 523
522 html("</div>\n"); 524 html("</td></tr></table></td>\n");
523 525
524 html("</div>\n<table summary='page content' class='grid'><tr><td id='content'>\n"); 526 html("<td id='content'>\n");
525} 527}
526 528
527 529