Merge branch 'lh/header'
This commit is contained in:
commit
0b3c746ba8
2
cgit.c
2
cgit.c
@ -31,6 +31,8 @@ void config_cb(const char *name, const char *value)
|
|||||||
ctx.cfg.favicon = xstrdup(value);
|
ctx.cfg.favicon = xstrdup(value);
|
||||||
else if (!strcmp(name, "footer"))
|
else if (!strcmp(name, "footer"))
|
||||||
ctx.cfg.footer = xstrdup(value);
|
ctx.cfg.footer = xstrdup(value);
|
||||||
|
else if (!strcmp(name, "header"))
|
||||||
|
ctx.cfg.header = xstrdup(value);
|
||||||
else if (!strcmp(name, "logo"))
|
else if (!strcmp(name, "logo"))
|
||||||
ctx.cfg.logo = xstrdup(value);
|
ctx.cfg.logo = xstrdup(value);
|
||||||
else if (!strcmp(name, "index-header"))
|
else if (!strcmp(name, "index-header"))
|
||||||
|
1
cgit.h
1
cgit.h
@ -135,6 +135,7 @@ struct cgit_config {
|
|||||||
char *css;
|
char *css;
|
||||||
char *favicon;
|
char *favicon;
|
||||||
char *footer;
|
char *footer;
|
||||||
|
char *header;
|
||||||
char *index_header;
|
char *index_header;
|
||||||
char *index_info;
|
char *index_info;
|
||||||
char *logo;
|
char *logo;
|
||||||
|
@ -84,6 +84,10 @@ footer
|
|||||||
verbatim at the bottom of all pages (i.e. it replaces the standard
|
verbatim at the bottom of all pages (i.e. it replaces the standard
|
||||||
"generated by..." message. Default value: none.
|
"generated by..." message. Default value: none.
|
||||||
|
|
||||||
|
header
|
||||||
|
The content of the file specified with this option will be included
|
||||||
|
verbatim at the top of all pages. Default value: none.
|
||||||
|
|
||||||
include
|
include
|
||||||
Name of a configfile to include before the rest of the current config-
|
Name of a configfile to include before the rest of the current config-
|
||||||
file is parsed. Default value: none.
|
file is parsed. Default value: none.
|
||||||
|
@ -500,6 +500,8 @@ void cgit_print_docstart(struct cgit_context *ctx)
|
|||||||
}
|
}
|
||||||
html("</head>\n");
|
html("</head>\n");
|
||||||
html("<body>\n");
|
html("<body>\n");
|
||||||
|
if (ctx->cfg.header)
|
||||||
|
html_include(ctx->cfg.header);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cgit_print_docend()
|
void cgit_print_docend()
|
||||||
|
Loading…
Reference in New Issue
Block a user