]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-summary.c
about: move layout into page functions
[ps-cgit] / ui-summary.c
index 46ca71349f8649369500a4f7e3304959acc674ab..cd1fef554eb8833cf7acfdd7ae689a46be6b8fe3 100644 (file)
@@ -13,7 +13,6 @@
 #include "ui-refs.h"
 #include "ui-blob.h"
 #include "ui-shared.h"
-#include <libgen.h>
 
 static int urls;
 
@@ -28,7 +27,7 @@ static void print_url(const char *url)
 
        if (urls++ == 0) {
                htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
-               htmlf("<tr><th class='left' colspan='%d'>Clone</th></tr>\n", columns);
+               htmlf("<tr class='nohover'><th class='left' colspan='%d'>Clone</th></tr>\n", columns);
        }
 
        htmlf("<tr><td colspan='%d'><a rel='vcs-git' href='", columns);
@@ -40,7 +39,7 @@ static void print_url(const char *url)
        html("</a></td></tr>\n");
 }
 
-void cgit_print_summary()
+void cgit_print_summary(void)
 {
        int columns = 3;
 
@@ -102,8 +101,9 @@ void cgit_print_repo_readme(char *path)
        char *filename, *ref;
        int free_filename = 0;
 
+       cgit_print_layout_start();
        if (ctx.repo->readme.nr == 0)
-               return;
+               goto done;
 
        filename = ctx.repo->readme.items[0].string;
        ref = ctx.repo->readme.items[0].util;
@@ -112,7 +112,7 @@ void cgit_print_repo_readme(char *path)
                free_filename = 1;
                filename = append_readme_path(filename, ref, path);
                if (!filename)
-                       return;
+                       goto done;
        }
 
        /* Print the calculated readme, either from the git repo or from the
@@ -129,4 +129,7 @@ void cgit_print_repo_readme(char *path)
        html("</div>");
        if (free_filename)
                free(filename);
+
+done:
+       cgit_print_layout_end();
 }