\n");
- if (ctx->repo) {
- cgit_summary_link("summary", NULL, hc(ctx, "summary"),
- ctx->qry.head);
- cgit_refs_link("refs", NULL, hc(ctx, "refs"), ctx->qry.head,
- ctx->qry.sha1, NULL);
- cgit_log_link("log", NULL, hc(ctx, "log"), ctx->qry.head,
- NULL, ctx->qry.vpath, 0, NULL, NULL,
- ctx->qry.showmsg);
- cgit_tree_link("tree", NULL, hc(ctx, "tree"), ctx->qry.head,
- ctx->qry.sha1, ctx->qry.vpath);
- cgit_commit_link("commit", NULL, hc(ctx, "commit"),
- ctx->qry.head, ctx->qry.sha1, ctx->qry.vpath, 0);
- cgit_diff_link("diff", NULL, hc(ctx, "diff"), ctx->qry.head,
- ctx->qry.sha1, ctx->qry.sha2, ctx->qry.vpath, 0);
- if (ctx->repo->max_stats)
- cgit_stats_link("stats", NULL, hc(ctx, "stats"),
- ctx->qry.head, ctx->qry.vpath);
- if (ctx->repo->readme)
- reporevlink("about", "about", NULL,
- hc(ctx, "about"), ctx->qry.head, NULL,
- NULL);
- html(" | ");
- html("\n");
- } else {
- site_link(NULL, "index", NULL, hc(ctx, "repolist"), NULL, NULL, 0);
- if (ctx->cfg.root_readme)
- site_link("about", "about", NULL, hc(ctx, "about"),
- NULL, NULL, 0);
- html(" | ");
- html("");
+ }
+
+ html("");
+
+ /* if (ctx->repo && ctx->repo->logo && *ctx->repo->logo) */
+ /* logo = ctx->repo->logo; */
+ /* else */
+ /* logo = ctx->cfg.logo; */
+ /* if (ctx->repo && ctx->repo->logo_link && *ctx->repo->logo_link) */
+ /* logo_link = ctx->repo->logo_link; */
+ /* else */
+ /* logo_link = ctx->cfg.logo_link; */
+ /* if (logo && *logo) { */
+ /* html(" | ![cgit logo]("); */
+ /* html_attr(logo); */
+ /* html(") | \n"); */
+ /* } */
+}
+
+void cgit_print_pageheader(struct cgit_context *ctx)
+{
+ html("");
+ if (!ctx->cfg.noheader)
+ print_header(ctx);
+
+ html("
");
+ if (ctx->repo) {
+ htmlf("- ", hc(ctx, "summary"));
+ cgit_summary_link("summary", NULL, NULL, ctx->qry.head);
+ html("
");
+
+ htmlf("- ", hc(ctx, "refs"));
+ cgit_refs_link("refs", NULL, NULL, ctx->qry.head, ctx->qry.sha1,
+ NULL);
+ html("
");
+
+ htmlf("- ", hc(ctx, "log"));
+ cgit_log_link("log", NULL, NULL, ctx->qry.head, NULL,
+ ctx->qry.vpath, 0, NULL, NULL, ctx->qry.showmsg);
+ html("
");
+
+ htmlf("- ", hc(ctx, "tree"));
+ cgit_tree_link("tree", NULL, NULL, ctx->qry.head, ctx->qry.sha1,
+ ctx->qry.vpath);
+ html("
");
+
+ htmlf("- ", hc(ctx, "commit"));
+ cgit_commit_link("commit", NULL, NULL, ctx->qry.head,
+ ctx->qry.sha1, ctx->qry.vpath, 0);
+ html("
");
+
+ htmlf("- ", hc(ctx, "diff"));
+ cgit_diff_link("diff", NULL, NULL, ctx->qry.head, ctx->qry.sha1,
+ ctx->qry.sha2, ctx->qry.vpath, 0);
+ html("
");
+
+ if (ctx->repo->max_stats) {
+ htmlf("- ", hc(ctx, "stats"));
+ cgit_stats_link("stats", NULL, NULL, ctx->qry.head,
+ ctx->qry.vpath);
+ html("
");
+ }
+
+ if (ctx->repo->readme) {
+ htmlf("- ", hc(ctx, "about"));
+ reporevlink("about", "about", NULL, NULL, ctx->qry.head,
+ NULL, NULL);
+ html("
");
+ }
+ }
+ else {
+ htmlf("- ", hc(ctx, "repolist"));
+ site_link(NULL, "index", NULL, NULL, NULL, NULL, 0);
+ html("
");
+
+ if (ctx->cfg.root_readme) {
+ htmlf("- ", hc(ctx, "about"));
+ site_link("about", "about", NULL, NULL, NULL, NULL, 0);
+ html("
");
+ }
+ }
+ html("
");
+
+
+ html("
\n");
+ if (ctx->repo) {
+ html(" | ");
+ } else {
+ html(" | ");
}
html(" |
\n");
- if (ctx->qry.vpath) {
- html("
");
- html("path: ");
+ if (ctx->qry.vpath)
cgit_print_path_crumbs(ctx, ctx->qry.vpath);
- html("
");
- }
+
html("
");
}
--
cgit v1.2.3-54-g00ecf