diff options
author | Lukas Fleischer <cgit@cryptocrack.de> | 2013-03-07 08:56:22 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-03-20 21:16:19 +0100 |
commit | b60e6bff75719a5fb0df970bac3be6b2726cf73a (patch) | |
tree | 706c27228919f3cca2d307b1d3dfcc561b0cd64e /ui-repolist.c | |
parent | Makefile: remove CGIT-CFLAGS files in clean stage (diff) | |
download | cgit-pink-b60e6bff75719a5fb0df970bac3be6b2726cf73a.tar.gz cgit-pink-b60e6bff75719a5fb0df970bac3be6b2726cf73a.zip |
Convert pager navigation into a unordered list
It is common practice and semantically appropriate to use unordered lists for long navigation lists. This also fixes the layout of very long pager navigations in Webkit-based browsers. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Diffstat (limited to '')
-rw-r--r-- | ui-repolist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 66c88c4..a9751f6 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -128,13 +128,15 @@ static void print_pager(int items, int pagelen, char *search, char *sort) { int i, ofs; char *class = NULL; - html("<div class='pager'>"); + html("<ul class='pager'>"); for (i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) { class = (ctx.qry.ofs == ofs) ? "current" : NULL; + html("<li>"); cgit_index_link(fmt("[%d]", i + 1), fmt("Page %d", i + 1), class, search, sort, ofs); + html("</li>"); } - html("</div>"); + html("</ul>"); } static int cmp(const char *s1, const char *s2) |