aboutsummaryrefslogtreecommitdiff
path: root/ui-shared.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/ui-shared.c b/ui-shared.c
index cf06511..4175bd8 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -481,11 +481,8 @@ void cgit_print_http_headers(struct cgit_context *ctx)
void cgit_print_docstart(struct cgit_context *ctx)
{
- if (ctx->cfg.embedded) {
- if (ctx->cfg.header)
- html_include(ctx->cfg.header);
+ if (ctx->cfg.embedded)
return;
- }
char *host = cgit_hosturl();
html(cgit_doctype);
@@ -523,13 +520,7 @@ void cgit_print_docstart(struct cgit_context *ctx)
void cgit_print_docend()
{
- html("</div> <!-- class=content -->\n");
- if (ctx.cfg.embedded) {
- html("</div> <!-- id=cgit -->\n");
- if (ctx.cfg.footer)
- html_include(ctx.cfg.footer);
- return;
- }
+ html("</div>");
if (ctx.cfg.footer)
html_include(ctx.cfg.footer);
else {
@@ -538,7 +529,9 @@ void cgit_print_docend()
cgit_print_date(time(NULL), FMT_LONGDATE, ctx.cfg.local_time);
html("</div>\n");
}
- html("</div> <!-- id=cgit -->\n");
+ html("</div>");
+ if (ctx.cfg.embedded)
+ return;
html("</body>\n</html>\n");
}