From 808c685ebb7cd2d24d3881b74e3be2439bd1393b Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 23 Dec 2010 12:47:54 +0100 Subject: implement repo.logo and repo.logo-link Allow for per repo logo and logo-link; Use global logo and logo-link per default. Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Lars Hjemli --- ui-shared.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'ui-shared.c') diff --git a/ui-shared.c b/ui-shared.c index ae29615..7efae7a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -756,17 +756,27 @@ static void cgit_print_path_crumbs(struct cgit_context *ctx, char *path) static void print_header(struct cgit_context *ctx) { + char *logo = NULL, *logo_link = NULL; + html("\n"); html("\n"); - if (ctx->cfg.logo && ctx->cfg.logo[0] != 0) { + 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("\n"); } -- cgit v1.2.3-59-g8ed1b