-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 5192800..2f771da 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -343,48 +343,50 @@ void cgit_print_age(time_t t, time_t max_relative, char *format) | |||
343 | } | 343 | } |
344 | if (secs < TM_YEAR * 2) { | 344 | if (secs < TM_YEAR * 2) { |
345 | htmlf("<span class='age-months'>%.0f months</span>", | 345 | htmlf("<span class='age-months'>%.0f months</span>", |
346 | secs * 1.0 / TM_MONTH); | 346 | secs * 1.0 / TM_MONTH); |
347 | return; | 347 | return; |
348 | } | 348 | } |
349 | htmlf("<span class='age-years'>%.0f years</span>", | 349 | htmlf("<span class='age-years'>%.0f years</span>", |
350 | secs * 1.0 / TM_YEAR); | 350 | secs * 1.0 / TM_YEAR); |
351 | } | 351 | } |
352 | 352 | ||
353 | void cgit_print_docstart(char *title, struct cacheitem *item) | 353 | void cgit_print_docstart(char *title, struct cacheitem *item) |
354 | { | 354 | { |
355 | html("Content-Type: text/html; charset=" PAGE_ENCODING "\n"); | 355 | html("Content-Type: text/html; charset=" PAGE_ENCODING "\n"); |
356 | htmlf("Last-Modified: %s\n", http_date(item->st.st_mtime)); | 356 | htmlf("Last-Modified: %s\n", http_date(item->st.st_mtime)); |
357 | htmlf("Expires: %s\n", http_date(item->st.st_mtime + | 357 | htmlf("Expires: %s\n", http_date(item->st.st_mtime + |
358 | ttl_seconds(item->ttl))); | 358 | ttl_seconds(item->ttl))); |
359 | html("\n"); | 359 | html("\n"); |
360 | html(cgit_doctype); | 360 | html(cgit_doctype); |
361 | html("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n"); | 361 | html("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n"); |
362 | html("<head>\n"); | 362 | html("<head>\n"); |
363 | html("<title>"); | 363 | html("<title>"); |
364 | html_txt(title); | 364 | html_txt(title); |
365 | html("</title>\n"); | 365 | html("</title>\n"); |
366 | htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version); | 366 | htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version); |
367 | if (cgit_robots && *cgit_robots) | ||
368 | htmlf("<meta name='robots' content='%s'/>\n", cgit_robots); | ||
367 | html("<link rel='stylesheet' type='text/css' href='"); | 369 | html("<link rel='stylesheet' type='text/css' href='"); |
368 | html_attr(cgit_css); | 370 | html_attr(cgit_css); |
369 | html("'/>\n"); | 371 | html("'/>\n"); |
370 | html("</head>\n"); | 372 | html("</head>\n"); |
371 | html("<body>\n"); | 373 | html("<body>\n"); |
372 | } | 374 | } |
373 | 375 | ||
374 | void cgit_print_docend() | 376 | void cgit_print_docend() |
375 | { | 377 | { |
376 | html("</td>\n</tr>\n</table>\n</body>\n</html>\n"); | 378 | html("</td>\n</tr>\n</table>\n</body>\n</html>\n"); |
377 | } | 379 | } |
378 | 380 | ||
379 | int print_branch_option(const char *refname, const unsigned char *sha1, | 381 | int print_branch_option(const char *refname, const unsigned char *sha1, |
380 | int flags, void *cb_data) | 382 | int flags, void *cb_data) |
381 | { | 383 | { |
382 | char *name = (char *)refname; | 384 | char *name = (char *)refname; |
383 | html_option(name, name, cgit_query_head); | 385 | html_option(name, name, cgit_query_head); |
384 | return 0; | 386 | return 0; |
385 | } | 387 | } |
386 | 388 | ||
387 | int print_archive_ref(const char *refname, const unsigned char *sha1, | 389 | int print_archive_ref(const char *refname, const unsigned char *sha1, |
388 | int flags, void *cb_data) | 390 | int flags, void *cb_data) |
389 | { | 391 | { |
390 | struct tag *tag; | 392 | struct tag *tag; |