-rw-r--r-- | cgit.css | 14 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | cgitrc | 1 | ||||
-rw-r--r-- | shared.c | 8 | ||||
-rw-r--r-- | ui-summary.c | 14 |
5 files changed, 23 insertions, 15 deletions
@@ -141,20 +141,18 @@ td#search input { | |||
141 | } | 141 | } |
142 | 142 | ||
143 | td#summary { | 143 | div#summary { |
144 | vertical-align: top; | 144 | vertical-align: top; |
145 | padding-bottom: 1em; | 145 | margin-bottom: 1em; |
146 | } | 146 | } |
147 | 147 | ||
148 | td#archivelist { | 148 | table#downloads { |
149 | padding-bottom: 1em; | ||
150 | } | ||
151 | |||
152 | td#archivelist table { | ||
153 | float: right; | 149 | float: right; |
154 | border-collapse: collapse; | 150 | border-collapse: collapse; |
155 | border: solid 1px #777; | 151 | border: solid 1px #777; |
152 | margin-left: 0.5em; | ||
153 | margin-bottom: 0.5em; | ||
156 | } | 154 | } |
157 | 155 | ||
158 | td#archivelist table th { | 156 | table#downloads th { |
159 | background-color: #ccc; | 157 | background-color: #ccc; |
160 | } | 158 | } |
@@ -69,4 +69,5 @@ struct repoinfo { | |||
69 | char *group; | 69 | char *group; |
70 | char *module_link; | 70 | char *module_link; |
71 | char *readme; | ||
71 | int snapshots; | 72 | int snapshots; |
72 | int enable_log_filecount; | 73 | int enable_log_filecount; |
@@ -109,2 +109,3 @@ | |||
109 | #repo.enable-log-linecount=0 # override the default linecount setting | 109 | #repo.enable-log-linecount=0 # override the default linecount setting |
110 | #repo.module-link=/git/%s/commit/?id=%s # override the standard module-link | 110 | #repo.module-link=/git/%s/commit/?id=%s # override the standard module-link |
111 | #repo.readme=info/web/readme # specify a file to include on summary page | ||
@@ -108,4 +108,5 @@ struct repoinfo *add_repo(const char *url) | |||
108 | ret->enable_log_linecount = cgit_enable_log_linecount; | 108 | ret->enable_log_linecount = cgit_enable_log_linecount; |
109 | ret->module_link = cgit_module_link; | 109 | ret->module_link = cgit_module_link; |
110 | ret->readme = NULL; | ||
110 | return ret; | 111 | return ret; |
111 | } | 112 | } |
@@ -188,5 +189,10 @@ void cgit_global_config_cb(const char *name, const char *value) | |||
188 | else if (cgit_repo && !strcmp(name, "repo.module-link")) | 189 | else if (cgit_repo && !strcmp(name, "repo.module-link")) |
189 | cgit_repo->module_link= xstrdup(value); | 190 | cgit_repo->module_link= xstrdup(value); |
190 | else if (!strcmp(name, "include")) | 191 | else if (cgit_repo && !strcmp(name, "repo.readme") && value != NULL) { |
192 | if (*value == '/') | ||
193 | cgit_repo->readme = xstrdup(value); | ||
194 | else | ||
195 | cgit_repo->readme = xstrdup(fmt("%s/%s", cgit_repo->path, value)); | ||
196 | } else if (!strcmp(name, "include")) | ||
191 | cgit_read_config(value, cgit_global_config_cb); | 197 | cgit_read_config(value, cgit_global_config_cb); |
192 | } | 198 | } |
diff --git a/ui-summary.c b/ui-summary.c index 5799773..5c1fc33 100644 --- a/ui-summary.c +++ b/ui-summary.c | |||
@@ -154,5 +154,5 @@ static int cgit_print_archive_cb(const char *refname, const unsigned char *sha1, | |||
154 | } | 154 | } |
155 | if (!header) { | 155 | if (!header) { |
156 | html("<table>"); | 156 | html("<table id='downloads'>"); |
157 | html("<tr><th>Downloads</th></tr>"); | 157 | html("<tr><th>Downloads</th></tr>"); |
158 | header = 1; | 158 | header = 1; |
@@ -194,6 +194,6 @@ static void cgit_print_archives() | |||
194 | void cgit_print_summary() | 194 | void cgit_print_summary() |
195 | { | 195 | { |
196 | html("<table class='list nowrap'>"); | 196 | html("<div id='summary'>"); |
197 | html("<tr class='nohover'><td id='summary' colspan='3'>"); | 197 | cgit_print_archives(); |
198 | html("<h2>"); | 198 | html("<h2>"); |
199 | html_txt(cgit_repo->name); | 199 | html_txt(cgit_repo->name); |
@@ -201,7 +201,9 @@ void cgit_print_summary() | |||
201 | html_txt(cgit_repo->desc); | 201 | html_txt(cgit_repo->desc); |
202 | html("</h2>"); | 202 | html("</h2>"); |
203 | html("</td><td id='archivelist'>"); | 203 | if (cgit_repo->readme) |
204 | cgit_print_archives(); | 204 | html_include(cgit_repo->readme); |
205 | html("</td></tr>"); | 205 | html("</div>"); |
206 | |||
207 | html("<table class='list nowrap'>"); | ||
206 | cgit_print_branches(); | 208 | cgit_print_branches(); |
207 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); | 209 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); |