X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/60a26272e0ca529407fe6b613f061f04ba585d53..670f99097939a08510c2c909cd38f8083800861a:/ui-shared.c?ds=inline diff --git a/ui-shared.c b/ui-shared.c index 538ddda..07d5dd4 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -455,7 +455,7 @@ void cgit_print_age(time_t t, time_t max_relative, char *format) void cgit_print_http_headers(struct cgit_context *ctx) { - if (ctx->cfg.embedded) + if (ctx->env.no_http && !strcmp(ctx->env.no_http, "1")) return; if (ctx->page.status) @@ -481,8 +481,11 @@ void cgit_print_http_headers(struct cgit_context *ctx) void cgit_print_docstart(struct cgit_context *ctx) { - if (ctx->cfg.embedded) + if (ctx->cfg.embedded) { + if (ctx->cfg.header) + html_include(ctx->cfg.header); return; + } char *host = cgit_hosturl(); html(cgit_doctype); @@ -520,7 +523,13 @@ void cgit_print_docstart(struct cgit_context *ctx) void cgit_print_docend() { - html(""); + html(" \n"); + if (ctx.cfg.embedded) { + html(" \n"); + if (ctx.cfg.footer) + html_include(ctx.cfg.footer); + return; + } if (ctx.cfg.footer) html_include(ctx.cfg.footer); else { @@ -529,9 +538,7 @@ void cgit_print_docend() cgit_print_date(time(NULL), FMT_LONGDATE, ctx.cfg.local_time); html("\n"); } - html(""); - if (ctx.cfg.embedded) - return; + html(" \n"); html("\n\n"); } @@ -623,14 +630,17 @@ static void print_header(struct cgit_context *ctx) { html("\n"); html("\n"); - html("\n"); + + if (ctx->cfg.logo && ctx->cfg.logo[0] != 0) { + html("\n"); + } html("