all repos — cgit @ 927060c5d8d82a9422fc1dcf6d1379d21071b158

a hyperfast web frontend for git written in c

ui-log: add <span/> around commit decorations

This helps projects that have a large number of tags to display them all
using custom CSS.

The default stylesheet has not been updated since what is useful for
projects with a lot of tags is not the same as what is useful for
projects with only a small number of decorations per commit.

Suggested-by: Konstantin Ryabitsev <mricon@kernel.org>
Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Sat, 18 May 2013 15:54:49 +0100
commit

927060c5d8d82a9422fc1dcf6d1379d21071b158

parent

c2b79dd8e0020c1c10b61fa1a6c58afd53738c85

1 files changed, 2 insertions(+), 0 deletions(-)

jump to
M ui-log.cui-log.c

@@ -61,6 +61,7 @@ static char buf[1024];

buf[sizeof(buf) - 1] = 0; deco = lookup_decoration(&name_decoration, &commit->object); + html("<span class='decoration'>"); while (deco) { if (!prefixcmp(deco->name, "refs/heads/")) { strncpy(buf, deco->name + 11, sizeof(buf) - 1);

@@ -94,6 +95,7 @@ }

next: deco = deco->next; } + html("</span>"); } static void print_commit(struct commit *commit, struct rev_info *revs)