mirror of
https://git.zx2c4.com/cgit
synced 2024-11-09 10:08:42 +00:00
ui-repolist: Bold the currently viewed page.
Signed-off-by: Jamie Couture <jamie.couture@gmail.com>
This commit is contained in:
parent
61d4147ea2
commit
4675b91211
4
cgit.css
4
cgit.css
@ -548,6 +548,10 @@ div#cgit div.pager a {
|
|||||||
margin: 0em 0.5em;
|
margin: 0em 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div#cgit div.pager .current {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
div#cgit span.age-mins {
|
div#cgit span.age-mins {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #080;
|
color: #080;
|
||||||
|
@ -123,11 +123,14 @@ void print_header(int columns)
|
|||||||
|
|
||||||
void print_pager(int items, int pagelen, char *search, char *sort)
|
void print_pager(int items, int pagelen, char *search, char *sort)
|
||||||
{
|
{
|
||||||
int i;
|
int i, ofs;
|
||||||
|
char *class = NULL;
|
||||||
html("<div class='pager'>");
|
html("<div class='pager'>");
|
||||||
for(i = 0; i * pagelen < items; i++)
|
for(i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) {
|
||||||
cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
|
class = (ctx.qry.ofs == ofs) ? "current" : NULL;
|
||||||
search, sort, i * pagelen);
|
cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), class,
|
||||||
|
search, sort, ofs);
|
||||||
|
}
|
||||||
html("</div>");
|
html("</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user