Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
{
char *name;
char *fullpath;
{
char *name;
char *fullpath;
enum object_type type;
unsigned long size = 0;
enum object_type type;
unsigned long size = 0;
cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head,
curr_rev, fullpath);
} else {
cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head,
curr_rev, fullpath);
} else {
- cgit_tree_link(name, NULL, "ls-blob", ctx.qry.head,
+ class = strrchr(name, '.');
+ if (class != NULL) {
+ class = fmt("ls-blob %s", class + 1);
+ } else
+ class = "ls-blob";
+ cgit_tree_link(name, NULL, class, ctx.qry.head,
curr_rev, fullpath);
}
htmlf("</td><td class='ls-size'>%li</td>", size);
curr_rev, fullpath);
}
htmlf("</td><td class='ls-size'>%li</td>", size);