Signed-off-by: Jamie Couture <jamie.couture@gmail.com>
+div#cgit div.pager .current {
+ font-weight: bold;
+}
+
div#cgit span.age-mins {
font-weight: bold;
color: #080;
div#cgit span.age-mins {
font-weight: bold;
color: #080;
void print_pager(int items, int pagelen, char *search, char *sort)
{
void print_pager(int items, int pagelen, char *search, char *sort)
{
+ int i, ofs;
+ char *class = NULL;
html("<div class='pager'>");
html("<div class='pager'>");
- for(i = 0; i * pagelen < items; i++)
- cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
- search, sort, i * pagelen);
+ for(i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) {
+ class = (ctx.qry.ofs == ofs) ? "current" : NULL;
+ cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), class,
+ search, sort, ofs);
+ }