aboutsummaryrefslogtreecommitdiffstats
path: root/ui-repolist.c
diff options
context:
space:
mode:
authorLukas Fleischer2013-03-07 08:56:22 +0100
committerJason A. Donenfeld2013-03-20 21:16:19 +0100
commitb60e6bff75719a5fb0df970bac3be6b2726cf73a (patch)
tree706c27228919f3cca2d307b1d3dfcc561b0cd64e /ui-repolist.c
parent121089ced5e1d3f3103cbc2b37f5fb579d800915 (diff)
downloadcgit-b60e6bff75719a5fb0df970bac3be6b2726cf73a.tar.gz
cgit-b60e6bff75719a5fb0df970bac3be6b2726cf73a.tar.bz2
cgit-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 'ui-repolist.c')
-rw-r--r--ui-repolist.c6
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)
128{ 128{
129 int i, ofs; 129 int i, ofs;
130 char *class = NULL; 130 char *class = NULL;
131 html("<div class='pager'>"); 131 html("<ul class='pager'>");
132 for (i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) { 132 for (i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) {
133 class = (ctx.qry.ofs == ofs) ? "current" : NULL; 133 class = (ctx.qry.ofs == ofs) ? "current" : NULL;
134 html("<li>");
134 cgit_index_link(fmt("[%d]", i + 1), fmt("Page %d", i + 1), 135 cgit_index_link(fmt("[%d]", i + 1), fmt("Page %d", i + 1),
135 class, search, sort, ofs); 136 class, search, sort, ofs);
137 html("</li>");
136 } 138 }
137 html("</div>"); 139 html("</ul>");
138} 140}
139 141
140static int cmp(const char *s1, const char *s2) 142static int cmp(const char *s1, const char *s2)