author | Lars Hjemli <hjemli@gmail.com> | 2009-01-29 20:27:39 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-01-29 20:27:39 (UTC) |
commit | b115955d71c50cd2d0065c45f3df6b02fa4730bd (patch) (side-by-side diff) | |
tree | 074182f3e305b4982a97c482ed5fbcc5c6d270a7 /ui-shared.c | |
parent | a61871a18ffa9fc28e7ab0950415404350c8c857 (diff) | |
download | cgit-b115955d71c50cd2d0065c45f3df6b02fa4730bd.zip cgit-b115955d71c50cd2d0065c45f3df6b02fa4730bd.tar.gz cgit-b115955d71c50cd2d0065c45f3df6b02fa4730bd.tar.bz2 |
Add support for a custom header
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-shared.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 4f28512..de77bbf 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -479,48 +479,50 @@ void cgit_print_docstart(struct cgit_context *ctx) html("<head>\n"); html("<title>"); html_txt(ctx->page.title); html("</title>\n"); htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version); if (ctx->cfg.robots && *ctx->cfg.robots) htmlf("<meta name='robots' content='%s'/>\n", ctx->cfg.robots); html("<link rel='stylesheet' type='text/css' href='"); html_attr(ctx->cfg.css); html("'/>\n"); if (ctx->cfg.favicon) { html("<link rel='shortcut icon' href='"); html_attr(ctx->cfg.favicon); html("'/>\n"); } if (host && ctx->repo) { html("<link rel='alternate' title='Atom feed' href='http://"); html_attr(cgit_hosturl()); html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.path, fmt("h=%s", ctx->qry.head))); html("' type='application/atom+xml'/>"); } html("</head>\n"); html("<body>\n"); + if (ctx->cfg.header) + html_include(ctx->cfg.header); } void cgit_print_docend() { html("</div>"); if (ctx.cfg.footer) html_include(ctx.cfg.footer); else { htmlf("<div class='footer'>generated by cgit %s at ", cgit_version); cgit_print_date(time(NULL), FMT_LONGDATE, ctx.cfg.local_time); html("</div>\n"); } html("</body>\n</html>\n"); } int print_branch_option(const char *refname, const unsigned char *sha1, int flags, void *cb_data) { char *name = (char *)refname; html_option(name, name, ctx.qry.head); return 0; } |