summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Unidiff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index de77bbf..f18b2c7 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -457,4 +457,7 @@ void cgit_print_age(time_t t, time_t max_relative, char *format)
457void cgit_print_http_headers(struct cgit_context *ctx) 457void cgit_print_http_headers(struct cgit_context *ctx)
458{ 458{
459 if (ctx->cfg.embedded)
460 return;
461
459 if (ctx->page.mimetype && ctx->page.charset) 462 if (ctx->page.mimetype && ctx->page.charset)
460 htmlf("Content-Type: %s; charset=%s\n", ctx->page.mimetype, 463 htmlf("Content-Type: %s; charset=%s\n", ctx->page.mimetype,
@@ -474,4 +477,7 @@ void cgit_print_http_headers(struct cgit_context *ctx)
474void cgit_print_docstart(struct cgit_context *ctx) 477void cgit_print_docstart(struct cgit_context *ctx)
475{ 478{
479 if (ctx->cfg.embedded)
480 return;
481
476 char *host = cgit_hosturl(); 482 char *host = cgit_hosturl();
477 html(cgit_doctype); 483 html(cgit_doctype);
@@ -516,4 +522,7 @@ void cgit_print_docend()
516 html("</div>\n"); 522 html("</div>\n");
517 } 523 }
524 html("</div>");
525 if (ctx.cfg.embedded)
526 return;
518 html("</body>\n</html>\n"); 527 html("</body>\n</html>\n");
519} 528}
@@ -610,4 +619,5 @@ void cgit_print_pageheader(struct cgit_context *ctx)
610 fallback_cmd = "summary"; 619 fallback_cmd = "summary";
611 620
621 html("<div id='cgit'>");
612 html("<table id='header'>\n"); 622 html("<table id='header'>\n");
613 html("<tr>\n"); 623 html("<tr>\n");