summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
authorLars Hjemli <hjemli@gmail.com>2007-02-17 12:46:18 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-02-20 23:24:36 (UTC)
commit66cacd053ba900c8eb3b7962027370c84a97f990 (patch) (unidiff)
tree9ccd8202204bf556a186ba1520a6c767756855bf /ui-shared.c
parentac70cb4795c90db02917db63d169b0fadfe9fb99 (diff)
downloadcgit-66cacd053ba900c8eb3b7962027370c84a97f990.zip
cgit-66cacd053ba900c8eb3b7962027370c84a97f990.tar.gz
cgit-66cacd053ba900c8eb3b7962027370c84a97f990.tar.bz2
Layout update
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c37
1 files changed, 27 insertions, 10 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 172499c..bca50aa 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -42,2 +42,10 @@ void cgit_print_error(char *msg)
42 42
43char *cgit_rooturl()
44{
45 if (cgit_virtual_root)
46 return fmt("%s/", cgit_virtual_root);
47 else
48 return "./cgit.cgi";
49}
50
43char *cgit_repourl(const char *reponame) 51char *cgit_repourl(const char *reponame)
@@ -115,6 +123,19 @@ void cgit_print_pageheader(char *title, int show_search)
115{ 123{
116 html("<table id='layout'><tr><td id='header'>"); 124 html("<table id='layout'>");
117 htmlf("<a href='%s'>", cgit_logo_link); 125 html("<tr><td id='header'>");
118 htmlf("<img id='logo' src='%s'/>\n", cgit_logo); 126 html(cgit_root_title);
119 htmlf("</a>"); 127 html("</td><td id='logo'>");
128 html("<a href='");
129 html_attr(cgit_logo_link);
130 htmlf("'><img src='%s'/></a>", cgit_logo);
131 html("</td></tr>");
132 html("<tr><td id='crumb'>");
133 htmlf("<a href='%s'>root</a>", cgit_rooturl());
134 if (cgit_query_repo) {
135 htmlf(" : <a href='%s'>", cgit_repourl(cgit_repo->url));
136 html_txt(cgit_repo->name);
137 htmlf("</a> : %s", title);
138 }
139 html("</td>");
140 html("<td id='search'>");
120 if (show_search) { 141 if (show_search) {
@@ -139,8 +160,4 @@ void cgit_print_pageheader(char *title, int show_search)
139 } 160 }
140 if (cgit_query_repo) 161 html("</td></tr>");
141 htmlf("<a href='%s'>", cgit_repourl(cgit_query_repo)); 162 html("<tr><td id='content' colspan='2'>");
142 html_txt(title);
143 if (cgit_query_repo)
144 html("</a>");
145 html("</td></tr><tr><td id='content'>");
146} 163}