- html("<table id='layout' summary=''>\n");
- html("<tr><td id='sidebar'>\n");
- html("<table class='sidebar' cellspacing='0' summary=''>\n");
- html("<tr><td class='sidebar'>\n<a href='");
- html_attr(cgit_rooturl());
- htmlf("'><img src='%s' alt='cgit'/></a>\n",
- ctx->cfg.logo);
- html("</td></tr>\n<tr><td class='sidebar'>\n");
- if (ctx->repo) {
- html("<h1 class='first'>");
- html_txt(strrpart(ctx->repo->name, 20));
- html("</h1>\n");
- html_txt(ctx->repo->desc);
- if (ctx->repo->owner) {
- html("<h1>owner</h1>\n");
- html_txt(ctx->repo->owner);
- }
- html("<h1>navigate</h1>\n");
- reporevlink(NULL, "summary", NULL, "menu", ctx->qry.head,
- NULL, NULL);
- cgit_log_link("log", NULL, "menu", ctx->qry.head, NULL, NULL,
- 0, NULL, NULL);
- cgit_tree_link("tree", NULL, "menu", ctx->qry.head,
- ctx->qry.sha1, NULL);
- cgit_commit_link("commit", NULL, "menu", ctx->qry.head,
- ctx->qry.sha1);
- cgit_diff_link("diff", NULL, "menu", ctx->qry.head,
- ctx->qry.sha1, ctx->qry.sha2, NULL);
- cgit_patch_link("patch", NULL, "menu", ctx->qry.head,
- ctx->qry.sha1);
-
- for_each_ref(print_archive_ref, &header);
-
- if (ctx->repo->clone_url || ctx->cfg.clone_prefix) {
- html("<h1>clone</h1>\n");
- if (ctx->repo->clone_url)
- url = ctx->repo->clone_url;
- else
- url = fmt("%s%s", ctx->cfg.clone_prefix,
- ctx->repo->url);
- html("<a class='menu' href='");
- html_attr(url);
- html("' title='");
- html_attr(url);
- html("'>\n");
- html_txt(strrpart(url, 20));
- html("</a>\n");
- }
+ if (!cmd && ctx->repo)
+ fallback_cmd = "summary";
+
+ html("<table id='header'>\n");
+ html("<tr>\n");
+ html("<td class='logo' rowspan='2'><a href='");
+ if (ctx->cfg.logo_link)
+ html_attr(ctx->cfg.logo_link);
+ else
+ html_attr(cgit_rooturl());
+ html("'><img src='");
+ html_attr(ctx->cfg.logo);
+ html("' alt='cgit logo'/></a></td>\n");